linstor: Fix a file handle resource leak opening template.properties#13091
linstor: Fix a file handle resource leak opening template.properties#13091rp- wants to merge 1 commit intoapache:4.22from
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13091 +/- ##
============================================
- Coverage 17.68% 17.68% -0.01%
- Complexity 15791 15794 +3
============================================
Files 5922 5922
Lines 533085 533085
Branches 65205 65205
============================================
- Hits 94270 94266 -4
- Misses 428174 428180 +6
+ Partials 10641 10639 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
There was a problem hiding this comment.
Pull request overview
Fixes a file handle leak in the LINSTOR KVM storage adaptor when reading template.properties to detect the SystemVM template, preventing lingering open handles that can block unmounts.
Changes:
- Wraps
FileInputStreamusage inisSystemTemplate(...)with try-with-resources to ensure the stream is always closed.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17681 |
|
@blueorangutan test |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-16002)
|
Description
Fixes a file handle leak while checking the template.properties file.
This was introduced in df99a29
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Linstor cluster nfs mounts couldn't be unmounted anymore because the file was still opened.
After the fix, the leaked handle was gone and unmount worked.
How did you try to break this feature and the system with this change?