-
Notifications
You must be signed in to change notification settings - Fork 184
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 register no machine-id #3554
Feat register no machine-id #3554
Conversation
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. Only some interrogations.
|
||
# check registration with API | ||
check = get_registration_status(config, pconn) | ||
|
||
if machine_id_present and check['status'] is False: |
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.
Would prefer:
if machine_id_present and not check['status']:
insights/client/phase/v1.py
Outdated
# create a machine id first thing. we'll need it for all uploads | ||
logger.debug('Machine ID: %s', client.get_machine_id()) | ||
logger.debug("CONFIG: %s", config) | ||
print_egg_versions() |
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 logging all the available eggs' versions here?
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 wanted to maintain the structure of the logs, but I think it can be done first in this phase
insights/client/phase/v1.py
Outdated
# create a machine id first thing. we'll need it for all uploads | ||
logger.debug('Machine ID: %s', client.get_machine_id()) | ||
logger.debug("CONFIG: %s", config) | ||
print_egg_versions() |
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.
ditto
insights/client/phase/v1.py
Outdated
# create a machine id first thing. we'll need it for all uploads | ||
logger.debug('Machine ID: %s', client.get_machine_id()) | ||
logger.debug("CONFIG: %s", config) | ||
print_egg_versions() |
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.
ditto
Changes works as stated in description. While machine-id file exists client will fail with error message. Unregistering client deletes machine-id file. In BZ is also stated if the "--force" flag is also provided, print a message explaining what will happen, ask the user to confirm whether to proceed, and continue only if the user types "y" - this feature doesn't work. |
I did not introduce the |
…ered insights-client fails executing Signed-off-by: ahitacat <[email protected]>
Signed-off-by: ahitacat <[email protected]>
* Registration mechanism looks for machine-id file and if is not registered insights-client fails executing * Test to check this new logic Signed-off-by: ahitacat <[email protected]>
* Registration mechanism looks for machine-id file and if is not registered insights-client fails executing * Test to check this new logic Signed-off-by: ahitacat <[email protected]>
All Pull Requests:
Check all that apply:
Complete Description of Additions/Changes:
If insights-client is not register and there is a machine-id file in the system the registration process should fail.
It prints a new message asking to unregister the system again.
This resolves: rhbz#2071093