-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
versionlock.list updated after package {} install #43
Comments
|
I've actually ran into the exact same issue today, and have solved it kinda with the same workaround (except I've used the class and "strictly speaking" the concat path could have changed and didn't want to bother with the parameter messup); But when I've started thinking "I should fix this and make a merge request" the only decent solution I could come up with is set an order statement to the Package resource (including provider=yum). But this could potentially harm other dependency cycles etc... In other words, introduce risk. Love to hear anyone's thoughts on this and I'll be happy to prepare a merge request. |
The plugin class `yum::plugin::versionlock` should not be `contain`ed from every instance of the `yum::versionlock` defined type. Doing so makes it impossible to use the type in multiple dependent classes/profiles. `contain` implies that the resource 'owns' the plugin. Using `require` should be just as effective at solving voxpupuli#43 without introducing dependency cycles. With `contain`... ```puppet class profile::foo { yum::versionlock { '0:bash-4.1.2-9.el6_2.*':} } class profile::bar { yum::versionlock { '2:vim-enhanced-7.4.629-6.el7.x86_64':} } include profile::foo include profile::bar Class['profile::foo'] -> Class['profile::bar'] ``` fails with ``` Error: Found 1 dependency cycle: (Augeas[yum.conf_plugins] => Yum::Config[plugins] => Yum::Plugin[versionlock] => Class[Yum::Plugin::Versionlock] => Yum::Versionlock[0:bash-4.1.2-9.el6_2.*] => Class[Profile::Foo] => Class[Profile::Bar] => Yum::Versionlock[2:vim-enhanced-7.4.629-6.el7.x86_64] => Class[Yum::Plugin::Versionlock] => Yum::Plugin[versionlock] => Package[yum-plugin-versionlock] => Yum::Plugin[versionlock])\nTry the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz Error: Failed to apply catalog: One or more resource dependency cycles detected in graph ``` This commit also refactors the type with: * puppet-strings style docs. * A simple `unless` instead of a `case` for `ensure`. * `assert_type` instead of `is_a`. Fixes voxpupuli#43
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Hieradata (working):
Extract from real class (only the non-working part):
What are you seeing
The
versionlock.listfile is updated after package installation.What behaviour did you expect instead
versionlock.listto be updated before package installation.Output log
Workaround
Add
require => Concat['/etc/yum/pluginconf.d/versionlock.list']to package {$pkglist:`.The text was updated successfully, but these errors were encountered: