-
Notifications
You must be signed in to change notification settings - Fork 241
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
Added an extra verbosity level to paasta_metastatus #155
Conversation
dest="verbose", | ||
default=False, | ||
default=0, | ||
help="Print out more output regarding the state of the cluster", |
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.
Can you adjust the help output to hint that there can be more?
dest="verbose", | ||
default=False, | ||
help="Print out more output regarding the state of the cluster", | ||
default=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.
Can you add this to the itest to ensure we are invoking this new code path on a real box?
Just for record keeping, this PR is waiting for itest + review feedback fixes. |
I don't really like the logic for 'extra' checks being printed in Add a boolean parameter like Add a check named
N.B the second value of the tuple returned by the modify
By doing this, we move the logic for 'whats verbose' away from I'm happy to pair with you on this if you like, too. |
@@ -286,11 +285,36 @@ def print_results_for_healthchecks(summary, ok, results, verbose): | |||
print_with_indent(line, 2) | |||
|
|||
|
|||
def get_extra_mesos_slave_data(mesos_state): | |||
slaves = dict((slave['id'], slave) for slave in mesos_state['slaves']) |
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.
why do you need the whole slave dict as the value here? how about:
dict((slave['id'], {}) for slave in mesos_state['slaves'])
that way, in the below logic, you're won't be modifying the slave dict.
1ca9bed
to
d5fd644
Compare
@then(u'paasta_metastatus exits with return code "{expected_return_code}" and output "{expected_output}"') | ||
def check_metastatus_return_code(context, expected_return_code, expected_output): | ||
@then(u'paasta_metastatus {flags} exits with return code "{expected_return_code}" and output "{expected_output}"') | ||
def check_metastatus_return_code(context, flags, expected_return_code, expected_output): |
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.
can you check what happens when flags
is empty?
Then paasta_metastatus exits with..
Will flags
just be an empty string?
fix n ship - great stuff 👍 |
Uses Krall's mesos slave analysis script to display free CPU and RAM on each host. Called by using paasta metastatus -vv (or --verbose --verbose).