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

Refs #37179 - explicitly include SelectiveClone in facets #10084

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Mar 11, 2024

That way plugins that try to use Hostgroup.include don't fail with

undefined method `include_in_clone' for Hostgroup

@evgeni
Copy link
Member Author

evgeni commented Mar 11, 2024

I've verified this unblocks nightly using packit:

% ansible-playbook pipelines/install_pipeline.yml -e pipeline_os=centos9-stream -e pipeline_version=nightly -e pipeline_type=foreman -e '{"packit_prs":["theforeman/foreman/10084"]}'                          

TASK [bats : Run bats] ********************************************************************************************************************************
changed: [pipe-foreman-server-nightly-centos9-stream] => (item=fb-verify-packages.bats)
changed: [pipe-foreman-server-nightly-centos9-stream] => (item=fb-test-foreman.bats)
changed: [pipe-foreman-server-nightly-centos9-stream] => (item=fb-test-puppet.bats)
changed: [pipe-foreman-server-nightly-centos9-stream] => (item=fb-test-backup.bats)
changed: [pipe-foreman-server-nightly-centos9-stream] => (item=fb-verify-selinux.bats)

TASK [bats : Output test results] *********************************************************************************************************************************
ok: [pipe-foreman-server-nightly-centos9-stream] => 
  msg: |-
    1..1
    ok 1 centos9-stream install: verify no rh-ruby24, rh-ruby25, tfm-ror51 or tfm-ror52 SCL packages # skip SCL package checks only applicable on EL 7 systems
    1..5
    ok 1 centos9-stream install: assert correct Foreman version is installed # skip FOREMAN_EXPECTED_VERSION is not set, not asserting
    ok 2 centos9-stream install: check service status
    ok 3 centos9-stream install: check web app is up
    ok 4 centos9-stream install: check hammer ping
    ok 5 centos9-stream install: check smart proxy is registered
    1..11
    ok 1 centos9-stream install: enable puppet feature # skip Enabling Puppet explicitly is only needed with Katello 4.3+
    ok 2 centos9-stream install: check smart proxy is registered
    ok 3 centos9-stream install: assert puppet version
    ok 4 centos9-stream install: wake up puppet agent
    ok 5 centos9-stream install: check host is registered
    ok 6 centos9-stream install: install puppet module
    ok 7 centos9-stream install: import motd puppet class
    ok 8 centos9-stream install: assign puppet-environment to default taxonomies
    ok 9 centos9-stream install: assign puppet class to host
    ok 10 centos9-stream install: apply class with puppet agent
    ok 11 centos9-stream install: ensure there is a report for Puppet
    1..7
    ok 1 centos9-stream install: prepare system
    ok 2 centos9-stream install: perform offline backup
    ok 3 centos9-stream install: check offline backup contests for Foreman
    ok 4 centos9-stream install: check offline backup contents for Katello # skip Katello specific test
    ok 5 centos9-stream install: perform online backup
    ok 6 centos9-stream install: check online backup contests for Foreman
    ok 7 centos9-stream install: check online backup contents for Katello # skip Katello specific test
    1..1
    ok 1 centos9-stream install: ensure no SELinux denials

@sbernhard
Copy link
Contributor

Actually, my productive system with #10055 did not break but appliying this PR didn't cause another issue. So, would be happy to merge this. :-)

@evgeni
Copy link
Member Author

evgeni commented Mar 11, 2024

Actually, my productive system with #10055 did not break

Which plugins are installed? This only happens if you have a plugin that does smth like Hostgroup.include ForemanPuppet::Extensions::Hostgroup (and that extension uses include_in_clone?)

@sbernhard
Copy link
Contributor

Actually, my productive system with #10055 did not break

Which plugins are installed? This only happens if you have a plugin that does smth like Hostgroup.include ForemanPuppet::Extensions::Hostgroup (and that extension uses include_in_clone?)

I have foreman_puppet running:

models/concerns/foreman_puppet/extensions/host.rb:        include_in_clone puppet: %i[config_groups host_config_groups host_classes]
models/concerns/foreman_puppet/extensions/hostgroup.rb:        include_in_clone puppet: %i[host_config_groups config_groups hostgroup_classes]

@evgeni
Copy link
Member Author

evgeni commented Mar 11, 2024

Interesting. Once I install foreman_ansible on my reproducer, it does not reproduce this issue anymore.

That way plugins that try to use Hostgroup.include don't fail with

    undefined method `include_in_clone' for Hostgroup
@evgeni evgeni changed the title Refs #37179 - load SelectiveClone earlier Refs #37179 - explicitly include SelectiveClone in facets Mar 11, 2024
@ShimShtein ShimShtein merged commit 59ddb0f into theforeman:develop Mar 11, 2024
40 checks passed
@ShimShtein
Copy link
Member

Merged, thanks @evgeni !

@evgeni evgeni deleted the selectiveclone branch March 11, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants