Hi, I have a simple use case, but can''t get the dependency resolution to work on first run. This is not critical, but I want to understand what''s going on. Here''s the szenario: * puppet --version: 2.6.4 * on the bare system, I have vim 6.4 installed (no vim-base) * I first want to upgrade to the latest version in repo, which is 7.1, * and then install vim extensions for 7.1 (vim-enhanced, vim-data) My definition: class packages::vim { $addons = ["vim-enhanced.x86_64", "vim-data.x86_64"] package { "vim.x86_64": ensure => latest, require => Class["yum::repos"], before => Package[$addons], } package { $addons: ensure => present, } } The agent complains that vim-base-7.1 is not compatible with the installed vim-6.4 (vim-base is needed for the addons). This would not be a problem if the vim would be updated to 7.1 "before". (* I run puppet agent --test to see what happens on every run) * So, this fails on first run. * On second run, vim updates from 7.1 and installs $addons. * Sometimes, a third run is needed to install the $addons. From the command line, a "yum update vim" shows the following dependencies: * updating: vim => 7.1 * installing for dependencies: vim-base => 7.1 So, vim-7.1 has vim-base-7.1 as dependency, which is not compatible with the installed vim-6.4. Should I include a package vim-base in the manifest? Or is yum (2.4.2) wrong here? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 01/12/2011 11:30 AM, Sven Sporer wrote:> Hi, I have a simple use case, but can''t get the dependency resolution > to work on first run. This is not critical, but I want to understand > what''s going on. Here''s the szenario: > > * puppet --version: 2.6.4 > * on the bare system, I have vim 6.4 installed (no vim-base) > * I first want to upgrade to the latest version in repo, which is 7.1, > * and then install vim extensions for 7.1 (vim-enhanced, vim-data) > > My definition: > > class packages::vim { > $addons = ["vim-enhanced.x86_64", "vim-data.x86_64"] > > package { "vim.x86_64": > ensure => latest, > require => Class["yum::repos"], > before => Package[$addons], > } > > package { $addons: > ensure => present, > } > } > > The agent complains that vim-base-7.1 is not compatible with the > installed vim-6.4 (vim-base is needed for the addons). This would not > be a problem if the vim would be updated to 7.1 "before". > > (* I run puppet agent --test to see what happens on every run) > * So, this fails on first run. > * On second run, vim updates from 7.1 and installs $addons. > * Sometimes, a third run is needed to install the $addons. > > From the command line, a "yum update vim" shows the following > dependencies: > * updating: vim => 7.1 > * installing for dependencies: vim-base => 7.1 > > So, vim-7.1 has vim-base-7.1 as dependency, which is not compatible > with the installed vim-6.4. Should I include a package vim-base in the > manifest? Or is yum (2.4.2) wrong here? >So one of your dependencies has a conflict. Does yum not resolve this for you automatically? To play it safe, you could ensure the offending vim-6 related packages be absent before installing vim7. Cheers, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Jan 12, 2011, at 2:30 AM, Sven Sporer wrote:> Hi, I have a simple use case, but can''t get the dependency resolution > to work on first run. This is not critical, but I want to understand > what''s going on. Here''s the szenario: > > * puppet --version: 2.6.4 > * on the bare system, I have vim 6.4 installed (no vim-base) > * I first want to upgrade to the latest version in repo, which is 7.1, > * and then install vim extensions for 7.1 (vim-enhanced, vim-data) > > My definition: > > class packages::vim { > $addons = ["vim-enhanced.x86_64", "vim-data.x86_64"] > > package { "vim.x86_64": > ensure => latest, > require => Class["yum::repos"], > before => Package[$addons], > } > > package { $addons: > ensure => present, > } > } > > The agent complains that vim-base-7.1 is not compatible with the > installed vim-6.4 (vim-base is needed for the addons). This would not > be a problem if the vim would be updated to 7.1 "before". > > (* I run puppet agent --test to see what happens on every run) > * So, this fails on first run. > * On second run, vim updates from 7.1 and installs $addons. > * Sometimes, a third run is needed to install the $addons.This makes no sense to me that the last doesn''t always work. Someone might come up with an answer, but logs with "--verbose --debug" would probably help. Even if you sanitize it with "grep vim" it would probably help a lot. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Jan 12, 12:27 pm, Patrick <kc7...@gmail.com> wrote:> On Jan 12, 2011, at 2:30 AM, Sven Sporer wrote: > > > > > > > > > > > Hi, I have a simple use case, but can''t get the dependency resolution > > to work on first run. This is not critical, but I want to understand > > what''s going on. Here''s the szenario: > > > * puppet --version: 2.6.4 > > * on the bare system, I have vim 6.4 installed (no vim-base) > > * I first want to upgrade to the latest version in repo, which is 7.1, > > * and then install vim extensions for 7.1 (vim-enhanced, vim-data) > > > My definition: > > > class packages::vim { > > $addons = ["vim-enhanced.x86_64", "vim-data.x86_64"] > > > package { "vim.x86_64": > > ensure => latest, > > require => Class["yum::repos"], > > before => Package[$addons], > > } > > > package { $addons: > > ensure => present, > > } > > } > > > The agent complains that vim-base-7.1 is not compatible with the > > installed vim-6.4 (vim-base is needed for the addons). This would not > > be a problem if the vim would be updated to 7.1 "before". > > > (* I run puppet agent --test to see what happens on every run) > > * So, this fails on first run. > > * On second run, vim updates from 7.1 and installs $addons. > > * Sometimes, a third run is needed to install the $addons. > > This makes no sense to me that the last doesn''t always work. Someone might come up with an answer, but logs with "--verbose --debug" would probably help. Even if you sanitize it with "grep vim" it would probably help a lot.What do you mean by "the last"? Everything is installed as intended after the third run. Sometimes, even after the second run. So I''m not really sure what causes this inconsistency, but it has something to do with yum dependency resolution and the dependencies as defined in the manifest. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Bruce Richardson
2011-Jan-12 12:15 UTC
Re: [Puppet Users] Re: Dependency resolution for packages
On Wed, Jan 12, 2011 at 03:43:42AM -0800, Sven Sporer wrote:> > This makes no sense to me that the last doesn''t always work. > > Someone might come up with an answer, but logs with "--verbose > > --debug" would probably help. Even if you sanitize it with "grep > > vim" it would probably help a lot. > > What do you mean by "the last"? Everything is installed as intended > after the third run. Sometimes, even after the second run.That''s what he means. Why this inconsistency?> So I''m not > really sure what causes this inconsistency, but it has something to do > with yum dependency resolution and the dependencies as defined in the > manifest.Are you sure that all the machines were in precisely the same state with regard to packages before the upgrades? -- Bruce Get thee behind me, Stan: for it is written, thou hast gotten me into another fine mess. -- Oliver 4:8 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> > What do you mean by "the last"? Everything is installed as intended > > after the third run. Sometimes, even after the second run. > > That''s what he means. Why this inconsistency? > > > So I''m not > > really sure what causes this inconsistency, but it has something to do > > with yum dependency resolution and the dependencies as defined in the > > manifest. > > Are you sure that all the machines were in precisely the same state > with regard to packages before the upgrades?100% sure, as those runs are based on a snapshot on the same virtual machine. I reset to the snapshot after testing this, so the baseline is the same. You''re right anyway, because I think that inconsistency is due to me updating the manifests and not restarting the puppet master. I can''t reproduce the need for a third run now. The initial problem still stands: why do I need a second run? What changes in between for the client? Or should I blame it on this version of yum? ;) Here''s the log output: http://pastie.org/1452205 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Jan 12, 7:09 am, Sven Sporer <s...@intothespirit.com> wrote: [...]> The initial problem still stands: why do I need a second run? What > changes in between for the client? Or should I blame it on this > version of yum? ;) > > Here''s the log output:http://pastie.org/1452205The log shows Puppet attempting to install Package[vim-data] and Package[vim-base] before it updates Package[vim]. It follows that resource dependencies are not being set up properly. Does anything change if you replace your current vim resource with this: package { "vim.x86_64": ensure => latest, require => Class["yum::repos"], before => [ Package["vim-enhanced.x86_64"], Package["vim- data.x86_64"] ] } ? John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Maybe Matching Threads
- vim-puppet syntax highlight
- Generate YARD docs for modulepath
- Package Source Definition
- SLES11: facter without arguments produces Error: uninitialized constant Facter::IPAddress
- Could not evaluate: Could not retrieve information from environment production source(s) for one module, for other is ok