Issue #2662 has been updated by Sven Mueller.
David Lutterkort wrote:
> Thomas Bellman wrote:
> > There's one problem with moving the architecture from the package name to a
> > new arch parameter: as Puppet is today, it makes it difficult to install
> > multiple architectures of a package.
> >
> > One might allow an array as arch parameter, but that still makes it
> > difficult to manage the different packages from different parts of the
> > manifests.
>
> Thanks Thomas for reminding me of why I didn't do that right off the bat - I
> couldn't remember why I initially dismissed an arch parameter, but I believe
> that was it.
Problem here is: As puppet is today, it _doesn't_ make it hard to install
multiple architectures of the same package. To the contrary: It makes it hard
to install only a single architecture. Because with RedHat, if you don't
specify an architecture, it will install all available architectures of the
package. And this behaviour along with the wish to control the version of the
package that is being installed is what caused us stumbling over this bug.
And to be honest: If I want to install two different architectures of the same
package (I don't know any CPU architecture that would be able to natively
support more than two package architectures), I still want them to be of the
same version (or handled the same at that).
Though I understand the difficulty (having two package definitions that would
have the same title if you minimize the amount of text in the manifest), I
would still favour having an arch parameter. You could still do
package { "yum.i386":
arch => "i386",
name => "yum",
ensure => latest,
}
to have different titles for different architectures if need be. But I would
really prefer an arch parameter (which I could set a default for to
$architecture, so that only the main system architecture is installed by
default), which would accept an array to support multiple architectures.
Regards,
Sven
----------------------------------------
Bug #2662: Yum package arch and version ensuring failing
http://projects.reductivelabs.com/issues/2662
Author: David Ward
Status: Needs more information
Priority: Normal
Assigned to: David Lutterkort
Category: package
Target version: Rowlf
Affected version: 0.24.7
Keywords: yum provider version arch ensure
Branch:
After lots of trial and error I found a bug in our current Puppet version
Having a package line like so:
package { "firefox.x86_64": ensure => "3.0.12-1.el5.centos", require =>
Package["xulrunner.x86_64"] }
Would fail with debug output:
*_
debug:
//Node[om012274.drd.int]/workstation/workstation_centos53/mozillasuite53/Package[firefox.x86_64]:
Changing ensure
debug:
//Node[om012274.drd.int]/workstation/workstation_centos53/mozillasuite53/Package[firefox.x86_64]:
1 change(s)
debug: Package[firefox.x86_64](provider=yum): Ensuring => 3.0.12-1.el5.centos
debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -d 0 -e 0 -y
install firefox.x86_64-3.0.12-1.el5.centos'
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q
firefox.x86_64 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}|
%{VERSION} %{RELEASE}
%{ARCH}
'
err:
//Node[om012274.drd.int]/workstation/workstation_centos53/mozillasuite53/Package[firefox.x86_64]/ensure:
change from absent to 3.0.12-1.el5.centos failed: Could
not update: Could not find package firefox.x86_64 at
/etc/puppet/manifests/CentOS.pp:149_*
It didn't matter if I listed ver-release or just ver, same sort of error; it
appends the version-[release] to the package name and arch. Which obviously
fails as yum packages must be referred to like so:
name
name.arch
name-ver
name-ver-rel
name-ver-rel.arch
name-epoch:ver-rel.arch
epoch:name-ver-rel.arch
So if I omitted the arch and changed the line to:
package { "firefox": ensure => "3.0.12-1.el5.centos", require =>
Package["xulrunner.x86_64"] }
We would have more success with the 64bit version but it would try and bring
the 32bit Firefox version too along with its dependencies. Not what I wanted.
*_debug: Package[firefox](provider=yum): Ensuring => 3.0.12-1.el5.centos.x86_64
debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -d 0 -e 0 -y
install firefox-3.0.12-1.el5.centos.x86_64'
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q firefox
--nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION}
%{RELEASE} %{ARCH}
'
err:
//Node[om012274.drd.int]/workstation/workstation_centos53/mozillasuite53/Package[firefox]/ensure:
change from 3.0.12-1.el5.centos to 3.0.12-1.el5.centos.x86_64 failed: Could
not update: Failed to update to version 3.0.12-1.el5.centos.x86_64, got version
3.0.12-1.el5.centos instead at /etc/puppet/manifests/CentOS.pp:149_*
So chatting on IRC and more trial and error I found this is the only way to get
it to work:
package { "firefox-3.0.12-1.el5.centos.x86_64": ensure => "present", require
=> Package["xulrunner.x86_64"] }
So this side-steps puppets version management though.
This may be fixed in a newer version. I haven't tried yet.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://reductivelabs.com/redmine/my/account
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---