cloudstack
cloudstack copied to clipboard
Add logs to CPVM connection process
Description
The logs related to the CPVM connection are not enough to perform a great troubleshooting process.
This PR, therefore, adds logs and improves the existing ones in order to facilitate the CPVM connection troubleshooting. Furthermore, the legacy CPVM log proxy classes have been removed, in order to let the CPVM classes use log4j dependencies directly.
Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] build/CI
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
- [ ] Major
- [x] Minor
Screenshots (if appropriate):
How Has This Been Tested?
- I created a VM and accessed it through a CPVM.
- Meanwhile, I verified that the messages were logged as expected.
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@DaanHoogland, thanks for your review!
As logging standards in CloudStack are still under discussion (#8746), I'd rather keep logging the exceptions stacktraces at the error level.
Honestly, I do not see the point in turning off the stacktraces at the error level. For operators that have a minimum software development background, the stacktraces can be a useful way to perform troubleshooting processes.
On the other hand, if the operator has no knowledge of development, he might not understand the stacktraces, and that is fine, causing no harm.
Besides that, following along with what you've proposed in #8746, what happens when the operator chooses to turn the stacktraces down by setting the logs level to error? Are all exception logs be lost, since they are gonna be at debug level? If so, the difficulty of performing troubleshootings would increase significantly, as some errors/problems might be difficult to reproduce.
Honestly, I'm looking forward to see the outcome of the #8746 discussion and I commit myself to participate on it. However, as I've mentioned before, I'd rather keep the proposed changes related to the stacktraces at the error level the way they are.
Codecov Report
Attention: Patch coverage is 3.57143% with 81 lines in your changes missing coverage. Please review.
Project coverage is 15.53%. Comparing base (
a5508ac) to head (7f0ae89). Report is 1051 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #8924 +/- ##
=============================================
+ Coverage 13.17% 15.53% +2.36%
- Complexity 9214 11962 +2748
=============================================
Files 2725 5490 +2765
Lines 258235 480765 +222530
Branches 40249 60266 +20017
=============================================
+ Hits 34013 74697 +40684
- Misses 219913 397811 +177898
- Partials 4309 8257 +3948
| Flag | Coverage Δ | |
|---|---|---|
| uitests | 4.17% <ø> (?) |
|
| unittests | 16.30% <3.57%> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
clgtm, can we now remove
com.cloud.consoleproxy.util.Loggerfrom the code base @bernardodemarco ? Just to deal with the technical debt. (we can always add a new proxy once we get wise ;)
@DaanHoogland, I have just removed the CPVM log proxy classes and updated the PR's description.
clgtm, can we now remove
com.cloud.consoleproxy.util.Loggerfrom the code base @bernardodemarco ? Just to deal with the technical debt. (we can always add a new proxy once we get wise ;)@DaanHoogland, I have just removed the CPVM log proxy classes and updated the PR's description.
thanks for honouring my obnoxious request @bernardodemarco .
@blueorangutan package
@DaanHoogland 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]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9981
@blueorangutan test alma9 kvm-alma9
@DaanHoogland a [SL] Trillian-Jenkins test job (alma9 mgmt + kvm-alma9) has been kicked to run smoke tests
[SF] Trillian test result (tid-10475) Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9 Total time taken: 48808 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8924-t10475-kvm-alma9.zip Smoke tests completed. 134 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|
@blueorangutan package
@JoaoJandre 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 ✖️ debian ✖️ suse15. SL-JID 10637
Packaging result [SF]: ✔️ el8 ✔️ el9 ✖️ debian ✔️ suse15. SL-JID 10651
@blueorangutan test
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
[SF] Trillian test result (tid-11075) Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8 Total time taken: 55725 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8924-t11075-kvm-ol8.zip Smoke tests completed. 138 look OK, 1 have errors, 0 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|---|---|---|
| test_05_vmschedule_test_e2e | Failure |
362.40 | test_vm_schedule.py |
Merging based on reviews/manual tests. The single failure here https://github.com/apache/cloudstack/pull/8924#issuecomment-2290433194 is not related (same thing happened on https://github.com/apache/cloudstack/pull/9209)