-
Notifications
You must be signed in to change notification settings - Fork 897
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
[V2V] Enhance throttler logging #18929
[V2V] Enhance throttler logging #18929
Conversation
lib/infra_conversion_throttler.rb
Outdated
@@ -1,24 +1,42 @@ | |||
class InfraConversionThrottler | |||
def self.start_conversions | |||
$log&.debug("InfraConversionThrottler.start_conversions") |
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.
I know the previous code had this...but why do you need the &.
for $log
? This is a global var that is set up by vmdb_loggers and will never be nil
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.
Included Vmdb::Logging
and updated to use _log
.
Does this also address the race condition you mentioned? |
@djberg96 nope, but it logs the job state, so we know it if it happens again. |
lib/infra_conversion_throttler.rb
Outdated
vm_name = job.migration_task.source.name | ||
_log.debug("- Looking for a conversion host for task for #{vm_name}") | ||
|
||
if slots <= 0 |
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.
Could this be outside the jobs.each
loop? It looks like there is no context in this loop that impacts the slots check and it breaks out anyway
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.
Yes, it could. We talked about it with Keenan, but I wanted to limit the change to new log messages.
Anyway, it's a good point, so I updated the code.
Looks good to me, @djberg96 ? |
👍 |
…ogging [V2V] Enhance throttler logging (cherry picked from commit fd70427) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1726394
Hammer backport details:
|
While trying to identify the reason for odd balancing on a migration plan execution, we realized that we didn't have enough information to nail the cause. This PR adds extra logging in debug mode, so that we can understand the current limits at the EMS and Conversion Host levels.
The PR also changes the configuration of the SSH connection in
ConversionHost.verify_credentials
, because it currently overrides the log level of the global throttler. We will need another PR to keep the SSH errors, but the current setting is counter productive.RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1726186