Issue #11511 has been updated by Stefan Schulte.
After a `git bisect` run I was able to identify the commit that is causing the
change in behaviour: commit:328ff7584e0353a609cba6d9fa08c0b6a26be664
I did some further tests and changed the `architecture` fact
<pre>
diff --git a/lib/facter/architecture.rb b/lib/facter/architecture.rb
index cd606a2..ec00521 100644
--- a/lib/facter/architecture.rb
+++ b/lib/facter/architecture.rb
@@ -18,7 +18,9 @@ Facter.add(:architecture) do
case model
# most linuxen use "x86_64"
when "x86_64"
- case Facter.value(:operatingsystem)
+ os = Facter.value(:operatingsystem)
+ puts "Fact os => #{os}"
+ case os
when "Debian", "Gentoo", "GNU/kFreeBSD"
"amd64"
else
</pre>
Result: before the bad commit the operatingsystem fact can be resolved at that
state
<pre>
Fact os => Gentoo
</pre>
When I then apply commit:328ff7584e0353a609cba6d9fa08c0b6a26be664 the
operatingsystem fact resolves to an empty string at that state and therefore
the architecture fact is set to the `hardwaremodel` fact.
<pre>
Fact os =>
</pre>
However: The final operatingsystem fact that is sent to the puppetmaster
resolves correctly. Maybe we have a loop like »fact a requires fact b requires
fact c requires fact a«?
----------------------------------------
Bug #11511: fact "architecture" picks up x86_64 rather than amd64
https://projects.puppetlabs.com/issues/11511
Author: Srikrishna Das
Status: Investigating
Priority: High
Assignee: Adrien Thebo
Category: library
Target version:
Keywords: puppet, facter, architecture, amd64
Branch:
Affected Facter version: 1.6.2
I have a package resource like this:
<pre>
package { "xen-hypervisor-4.0":
name => "xen-hypervisor-4.0-${::architecture}",
ensure => "installed"
}
</pre>
And my puppet client fails with errors
<pre>
debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package}
${Version}\n''
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W
--showformat '${Status} ${Package} ${Version}\n''
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W
--showformat ${Status} ${Package} ${Version}\n xen-hypervisor-4.0-x86_64'
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/apt-get -q -y -o
DPkg::Options::=--force-confold install xen-hypervisor-4.0-x86_64'
err: /Stage[main]/Xen::Server/Package[xen-hypervisor-4.0]/ensure: change from
purged to present failed: Execution of '/usr/bin/apt-get -q -y -o
DPkg::Options::=--force-confold install xen-hypervisor-4.0-x86_64' returned
100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package xen-hypervisor-4.0-x86_64
E: Couldn't find any package by regex 'xen-hypervisor-4.0-x86_64'
</pre>
The actual package is "xen-hypervisor-4.0-amd64"
The fact "architecture" should be resolving to amd64, but it looks like it
resolves to x86_64.
I was on facter 1.6.3.
I also upgraded my facter to 1.6.4
<pre>
facter --puppet | grep '\(archit\|facterv\|operatings\)'
architecture => amd64
facterversion => 1.6.4
operatingsystem => Debian
operatingsystemrelease => 6.0.3
</pre>
Doesn't help.. Same error still.
I read this:
http://projects.puppetlabs.com/projects/facter/wiki
Quoting:
" Facter 1.6.2:
Fix (4980, 6470) Fix architecture in Darwin and Ubuntu
Architecture now relies on the hardwaremodel fact unless special cased
otherwise, such as for linux distributions that require amd64 as the
expected architecture. Ubuntu was added as a special case, OpenBSD was
collapsed into the current architecture fact and Darwin was added by
removing the kernel confine statement for the architecture fact.
"
So, I'm guessing this isn't fixed for Debian?
--
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://projects.puppetlabs.com/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.