FAQ
I recently downloaded the nagios puppet module (
https://github.com/duritong/puppet-nagios) for my environment. I have
noticed that the lib file 'mountpoints.rb' for this module causes issue
when a windows puppet node is run. When I remove this library file
completely, none of the issues I am seeing happen anymore. Does anyone
know of a good way to modify the mountpoints.rb file to be more windows
friendly? Or does anyone know where this is actually failing?
I attached the mountspoints.rb below.

*The following are the symtoms I am seeing during a puppet run on windows*
"Using Facter::Util::Resolution.exec with a shell built-in is deprecated.
Most built-ins can be replaced with native ruby commands. If you really
have to run a built-in, pass "cmd /c your_builtin" as a command"
"err: /Service[NSClientpp]: Could not evaluate: Could not find init script
for 'NSClientpp'"
"err: /Service[puppet]: Could not evaluate: Could not find init script for
'puppet'"

*mountpoints.rb*
begin

mountpoints = []
# we show devices, but we avoid outputing duplicate devices
devices = []
Facter.add("mountpoints") do
ignorefs = ["NFS", "nfs", "nfs4", "nfsd", "afs", "binfmt_misc", "proc",
"smbfs",
"autofs", "iso9660", "ncpfs", "coda", "devpts", "ftpfs",
"devfs",
"mfs", "shfs", "sysfs", "cifs", "lustre_lite", "tmpfs",
"usbfs", "udf",
"fusectl", "fuse.snapshotfs", "rpc_pipefs"]
begin
require 'filesystem'
rescue Exception => e
confine :kernel => :linux
ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
fs_source = nil
if FileTest.exists?("/etc/mtab")
fs_source = "/etc/mtab"
elsif FileTest.exists?("/proc/mounts")
fs_source = "/proc/mounts"
end

mounts = File.read(fs_source).split("\n")
mounts.each do |mount|
mount = mount.split(" ")
if ((not ignorefs.include?(mount[2])) && (mount[3] !~ /bind/) &&
(not devices.include?(mount[0])) && (not mountpoints.include?(mount[1])))
mountpoints.push(mount[1])
end
devices.push(mount[0]) if not devices.include?(mount[0])
end
else
FileSystem.mounts.each do |m|
if ((not ignorefs.include?(m.fstype)) && (m.options !~ /bind/) &&
!devices.include?(mount[0]))
mountpoints.push(m.mount)
end
devices.push(m.mount) if not devices.include?(m.mount)
end
end
setcode do
mountpoints.join(",")
end
end
Facter.add("devices") do
setcode do
devices.join(",")
end
end

rescue Exception => e
end


--
_____________________________________________________
This email and any files transmitted with it are confidential and intended
solely for the addressee. If you received this email in error, please do
not disclose the contents to anyone; kindly notify the sender by return
email and delete this email and any attachments from your system.

© 2011 Currensee Inc. is a member of the National Futures Association (NFA)
Member ID 0403251 | Over the counter retail foreign currency (Forex)
trading may involve significant risk of loss. It is not suitable for all
investors and you should make sure you understand the risks involved before
trading and seek independent advice if necessary. Performance, strategies
and charts shown are not necessarily predictive of any particular result
and past performance is no indication of future results. Investor returns
may vary from Trade Leader returns based on slippage, fees, broker spreads,
volatility or other market conditions.

Currensee Inc | 54 Canal St 4th Floor | Boston, MA 02114 | +1.617.624.3824

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

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedApr 9, '13 at 7:57p
activeApr 10, '13 at 11:52a
posts2
users2
websitepuppetlabs.com

2 users in discussion

Phundisk: 1 post Klavs Klavsen: 1 post

People

Translate

site design / logo © 2022 Grokbase