Skip to content
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

Add logs to CPVM connection process #8924

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

bernardodemarco
Copy link
Collaborator

@bernardodemarco bernardodemarco commented Apr 16, 2024

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.

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)
  • 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
  • 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.

@bernardodemarco bernardodemarco changed the title Increment cpvm connection logs Add logs to CPVM connection process Apr 16, 2024
@bernardodemarco bernardodemarco changed the title Add logs to CPVM connection process Draft: Add logs to CPVM connection process Apr 16, 2024
@bernardodemarco bernardodemarco marked this pull request as draft April 16, 2024 20:10
Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@bernardodemarco bernardodemarco changed the base branch from 4.19 to main April 17, 2024 19:45
@bernardodemarco bernardodemarco changed the title Draft: Add logs to CPVM connection process Add logs to CPVM connection process Apr 17, 2024
@bernardodemarco bernardodemarco marked this pull request as ready for review April 17, 2024 21:31
@bernardodemarco
Copy link
Collaborator Author

@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.

bernardodemarco and others added 2 commits April 29, 2024 17:31
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Apr 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 64 lines in your changes missing coverage. Please review.

Project coverage is 15.28%. Comparing base (a5508ac) to head (583c170).
Report is 693 commits behind head on main.

Files Patch % Lines
...m/cloud/consoleproxy/ConsoleProxyNoVNCHandler.java 0.00% 23 Missing ⚠️
...om/cloud/consoleproxy/ConsoleProxyNoVncClient.java 0.00% 20 Missing ⚠️
...n/java/com/cloud/consoleproxy/vnc/NoVncClient.java 0.00% 9 Missing ⚠️
...ava/com/cloud/servlet/ConsoleProxyClientParam.java 0.00% 6 Missing ⚠️
...om/cloud/consoleproxy/ConsoleProxyClientParam.java 0.00% 6 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##               main    #8924       +/-   ##
=============================================
+ Coverage     13.17%   15.28%    +2.11%     
- Complexity     9214    11521     +2307     
=============================================
  Files          2725     5425     +2700     
  Lines        258235   474021   +215786     
  Branches      40249    58630    +18381     
=============================================
+ Hits          34013    72439    +38426     
- Misses       219913   393539   +173626     
- Partials       4309     8043     +3734     
Flag Coverage Δ
uitests 4.26% <ø> (?)
unittests 16.01% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm, can we now remove com.cloud.consoleproxy.util.Logger from the code base @bernardodemarco ? Just to deal with the technical debt. (we can always add a new proxy once we get wise ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants