-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Handle exception for decoder while uploading ISO from local #10879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.19
Are you sure you want to change the base?
Handle exception for decoder while uploading ISO from local #10879
Conversation
@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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #10879 +/- ##
============================================
+ Coverage 4.28% 15.17% +10.88%
- Complexity 0 11345 +11345
============================================
Files 371 5415 +5044
Lines 29724 475598 +445874
Branches 5215 58038 +52823
============================================
+ Hits 1274 72150 +70876
- Misses 28305 395377 +367072
- Partials 145 8071 +7926
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses a bug where an exception during ISO uploads causes the upload status to be "Not Ready" by handling IllegalReferenceCountException when destroying the HTTP decoder.
- Added import for IllegalReferenceCountException
- Wrapped the decoder.destroy() call with a try-catch block to log and handle the exception
Comments suppressed due to low confidence (1)
services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/HttpUploadServerHandler.java:233
- [nitpick] Consider verifying the state of the decoder (if possible) to ensure that calling destroy() is necessary, rather than relying solely on catching IllegalReferenceCountException. This could help avoid potential side effects from redundant destroy() calls.
if (decoder != null) {
...age/server/src/main/java/org/apache/cloudstack/storage/resource/HttpUploadServerHandler.java
Show resolved
Hide resolved
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13409 |
Description
This PR handles the exception (IllegalReferenceCountException) for decoder while uploading ISO from local.
IllegalReferenceCountException is noticed (in SSVM log) when ISO image from local is uploaded to the secondary storage, and no errors reported in the UI (100% uploaded). But status of the upload is "Not Ready".
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?