I''m a relative new user to puppet. puppet on the client is returning the error below. [root@voip01 ~]# puppetd -d --no-daemonize -vvv --test --onetime --trace <lots of stuff removed> warning: Not using cache on failed catalog warning: Configuration could not be instantiated: Could not find dependency Yumrepo[base] for Exec[yum-update] at /etc/puppet/modules/update/manifests/init.pp:51 The relevant section, around line 51, in init.pp has: exec { "yum-update": command => "yum -y --exclude=jdk --exclude=kernel* update", tag => "production_update", require => [ Exec["yum_clean"], Yumrepo["base"], Yumrepo["Centos4 os"], Yumrepo["Centos4 Updates"], Yumrepo["RPMforge"], Yumrepo["jpackage"], Yumrepo["jpackage-el4"], Yumrepo["zeroc-ice"], Yumrepo["updates"], Yumrepo["addons"], Yumrepo["extras"], Yumrepo["centosplus"], Yumrepo["contrib"], Yumrepo["c4-media"] ], } /etc/yum.repos.d/config.repo: [base] name=base baseurl=http://192.168.1.21/mrepo/centos4-$basearch/RPMS.base enabled=1 gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 and, finally: [root@voip01 yum.repos.d]# yum repolist | grep base base base enabled What am I missing here? What''s puppet''s issue with the base repo? -- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Douglas, The bigger question, why are you using exec to update via yum?? There is a ''package'' type that will do this for you. exec shouldn''t be used for what you are trying to do.\ -L -- Larry Ludwig Reductive Labs --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Douglas Garstang
2009-Aug-13 19:29 UTC
[Puppet Users] Re: "Could not find dependency Yumrepo"
Hi Larry. I don''t know why we are using exec to update via yum. This was implemented by come consultants, and it has to be kept this way. It''s been working in production for quite some time. I am merely trying to replicate the production setup in a dev environment. Douglas. On Thu, Aug 13, 2009 at 12:25 PM, Larry Ludwig<larry@reductivelabs.com> wrote:> > Hi Douglas, > > The bigger question, why are you using exec to update via yum?? > > There is a ''package'' type that will do this for you. exec shouldn''t > be used for what you are trying to do.\ > > -L > > -- > Larry Ludwig > Reductive Labs > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Going back to your original question, the error you are getting: Means it cannot find Yumrepo["base"] in your type list. maybe it was renamed, or not included. -L -- Larry Ludwig Reductive Labs --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Douglas Garstang
2009-Aug-13 20:06 UTC
[Puppet Users] Re: "Could not find dependency Yumrepo"
Larry, if you mean that puppet can''t find the ''base'' repo, it should be there and accessible. That''s why I posted the contents of the repo file, and the output of ''yum repolist''. It also sounded like you were saying that the Yumrepo type wasn''t found, which I don''t understand, since it''s a standard type. Actually, the docs at http://reductivelabs.com/trac/puppet/wiki/TypeReference#package say that the repo''s that Yumrepo can see are determined by reposdir in /etc/yum.conf. Since our production environment doesn''t have reposdir defined, but everything still works fine, I''m wondering if the docs are out of date. How does yumrepo determine if a repo is available or not? Doug. On Thu, Aug 13, 2009 at 12:58 PM, Larry Ludwig<larry@reductivelabs.com> wrote:> Going back to your original question, the error you are getting: > Means it cannot find Yumrepo["base"] in your type list. > maybe it was renamed, or not included. > > -L > -- > Larry Ludwig > Reductive Labs > > > >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 --~--~---------~--~----~------------~-------~--~----~ 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 Aug 13, 2009, at 4:06 PM, Douglas Garstang wrote:> > Larry, > > if you mean that puppet can''t find the ''base'' repo, it should be there > and accessible. That''s why I posted the contents of the repo file, and > the output of ''yum repolist''. It also sounded like you were saying > that the Yumrepo type wasn''t found, which I don''t understand, since > it''s a standard type. > > Actually, the docs at > http://reductivelabs.com/trac/puppet/wiki/TypeReference#package say > that the repo''s that Yumrepo can see are determined by reposdir in > /etc/yum.conf. Since our production environment doesn''t have reposdir > defined, but everything still works fine, I''m wondering if the docs > are out of date. How does yumrepo determine if a repo is available or > not? >The code in your puppet, not what''s on the box. Puppet code tells your server how it should be setup, not the other way around. Yumrepo[base] means you should have Puppet code that looks like: yumrepo {''base'': ... } Regards... -L -- Larry Ludwig Reductive Labs --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Douglas Garstang
2009-Aug-13 20:32 UTC
[Puppet Users] Re: "Could not find dependency Yumrepo"
Larry, Ok i see that. I didn''t realise the repo''s were managed inside puppet. So, now, and I saw someone else say this, how do we debug these dependancies? The error isn''t particularly descriptive, and if it''s failing because of (non mentioned) dependancy, how do we track it down? Doug. On Thu, Aug 13, 2009 at 1:12 PM, Larry Ludwig<larry@reductivelabs.com> wrote:> > On Aug 13, 2009, at 4:06 PM, Douglas Garstang wrote: > > Larry, > > if you mean that puppet can''t find the ''base'' repo, it should be there > and accessible. That''s why I posted the contents of the repo file, and > the output of ''yum repolist''. It also sounded like you were saying > that the Yumrepo type wasn''t found, which I don''t understand, since > it''s a standard type. > > Actually, the docs at > http://reductivelabs.com/trac/puppet/wiki/TypeReference#package say > that the repo''s that Yumrepo can see are determined by reposdir in > /etc/yum.conf. Since our production environment doesn''t have reposdir > defined, but everything still works fine, I''m wondering if the docs > are out of date. How does yumrepo determine if a repo is available or > not? > > > The code in your puppet, not what''s on the box. Puppet code tells your > server how it should be setup, not the other way around. > Yumrepo[base] means you should have Puppet code that looks like: > yumrepo {''base'': > ... > } > Regards... > -L > -- > Larry Ludwig > Reductive Labs > > > >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 --~--~---------~--~----~------------~-------~--~----~ 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 Aug 13, 2009, at 4:32 PM, Douglas Garstang wrote:> > Larry, > > Ok i see that. I didn''t realise the repo''s were managed inside puppet. > > So, now, and I saw someone else say this, how do we debug these > dependancies? The error isn''t particularly descriptive, and if it''s > failing because of (non mentioned) dependancy, how do we track it > down?The error: warning: Configuration could not be instantiated: Could not find dependency Yumrepo[base] for Exec[yum-update] at Means it''s cannot find that type in your puppet code for the Exec type. Either: - the type is not defined - you don''t have an ''include'' to the puppet .pp file that has this type in it. Regards.. -L -- Larry Ludwig Reductive Labs --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Douglas Garstang
2009-Aug-13 20:56 UTC
[Puppet Users] Re: "Could not find dependency Yumrepo"
Larry, I guess I''m really confused then. This config works in prod, and: manifests/site.pp: -------------------------- import "update" ... Exec { path => "/usr/bin:/usr/sbin/:/bin:/sbin" } modules/update/manifests/init.pp: ------------------------------------------------- exec { "yum-update": command => "yum -y --exclude=jdk --exclude=kernel* update", tag => "production_update", require => [ Exec["yum_clean"], Yumrepo["base"], Yumrepo["Centos4 os"], Yumrepo["Centos4 Updates"], Yumrepo["RPMforge"], Yumrepo["jpackage"], Yumrepo["jpackage-el4"], Yumrepo["zeroc-ice"], Yumrepo["updates"], Yumrepo["addons"], Yumrepo["extras"], Yumrepo["centosplus"], Yumrepo["contrib"], Yumrepo["c4-media"] ], } site.pp defines Exec and imports the update module, which calls Exec. Doug. On Thu, Aug 13, 2009 at 1:41 PM, Larry Ludwig<larry@reductivelabs.com> wrote:> > On Aug 13, 2009, at 4:32 PM, Douglas Garstang wrote: > > Larry, > > Ok i see that. I didn''t realise the repo''s were managed inside puppet. > > So, now, and I saw someone else say this, how do we debug these > dependancies? The error isn''t particularly descriptive, and if it''s > failing because of (non mentioned) dependancy, how do we track it > down? > > The error: > warning: Configuration could not be instantiated: Could not find > dependency Yumrepo[base] for Exec[yum-update] at > Means it''s cannot find that type in your puppet code for the Exec type. > Either: > - the type is not defined > - you don''t have an ''include'' to the puppet .pp file that has this type in > it. > Regards.. > -L > -- > Larry Ludwig > Reductive Labs > > > >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Douglas Garstang
2009-Aug-13 21:13 UTC
[Puppet Users] Re: "Could not find dependency Yumrepo"
Actually, the more I read this, the more it seems to indicate to me that the problem is with the Yumrepo, NOT the Exec. It does say after all "Could not find dependency Yumrepo[base]" ---FOR--- "Exec[yum-update]"... Doug. On Thu, Aug 13, 2009 at 1:56 PM, Douglas Garstang<doug.garstang@gmail.com> wrote:> Larry, > > I guess I''m really confused then. This config works in prod, and: > > manifests/site.pp: > -------------------------- > import "update" > ... > Exec { path => "/usr/bin:/usr/sbin/:/bin:/sbin" } > > > modules/update/manifests/init.pp: > ------------------------------------------------- > exec { "yum-update": > command => "yum -y --exclude=jdk --exclude=kernel* update", > tag => "production_update", > require => [ > Exec["yum_clean"], > Yumrepo["base"], > Yumrepo["Centos4 os"], > Yumrepo["Centos4 Updates"], > Yumrepo["RPMforge"], > Yumrepo["jpackage"], > Yumrepo["jpackage-el4"], > Yumrepo["zeroc-ice"], > Yumrepo["updates"], > Yumrepo["addons"], > Yumrepo["extras"], > Yumrepo["centosplus"], > Yumrepo["contrib"], > Yumrepo["c4-media"] > ], > } > > site.pp defines Exec and imports the update module, which calls Exec. > > Doug. > > On Thu, Aug 13, 2009 at 1:41 PM, Larry Ludwig<larry@reductivelabs.com> wrote: >> >> On Aug 13, 2009, at 4:32 PM, Douglas Garstang wrote: >> >> Larry, >> >> Ok i see that. I didn''t realise the repo''s were managed inside puppet. >> >> So, now, and I saw someone else say this, how do we debug these >> dependancies? The error isn''t particularly descriptive, and if it''s >> failing because of (non mentioned) dependancy, how do we track it >> down? >> >> The error: >> warning: Configuration could not be instantiated: Could not find >> dependency Yumrepo[base] for Exec[yum-update] at >> Means it''s cannot find that type in your puppet code for the Exec type. >> Either: >> - the type is not defined >> - you don''t have an ''include'' to the puppet .pp file that has this type in >> it. >> Regards.. >> -L >> -- >> Larry Ludwig >> Reductive Labs >> >> >> >> > > > > -- > Regards, > > Douglas Garstang > http://www.linkedin.com/in/garstang > Email: doug.garstang@gmail.com > Cell: +1-805-340-5627 >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 --~--~---------~--~----~------------~-------~--~----~ 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 Aug 13, 2009, at 5:13 PM, Douglas Garstang wrote:> > Actually, the more I read this, the more it seems to indicate to me > that the problem is with the Yumrepo, NOT the Exec. It does say after > all "Could not find dependency Yumrepo[base]" ---FOR--- > "Exec[yum-update]"... >Correct. -L -- Larry Ludwig Reductive Labs --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---