Hi all, I''m on SL5 (something like RH5) and I have something as simple as: package {"libX11-devel.x86_64": } package {"libX11-devel.i386": } Cause I want both versions installed in my system. But on one node: # rpm -qa|grep libX11-devel libX11-devel-1.0.3-9.el5 # yum list libX11-devel* Loaded plugins: kernel-module Excluding Packages from dag Finished Installed Packages libX11-devel.x86_64 1.0.3-9.el5 installed Available Packages libX11-devel.i386 1.0.3-9.el5 sl so the one for i386 is not installed. Seems that puppet thinks that it''s already installed. I''m trying o figure out what it''s doing for checking package presence: # puppetd --test --server server.domain --debug > log # grep libX11-devel log debug: Puppet::Type::Package::ProviderYum: Executing ''/bin/rpm -q libX11-devel.x86_64 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} debug: Puppet::Type::Package::ProviderYum: Executing ''/bin/rpm -q libX11-devel.i386 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} I cannot execute that query: # /bin/rpm -q libX11-devel.x86_64 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} -bash: %{VERSION}: command not found -bash: EPOCH?{%{EPOCH}}:{0}: command not found but the first part of both returns 0: # /bin/rpm -q libX11-devel.i386 --nosignature --nodigest # echo $? 0 # /bin/rpm -q libX11-devel.x86_64 --nosignature --nodigest libX11-devel-1.0.3-9.el5 # echo $? 0 Our yum version: yum-3.2.19-25.sl So, anyone could help me to understand why puppet cannot install both packages? Cheers, Arnau --~--~---------~--~----~------------~-------~--~----~ 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 Sep 29, 6:04 am, Arnau Bria <arnaub...@pic.es> wrote:> I''m on SL5 (something like RH5) and I have something as simple as: > package {"libX11-devel.x86_64": } > package {"libX11-devel.i386": } > > Cause I want both versions installed in my system. > > But on one node:[... only the x86_64 package is installed]> I''m trying o figure out what it''s doing for checking package presence: > > # puppetd --test --server server.domain --debug > log > # grep libX11-devel log > debug: Puppet::Type::Package::ProviderYum: Executing ''/bin/rpm -q libX11-devel.x86_64 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} > debug: Puppet::Type::Package::ProviderYum: Executing ''/bin/rpm -q libX11-devel.i386 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} > > I cannot execute that query: > # /bin/rpm -q libX11-devel.x86_64 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} > -bash: %{VERSION}: command not found > -bash: EPOCH?{%{EPOCH}}:{0}: command not found > > but the first part of both returns 0:Because the query format (everything after --qf) contains spaces and shell metacharacters, you must enclose it in quotes to run the command. Either single quotes or double quotes will work, one pair around the entire tail of the command. And no, it is unlikely that this is related to Puppet''s (mis)behavior. It may or may not be important that the full command return 0, but the output on stdout is what Puppet will mainly be looking at.> So, anyone could help me to understand why puppet cannot install both > packages?There is a mismatch between Puppet''s view of package names as a flat name space and RPM''s view of package identifiers as a 5-dimensional space with axes (name, architecture, epoch, version, release). Puppet deals with this in a way that seems reasonable for the majority of cases: it attempts to avoid installing multiple packages having the same RPM name. When neither of your packages is installed, however, Puppet can''t tell that the package "names" you specified are really name.arch, so it passes both on to yum/rpm. Yum and RPM can interpret the names, but they don''t mind installing the two packages side by side. On the other hand, when one or both of the packages is already installed, Puppet can match the package names to installed packages, and thereby decide that it doesn''t need to install the packages. To achieve what you want, you need a custom Package provider that understands architecture codes in package names and allows side-by- side installs. Then you would declare your packages something like package {"libX11-devel.i386": provider => "archyum"} You would provide the "archyum" provider as a plug-in, automatically downloadable from the puppetmaster. I suspect that that provider could be a relatively simple subclass or a slight variant of the standard "yum" provider. 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 -~----------~----~----~----~------~----~------~--~---
On Wed, 30 Sep 2009 07:04:11 -0700 (PDT) jcbollinger jcbollinger wrote:> > So, anyone could help me to understand why puppet cannot install > > both packages? > > There is a mismatch between Puppet''s view of package names as a flat > name space and RPM''s view of package identifiers as a 5-dimensional > space with axes (name, architecture, epoch, version, release). Puppet > deals with this in a way that seems reasonable for the majority of > cases: it attempts to avoid installing multiple packages having the > same RPM name. When neither of your packages is installed, however, > Puppet can''t tell that the package "names" you specified are really > name.arch, so it passes both on to yum/rpm. Yum and RPM can interpret > the names, but they don''t mind installing the two packages side by > side. On the other hand, when one or both of the packages is already > installed, Puppet can match the package names to installed packages, > and thereby decide that it doesn''t need to install the packages.Thanks for the explanation. doing the query correctly ( :-S ), there''s significant differnecse between SL5 (RH5) and SL4 (RH4, where specifying arch worked): # cat /etc/redhat-release Scientific Linux SL release 5.2 (Boron) # /bin/rpm -q perl-DBI.i386 --nosignature --nodigest --qf ''%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}'' package perl-DBI.i386 is not installed # /bin/rpm -q perl-DBI.x86_64 --nosignature --nodigest --qf ''%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}'' package perl-DBI.x86_64 is not installed # cat /etc/redhat-release Scientific Linux SL release 4.8 (Beryllium) # /bin/rpm -q perl-DBI.i386 --nosignature --nodigest --qf ''%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}'' perl-DBI 0 1.607 1.el4.rf i386 # /bin/rpm -q perl-DBI.x86_64 --nosignature --nodigest --qf ''%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}'' perl-DBI 0 1.607 1.el4.rf x86_64 So seems that something has changed in rpm. But if I use yum: # yum list libXpm.i386 Loaded plugins: kernel-module Excluding Packages from dag Finished Installed Packages libXpm.i386 3.5.5-3 installed # yum list libXpm.x86_64 Loaded plugins: kernel-module Excluding Packages from dag Finished Installed Packages libXpm.x86_64 3.5.5-3 installed Yum knows about them. So, if we use yum package provider, isn''t more correct to use yum for querying rpm packages status? I mean, if I use rpm provider, am I going to query with yum? Why mix yum/rpm (ok, yum uses rpm, but they''re diff programs)?> To achieve what you want, you need a custom Package provider that > understands architecture codes in package names and allows side-by- > side installs. Then you would declare your packages something like > > package {"libX11-devel.i386": provider => "archyum"} > > You would provide the "archyum" provider as a plug-in, automatically > downloadable from the puppetmaster. I suspect that that provider > could be a relatively simple subclass or a slight variant of the > standard "yum" provider.It''s a couple of packages, so I''d prefer doing it with an exec. Many thanks for your time,> > JohnCheers, Arnau --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---