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 #32100 - Unable to set HostGroup content source to capsule that isn't synced #9232

Merged

Conversation

ianballou
Copy link
Member

@ianballou ianballou commented Mar 16, 2021

Hosts don't validate that the content source and lifecycle environment match, so host groups shouldn't need to either.

To see the validation in action:

  1. Load up the foreman console
  2. Create a lifecycle environment and a pulp node smart proxy
  3. Make a hostgroup (note that if you try to make a mismatched LCE and content source, the hostgroup creation will silently fail. This might be due to a create vs create! situation.)
  4. Create a new hostgroup content facet like so:
::Katello::Hostgroup::ContentFacet.create!(hostgroup_id: <hostgroup_id>, kickstart_repository_id: nil, content_source_id: <mismatched_content_source_id>, content_view_id: nil, lifecycle_environment_id: <mismatched_LCE_id>)
  1. See the error "The selected content source and lifecycle environment do not match".

@theforeman-bot
Copy link

Issues: #32100

@ianballou
Copy link
Member Author

[test katello]

1 similar comment
@ianballou
Copy link
Member Author

[test katello]

Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

ACK, works great!

@ianballou ianballou merged commit 80aa661 into Katello:master Mar 23, 2021
@ianballou ianballou deleted the 32100-hostgroup-capsule-not-synced branch March 23, 2021 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants