Issue #6635 has been updated by Thomas Guthmann.
Just a reminder, puppet works well when executed in shell but it's doing crap
as a daemon. So the test you are asking me to may be irrelevant because I
execute facter in a shell. See the esults below, they are the same as expected.
**However** I don't have /proc/vz/version that may be the reason (we are using
Virtuozzo 4.0 not OpenVZ)
[root@serverX:~]# facter -p virtual ls -lA /proc/vz
/usr/bin/facter: invalid option -- l
[root@serverX:~]# facter -p virtual ; ls -lA /proc/vz
openvzve
total 0
-r-------- 1 root root 0 Mar 10 11:41 veinfo
-r-------- 1 root root 0 Mar 10 11:41 veinfo_redir
-r-------- 1 root root 0 Mar 10 11:41 veredir
-r-------- 1 root root 0 Mar 10 11:41 vestat
dr-x------ 8 root root 0 Mar 10 11:41 vzaquota
-r-------- 1 root root 0 Mar 10 11:41 vzdata
[root@serverX:~]#
[root@serverX:~]# yum upgrade facter
Loaded plugins: fastestmirror, security
Determining fastest mirrors
base | 1.6 kB 00:00
rpmforge | 1.2 kB 00:00
updates | 1.2 kB 00:00
Skipping security plugin, no data
Setting up Upgrade Process
Resolving Dependencies
Skipping security plugin, no data
--> Running transaction check
---> Package facter.noarch 0:1.5.8-1.el5.rf set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Updating:
facter noarch 1.5.8-1.el5.rf rpmforge
54 k
Transaction Summary
================================================================================
Install 0 Package(s)
Upgrade 1 Package(s)
Total download size: 54 k
Is this ok [y/N]: y
Downloading Packages:
facter-1.5.8-1.el5.rf.noarch.rpm | 54 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : facter
1/2
Cleanup : facter
2/2
Updated:
facter.noarch 0:1.5.8-1.el5.rf
Complete!
[root@serverX:~]# facter -p virtual ; ls -lA /proc/vz
openvzve
total 0
-r-------- 1 root root 0 Mar 10 11:46 veinfo
-r-------- 1 root root 0 Mar 10 11:46 veinfo_redir
-r-------- 1 root root 0 Mar 10 11:46 veredir
-r-------- 1 root root 0 Mar 10 11:46 vestat
dr-x------ 8 root root 0 Mar 10 11:46 vzaquota
-r-------- 1 root root 0 Mar 10 11:46 vzdata
----------------------------------------
Bug #6635: Facter 1.5.8 seems to not work properly when triggered by the puppet
daemon but works fine when used with puppetd -t
https://projects.puppetlabs.com/issues/6635
Author: Thomas Guthmann
Status: Investigating
Priority: Normal
Assignee:
Category:
Target version:
Keywords: facter virtual set daemon
Branch:
Hi,
Since we upgraded to facter 1.5.8 we had a weird behaviour with puppet. It
seems that in our case $virtual is not set properly (due to environment
variables not set ?). For instance the following logic works fine if we execute
puppetd -t from a shell on a 'openvzve' node however in the background we can
see in the logs of this node that puppet is trying to install ntp and ipmi but
it should not. So it seems that $virtual is not set because it does not enter
any of the other $virtual conditions.
Notes:
- Facter 1.5.7 works fine and does not have this issue. We rollback to this
version to have the correct behaviour again. (homebrew RPM)
- Facter 1.5.8 was a RPM from RPMFORGE
(http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/facter-1.5.8-1.el5.rf.noarch.rpm)
- Puppet 2.6.2 (homebrew RPM)
- Centos 5.5 i386
Code:
###################
# If it is a VE #
###################
if ( $virtual == "openvzve" ) {
# do something
}
###########################################################
# else is either a real HW, a virtuozzo HW node or VMwar #
###########################################################
else {
# All real hardware/Virtuozzo HW node/VMware
include ntp
###################
# if it is VMware #
###################
if ( $virtual == "vmware" ) {
include vmware
}
############################
# else it is real hardware #
############################
else {
# physical only aka real HW or Virtuozzo HW node
include ipmi
# If the hardware is DELL install openmange
if ( $manufacturer == "Dell Inc." ) {
include openmanage
}
# If this is a VZ hardware node
if ( $virtual == "openvzhn" ) {
include virtuozzo
}
}
}
--
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.