Puppet in NFS fools Facter

50 views
Skip to first unread message

Forrie

unread,
Mar 2, 2012, 5:44:53 PM3/2/12
to Puppet Users
I have Puppet mounted to a couple of machines via NFS (along with
Ruby) -- and it works fine. Except, I just noticed that it fools
Facter in to believing it's a physical machine, when in fact one of
them is a VMware host.

We don't really use this setting, but I'm concerned other settings
might not be accurate.

Anyone know why this is happening?


Thanks.

Russell Van Tassell

unread,
Mar 2, 2012, 6:33:33 PM3/2/12
to puppet...@googlegroups.com
Potentially related?

http://projects.puppetlabs.com/issues/10232



--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.


Forrie

unread,
Mar 2, 2012, 6:42:56 PM3/2/12
to Puppet Users
I'm not sure I understand his setup, or what he means by "minimal
install".

My environment on the VMware image is CentOS 5.7, it is a full release
and the NFS mount contains a full release of Puppet and Ruby 1.8.x.

Perhaps there's something that Facter gets wrong when it's being
called from a non-system location?

Another possibility, is the previous run of Puppet was local -- each
machine still has a local /var/lib/puppet layout with all the
information that was stored (I'm not doing storedconfigs, yet).
Could information in there play into this somehow.


Thanks.

Russell Van Tassell

unread,
Mar 2, 2012, 7:13:49 PM3/2/12
to puppet...@googlegroups.com
Any chance you copied over a bare metal box image, or something?

In any case, facter would seem to have only a handful of checks to determine "virtual" or non-virtual... unfortunately I don't have a vmware box in front of me to verify this, but you should be able to find facter's "virtual" tests in some place like:

/usr/lib/ruby/1.[89]/facter/util/virtual.rb

(slightly more convoluted if you're running puppet under rvm)

At first glance, for VMWare, it appears to be looking for /proc/self/status and/or /proc/virtual.




Thanks.

Forrie

unread,
Mar 6, 2012, 3:11:10 PM3/6/12
to Puppet Users
Nothing was copied over. The NFS mount code was built and then
exported; 32- and 64-bit respectively. The code was built from
scratch and installed with the appropriate locally mounted prefix (in
this case, /local).

I'm on RHEL 5.x and we only have /proc/self/status which doesn't seem
to indicate anything about virtual or physical, for example:

Name: cat
State: R (running)
SleepAVG: 88%
Tgid: 1523
Pid: 1523
PPid: 31949
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 256
Groups: 0 1 2 3 4 6 10
VmPeak: 58952 kB
VmSize: 58952 kB
VmLck: 0 kB
VmHWM: 484 kB
VmRSS: 484 kB
VmData: 176 kB
VmStk: 88 kB
VmExe: 20 kB
VmLib: 1448 kB
VmPTE: 40 kB
StaBrk: 06dd2000 kB
Brk: 06df3000 kB
StaStk: 7fffb84776a0 kB
Threads: 1
SigQ: 1/4096
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000000000
SigCgt: 0000000000000000
CapInh: 0000000000000000
CapPrm: 00000000fffffeff
CapEff: 00000000fffffeff
Cpus_allowed:
00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003
Mems_allowed: 00000000,00000001

Forrie

unread,
Mar 6, 2012, 3:14:06 PM3/6/12
to Puppet Users
Interestingly, the command "facter serialnumber" correctly pulls that
it's a VMware system:

# /local/bin/facter serialnumber
VMware-56 4d 00 7e e8 3b e8 c9-85 7f 4e XX XX XX XX XX


Forrie

unread,
Mar 6, 2012, 3:24:22 PM3/6/12
to Puppet Users
On another system, same NFS mounts, the "facter virtual" reports the
correct information, that system is running:

2.6.18-194.3.1.el5

The system that doesn't correctly report is:

2.6.18-274.18.1.el5

I don't know if that really matters.



Reply all
Reply to author
Forward
0 new messages