Improve template download error message#8029
Conversation
|
@blueorangutan package |
|
@rohityadavcloud a [SF] 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]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7219 |
Codecov Report
@@ Coverage Diff @@
## 4.18 #8029 +/- ##
============================================
- Coverage 13.07% 13.07% -0.01%
Complexity 9107 9107
============================================
Files 2720 2720
Lines 257513 257520 +7
Branches 40151 40153 +2
============================================
Hits 33658 33658
- Misses 219624 219630 +6
- Partials 4231 4232 +1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
thanks @oscaralvaro , I can imagine this would be an improvement in some cases but as @rohityadavcloud mentions, it might be exposing info to unprivileged users as well. Can you make an assessment of that? |
|
@blueorangutan test |
|
@rohityadavcloud a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Yes, this may depend on the error. Certainly if users are able to register templates, they would also like the error feedback if they have a bad checksum configured, but there may be other errors leaked, like being able to indirectly probe what servers can be reached by the hosts. One could infer that just from failure to download templates as it is today, but this may give more detail. |
|
thanks for the feedback @rohityadavcloud @DaanHoogland @mlsorensen. I will filter the details to be shown just to admin users |
|
[SF] Trillian test result (tid-7836)
|
|
@rohityadavcloud @DaanHoogland @mlsorensen I've made changes to show error details only to admin role I was wondering if other roles as DOMAIN_ADMIN, RESOURCE_DOMAIN_ADMIN would benefit from this information as well Also, it feels that a middle ground in the error message detail is missing, because currently either the errors are too generic or too internal. A more granular error messaging (without leaking internals) would allow for a faster troubleshooting and better self-support |
|
@blueorangutan package |
|
@DaanHoogland a [SF] 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]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 7237 |
|
you've got a compile error @oscaralvaro: Did you forget to commit something? |
…ectDownloadManagerImpl.java
|
thanks for the commit @DaanHoogland , yes, there is a difference for Account type between 4.16 and 4.18, thanks for the fix |
|
@blueorangutan package |
|
@DaanHoogland a [SF] 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]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7251 |
|
@blueorangutan test |
|
@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
stephankruggg
left a comment
There was a problem hiding this comment.
CLGTM, not manually tested
|
[SF] Trillian test result (tid-7870)
|
i agree @oscaralvaro , but would leave it to a next iteration. |
(cherry picked from commit c0128e2) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Description
This PR...
Improves the error messages to more accurately describe the reasons for failure to download a template. This is done via surfacing the underlying reason for the failure in the error message. This will facilitate troubleshooting.
This improved error messages are only shown to the admin role, for the rest of the users there is no change in error message details (tested with non-admin account).
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
Manual testing via setting up a development environment and triggering failures. Two scenarios were tested with below resulting error messages. Several other failure reasons will be surfaced as well.
-Example: Template checksum mismatch
Before:
Unable to orchestrate start VM instance {id: "3112", name: "i-2-3112-VM", uuid: "db19b8af-00e0-4f7a-803b-a6c3b022ba5d", type="User"} due to [Template 203 could not be downloaded on pool 1, failing after trying on several hosts].
Now:
Unable to orchestrate start VM instance {id: "3112", name: "i-2-3112-VM", uuid: "db19b8af-00e0-4f7a-803b-a6c3b022ba5d", type="User"} due to [Template 203 could not be downloaded on pool 1, failing after trying on several hosts Details: Checksum validation failed].
UI:
-Example: Wrong template url
Before:
Unable to orchestrate start VM instance {id:
"3110", name: "¡-2-3110-VM", uuid:
"40478bcf-5ffa-4a18-9d22-
739d149df76", type="User") due to [Template 203 could not be downloaded on pool 1, failing after trying on several hosts].
Now:
Unable to orchestrate start VM instance {id:
"3110", name: "¡-2-3110-VM", uuid:
"40478bcf-5ffa-4a18-9d22-
739d149df76", type="User") due to [Template 203 could not be downloaded on pool 1, failing after trying on several hosts Details: Unable to download template: Error on HTTPS response].
UI: