-
Notifications
You must be signed in to change notification settings - Fork 59
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
crowbar: Do not use @logger in forks where it's not available anymore #369
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1588,14 +1588,22 @@ def wait_for_chef_daemons(node_list) | |
private | ||
|
||
def wait_for_chef_clients(node_name, options = {}) | ||
options = if options.fetch(:logger) | ||
use_logger = options.fetch(:logger, nil) | ||
options = if use_logger | ||
{logger: @logger} | ||
else | ||
{} | ||
end | ||
@logger.debug("wait_for_chef_clients: Waiting for already running chef-clients on #{node_name}.") | ||
if use_logger | ||
@logger.debug("wait_for_chef_clients: Waiting for already running chef-clients on #{node_name}.") | ||
end | ||
unless RemoteNode.chef_ready?(node_name, 1200, 10, options) | ||
@logger.error("Waiting for already running chef-clients on #{node_name} failed.") | ||
msg = "Waiting for already running chef-clients on #{node_name} failed." | ||
if use_logger | ||
@logger.error(msg) | ||
else | ||
puts(msg) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so not even There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hrm, I don't know actually, but the intent is to actually log (through stdout) to a different file. Which is what we already do in |
||
end | ||
exit(1) | ||
end | ||
end | ||
|
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.
Metrics/LineLength: Line is too long. 103/100