Skip to content
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

Fixes #27840 - Setting to toggle host profile stealing #8344

Merged
merged 1 commit into from Sep 17, 2019

Conversation

jturel
Copy link
Member

@jturel jturel commented Sep 11, 2019

To test:

  • register a client to your dev box with this PR checked out
  • subscription-manager clean on the client and change its DMI UUID:
echo '{"dmi.system.uuid": "this-is-made-up1"}' > /etc/rhsm/facts/uuid.facts
  • re-register the client. it should succeed (crux of this change) as long as the client's DMI UUID is unique across hosts.

To test the reverse: toggle the new Host Profile Assume setting to false. Repeating the test (with a new UUID) will result in a registration error

@theforeman-bot
Copy link

There were the following issues with the commit message:

  • 4de2701 must be in the format fixes #redmine_number - brief description

If you don't have a ticket number, please create an issue in Redmine.

More guidelines are available in Coding Standards or on the Foreman wiki.


This message was auto-generated by Foreman's prprocessor

@jturel jturel changed the title provide setting for registration steal Fixes #27840 - Setting to toggle host profile stealing Sep 11, 2019
@jturel jturel marked this pull request as ready for review September 11, 2019 21:08
@@ -137,6 +137,9 @@ def self.load_defaults
N_("If hosts fail to register because of duplicate DMI UUIDs " \
"add their comma-separated values here. Subsequent registrations will generate a unique DMI UUID for the affected hosts."),
[], N_('Host Duplicate DMI UUIDs')),
self.set('host_profile_steal', N_("Allow new Host registrations to overtake registered profiles with matching hostname " \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about "host_profile_assume" and: "Allow new Host registrations to assume registered profiles with matching hostname as long as the registering DMI UUID is unique."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated!

@jturel
Copy link
Member Author

jturel commented Sep 12, 2019

@mccun934 ACK ?

@jlsherrill jlsherrill self-assigned this Sep 17, 2019
@@ -137,6 +137,9 @@ def self.load_defaults
N_("If hosts fail to register because of duplicate DMI UUIDs " \
"add their comma-separated values here. Subsequent registrations will generate a unique DMI UUID for the affected hosts."),
[], N_('Host Duplicate DMI UUIDs')),
self.set('host_profile_assume', N_("Allow new Host registrations to assume registered profiles with matching hostname " \
"as long as the registering DMI UUID is unique."),
true, N_('Host Profile Assume')),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to understand this wording. "as long as registering DMI uuid is unique". Do you mean 'unique other than the host its taking' ? I assume it already would take the host's profile if its uuid matched that, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct! It's kind of a strange behavior to articulate. Let me know if you have a suggestion

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"as long as the registering DMI UUID is not used by another host" ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with that, updating

@jturel
Copy link
Member Author

jturel commented Sep 17, 2019

@jlsherrill updated!

Copy link
Member

@jlsherrill jlsherrill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, ACK based on @mccun934's testing

@jturel jturel merged commit 7f28e8d into Katello:master Sep 17, 2019
@jturel jturel deleted the profile_steal_setting branch September 17, 2019 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants