-
Notifications
You must be signed in to change notification settings - Fork 209
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
feat: update instructions of the insights-client output #4091
base: master
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
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.
The first state (RHSM unregistered & Insights unregistered) seems correct, I only left a comment addressing the output formatting.
However, after the message is printed, I get one more line:
Machine-id found, insights-client can not be registered. Please, unregister insights-client first: `insights-client --unregister`
Is that intentional?
The second state (RHSM registered & Insights unregistered) doesn't seem to address the issue properly. The output seems to be
This host has not been registered. Use --register to register this host.
which is coming from
insights-core/insights/client/phase/v1.py
Lines 271 to 272 in cdb63eb
logger.info('This host has not been registered. ' | |
'Use --register to register this host.') |
insights/client/connection.py
Outdated
logger.error("This machine has not yet been registered, " | ||
"\nplease ensure that the system is registered with subscription-manager " | ||
"and then with insights-client." | ||
"\n\n. Register with subscription-manager" | ||
"\n# subscription-manager register" | ||
"\n\n. Register with insights-client" | ||
"\n# insights-client --register") |
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'd remove the newline before
please ensure
..., let's keep it on one line. - The output contains dots before
Register with
..., is that intentional? It feels strange.
. Register with subscription-manager
# subscription-manager register
. Register with insights-client
# insights-client --register
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 was typing up my review but you beat me to it @m-horky !
I have the same thoughts as Matyas here, and I believe there are supposed to be numbers preceding the dots:
1. Register with subscription-manager
# subscription-manager register
2. Register with insights-client
# insights-client --register
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.
Hi,
Number typos are corrected.
Displaying of new/old message about cert/basic auth method is now treated by else-if statement checking value of config.authmethod
.
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.
Thanks, I'll review this soon 👍
Hi, I ran into some minor issues when testing this PR and I wanted to confirm if you're getting the same results. Let's break down the expected scenarios:
For this scenario, when sub-man is not registered and the insights config is set to use cert auth Likewise I tested the opposite, when the system is configured for basic auth and not registered with sub-man, I believe the output should remain the same as it was before but instead the new text changes are displayed.
For this scenario, when sub-man is registered and the insights config is set to use cert auth it works as expected. However I tested the opposite here as well, when the system is configured for basic auth and registered with sub-man, the output should remain the same as it was before but the new text changes from scenario 1 are displayed. tl;dr - |
fc5bc33
to
3c3092d
Compare
Update: I've checked with Christian and the expected output for the behaviour of a system configured with basic auth should remain as it was (just a confirmation for what I mentioned in my review above ^^). |
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.
LGTM after recent changes. 😄
Let's also check if this line is needed or not before we try to get this merged:
Machine-id found, insights-client can not be registered. Please, unregister insights-client first: `insights-client --unregister`
It doesn't mention it explicitly in the done criteria of this card, but let's make sure.
For systems not registered or failing to upload, the suggested instructions are not appropriate. Replace outdated suggestions if system is not registered or failing to upload. CARD ID: CCT-265 Signed-off-by: Martin Grünwald <[email protected]>
3c3092d
to
8dbb619
Compare
For systems not registered or failing to upload, the suggested instructions are not appropriate. Replace outdated suggestions if system is not registered or failing to upload.
CARD ID: CCT-265
All Pull Requests:
Check all that apply:
Complete Description of Additions/Changes:
I updated instructions of the insights-client output.
I replaced outdated suggestions if system is not registered or failing to upload with new one provided in Jira card for issue CCT-265.