theforeman / puppet-pulpcore

Puppet module for setting up Pulp 3 as part of Katello installation
GNU General Public License v3.0
2 stars 28 forks source link

Ordering issue when adding repository #225

Closed maartenbeeckmans closed 3 years ago

maartenbeeckmans commented 3 years ago

There is a dependency cycle when both pulpcore and pulpcore::repo are added to a node

Manifest file:

include pulpcore
include pulpcore::repo

puppet output:

Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for pulp.example.com
Info: Applying configuration version '1628857635'
Error: Found 1 dependency cycle:
(Anchor[pulpcore::repo] => Class[Pulpcore::Install] => Group[pulp] => User[root] => File[/etc/yum.repos.d/pulpcore.repo] => Anchor[pulpcore::repo])\nCycle graph written to /opt/puppetlabs/puppet/cache/state/graphs/cycles.dot.
Error: Failed to apply catalog: One or more resource dependency cycles detected in graph

Content of /opt/puppetlabs/puppet/cache/state/graphs/cycles.dot

digraph Resource_Cycles {
  label = "Resource Cycles"
"Anchor[pulpcore::repo]" -> "Class[Pulpcore::Install]" -> "Group[pulp]" -> "User[root]" -> "File[/etc/yum.repos.d/pulpcore.repo]" -> "Anchor[pulpcore::repo]"
}
ekohl commented 3 years ago

I wonder why Group[pulp] => User[root] is there. We don't manage the root user so I'm wonder why it's there.

maartenbeeckmans commented 3 years ago

Ah so that's part of my base profile, that was applied to this server that manages root password.

There is an issue when I manage repo and my profile, if I remove it the error is gone. Investigating what's wrong and will report back when I find the results

maartenbeeckmans commented 3 years ago

Found the problem, in my profile that manages local accounts I have this ordering:

Group<||> -> User<||>

Removing this solves the look issue. Not sure if that is something you want to fix here?

If not, this issue can be closed.

maartenbeeckmans commented 3 years ago

Closing now, should not be fixed here. Solved it by adding a tag to the users managed in hiera (where this ordering is needed).