"/tmp/vmwaretools/vmware-tools-distrib/vmware-install.pl -d" - runs on every agent run
opened this issue · comments
The installation runs successfull every time. But because the module doesn't recognize when the correct version is already installed it starts the install process every time.
Here is the agents debug output. I'm running the latest github version of the module.
info: Applying configuration version '1402667282'
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[install_vmwaretools]/require: requires Exec[uncompress_vmwaretools]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[install_vmwaretools]/notify: subscribes to Exec[clean_vmwaretools]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[uncompress_vmwaretools]/require: requires Exec[download_vmwaretools]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[uncompress_vmwaretools]/notify: subscribes to Exec[install_vmwaretools]
debug: /Stage[main]/Puppet_agent/before: requires Class[Puppet_agent::Config]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[clean_vmwaretools]/require: requires Exec[install_vmwaretools]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[clean_vmwaretools]/notify: subscribes to Exec[remove_vmwaretools_working_dir]
debug: /Stage[main]/Vmwaretools::Install::Archive/File[/tmp/vmwaretools/VMwareTools-9.4.5-1618308.tar.gz]/require: requires File[/tmp/vmwaretools]
debug: /Stage[main]/Puppet_agent::Config/File[/etc/puppet/puppet.conf]/notify: subscribes to Service[puppet]
debug: /Stage[main]/Vmwaretools::Install::Archive/File[/tmp/vmwaretools/download.sh]/require: requires File[/tmp/vmwaretools]
debug: /Stage[main]/Vmwaretools::Install::Archive/File[/tmp/vmwaretools/download.sh]/notify: subscribes to Exec[download_vmwaretools]
debug: /Stage[main]/Ntp/Service[ntp]/require: requires File[/etc/ntp.conf]
debug: /Stage[main]/Ntp/Service[ntp]/subscribe: subscribes to File[/etc/ntp.conf]
debug: /Stage[main]/Puppet_agent::Config/before: requires Class[Puppet_agent::Service]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[download_vmwaretools]/require: requires Package[curl]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[download_vmwaretools]/require: requires File[/tmp/vmwaretools/download.sh]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[download_vmwaretools]/notify: subscribes to Exec[uncompress_vmwaretools]
debug: /Stage[main]/Ntp/File[/etc/default/ntp]/require: requires Package[ntp]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[remove_vmwaretools_working_dir]/require: requires Exec[clean_vmwaretools]
debug: /Stage[main]/Vmwaretools::Install::Archive/before: requires Class[Vmwaretools::Install::Exec]
debug: /Stage[main]/Vmwaretools::Config_tools/Exec[vmware_config_tools]/require: requires Exec[clean_vmwaretools]
debug: /Stage[main]/Ntp/File[/etc/ntp.conf]/require: requires Package[ntp]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[uncompress_vmwaretools]: Autorequiring File[/tmp/vmwaretools]
debug: /Schedule[daily]: Skipping device resources because running on a host
debug: /Schedule[monthly]: Skipping device resources because running on a host
debug: /Schedule[hourly]: Skipping device resources because running on a host
debug: Prefetching apt resources for package
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: /Schedule[never]: Skipping device resources because running on a host
notice: /Stage[main]/Vmwaretools::Config/File[/tmp/vmwaretools]/ensure: created
debug: /Stage[main]/Vmwaretools::Config/File[/tmp/vmwaretools]: The container Class[Vmwaretools::Config] will propagate my refresh event
notice: /Stage[main]/Vmwaretools::Install::Archive/File[/tmp/vmwaretools/download.sh]/ensure: defined content as '{md5}80b9dcb1d58075670714ec68009ca24b'
debug: /Stage[main]/Vmwaretools::Install::Archive/File[/tmp/vmwaretools/download.sh]: The container Class[Vmwaretools::Install::Archive] will propagate my refresh event
info: /Stage[main]/Vmwaretools::Install::Archive/File[/tmp/vmwaretools/download.sh]: Scheduling refresh of Exec[download_vmwaretools]
debug: Class[Vmwaretools::Config]: The container Stage[main] will propagate my refresh event
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W --showformat ${Status} ${Package} ${Version}\n vmware-tools-services'
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W --showformat ${Status} ${Package} ${Version}\n open-vm-dkms'
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W --showformat ${Status} ${Package} ${Version}\n open-vm-tools'
debug: Service[ntp](provider=debian): Executing '/etc/init.d/ntp status'
debug: /Schedule[weekly]: Skipping device resources because running on a host
debug: Class[Vmwaretools::Install::Archive]: The container Stage[main] will propagate my refresh event
debug: Exec[download_vmwaretools](provider=posix): Executing '/tmp/vmwaretools/download.sh'
debug: Executing '/tmp/vmwaretools/download.sh'
notice: /Stage[main]/Vmwaretools::Install::Exec/Exec[download_vmwaretools]: Triggered 'refresh' from 1 events
info: /Stage[main]/Vmwaretools::Install::Exec/Exec[download_vmwaretools]: Scheduling refresh of Exec[uncompress_vmwaretools]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[download_vmwaretools]: The container Class[Vmwaretools::Install::Exec] will propagate my refresh event
debug: Exec[uncompress_vmwaretools](provider=posix): Executing 'tar -xf /tmp/vmwaretools/VMwareTools-9.4.5-1618308.tar.gz'
debug: Executing 'tar -xf /tmp/vmwaretools/VMwareTools-9.4.5-1618308.tar.gz'
notice: /Stage[main]/Vmwaretools::Install::Exec/Exec[uncompress_vmwaretools]: Triggered 'refresh' from 1 events
info: /Stage[main]/Vmwaretools::Install::Exec/Exec[uncompress_vmwaretools]: Scheduling refresh of Exec[install_vmwaretools]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[uncompress_vmwaretools]: The container Class[Vmwaretools::Install::Exec] will propagate my refresh event
debug: Exec[install_vmwaretools](provider=posix): Executing '/tmp/vmwaretools/vmware-tools-distrib/vmware-install.pl -d'
debug: Executing '/tmp/vmwaretools/vmware-tools-distrib/vmware-install.pl -d'
notice: /Stage[main]/Vmwaretools::Install::Exec/Exec[install_vmwaretools]: Triggered 'refresh' from 1 events
info: /Stage[main]/Vmwaretools::Install::Exec/Exec[install_vmwaretools]: Scheduling refresh of Exec[clean_vmwaretools]
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[install_vmwaretools]: The container Class[Vmwaretools::Install::Exec] will propagate my refresh event
debug: Exec[clean_vmwaretools](provider=posix): Executing 'rm -rf /tmp/vmwaretools/vmware-tools-distrib && find /tmp/vmwaretools/*.tar.gz -not -name VMwareTools-9.4.5-1618308.tar.gz -delete'
debug: Executing 'rm -rf /tmp/vmwaretools/vmware-tools-distrib && find /tmp/vmwaretools/*.tar.gz -not -name VMwareTools-9.4.5-1618308.tar.gz -delete'
notice: /Stage[main]/Vmwaretools::Install::Exec/Exec[clean_vmwaretools]: Triggered 'refresh' from 1 events
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[clean_vmwaretools]: The container Class[Vmwaretools::Install::Exec] will propagate my refresh event
info: /Stage[main]/Vmwaretools::Install::Exec/Exec[clean_vmwaretools]: Scheduling refresh of Exec[remove_vmwaretools_working_dir]
debug: Exec[remove_vmwaretools_working_dir](provider=posix): Executing 'rm -rf /tmp/vmwaretools'
debug: Executing 'rm -rf /tmp/vmwaretools'
notice: /Stage[main]/Vmwaretools::Install::Exec/Exec[remove_vmwaretools_working_dir]: Triggered 'refresh' from 1 events
debug: /Stage[main]/Vmwaretools::Install::Exec/Exec[remove_vmwaretools_working_dir]: The container Class[Vmwaretools::Install::Exec] will propagate my refresh event
debug: Class[Vmwaretools::Install::Exec]: The container Stage[main] will propagate my refresh event
debug: Exec[vmware_config_tools](provider=posix): Executing check '/sbin/lsmod | /bin/grep -q vmci'
debug: Executing '/sbin/lsmod | /bin/grep -q vmci'
debug: Service[puppet](provider=debian): Executing '/etc/init.d/puppet status'
debug: /Schedule[puppet]: Skipping device resources because running on a host
debug: Exec[vmwaretools_timesync_disable](provider=posix): Executing check '/usr/bin/vmware-toolbox-cmd timesync status | grep Enabled'
debug: Executing '/usr/bin/vmware-toolbox-cmd timesync status | grep Enabled'
debug: Finishing transaction 70101805160860
debug: Storing state
debug: Stored state in 0.02 seconds
notice: Finished catalog run in 40.80 seconds
debug: report supports formats: b64_zlib_yaml pson raw yaml; using pson
Thanks can you please also report the output of facter -p
for the node in question and also confirm the parameters you're passing to the module?
Sure, here ist the facter -p output:
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
architecture => amd64
boardmanufacturer => Intel Corporation
boardproductname => 440BX Desktop Reference Platform
boardserialnumber => None
domain => dc0.testint.de
facterversion => 1.6.10
fqdn => debian-test3.dc0.testing.de
hardwareisa => unknown
hardwaremodel => x86_64
hostname => debian-test3
id => root
interfaces => eth0,lo
ipaddress => 10.1.1.12
ipaddress_eth0 => 10.1.1.12
ipaddress_lo => 127.0.0.1
is_pe => false
is_virtual => true
kernel => Linux
kernelmajversion => 3.2
kernelrelease => 3.2.0-4-amd64
kernelversion => 3.2.0
lsbdistcodename => wheezy
lsbdistdescription => Debian GNU/Linux 7.5 (wheezy)
lsbdistid => Debian
lsbdistrelease => 7.5
lsbmajdistrelease => 7
macaddress => 00:50:56:01:00:61
macaddress_eth0 => 00:50:56:01:00:61
manufacturer => VMware, Inc.
memoryfree => 1.80 GB
memorysize => 1.97 GB
memorytotal => 1.97 GB
netmask => 255.255.0.0
netmask_eth0 => 255.255.0.0
netmask_lo => 255.0.0.0
network_eth0 => 10.1.0.0
network_lo => 127.0.0.0
operatingsystem => Debian
operatingsystemrelease => 7.5
osfamily => Debian
path => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
physicalprocessorcount => 1
processor0 => Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
processorcount => 1
productname => VMware Virtual Platform
ps => ps -ef
puppet_vardir => /var/lib/puppet
puppetversion => 2.7.23
root_home => /root
rubyversion => 1.9.3
selinux => false
serialnumber => VMware-42 27 b0 55 8e 55 d7 99-6f c2 7f 07 51 d9 97 3c
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pDfFQd++vuWt10ehvraPXSY1ip4gdjUdyP
swapfree => 708.00 MB
swapsize => 708.00 MB
timezone => CEST
type => Other
uniqueid => 007f0101
uptime => 1 day
uptime_days => 1
uptime_hours => 24
uptime_seconds => 88668
virtual => vmware
I'm using Foreman to pass parameters to the module (if that should matter) and besides these I'm using the default values:
- archive_md5: md5ofpackage
- archive_url: urlofpackage
- fail_on_non_vmware: true
- timesync: false
- version: 9.4.5-1618308
Thanks - it doesn't seem like the vmwaretools
fact is being parsed by Puppet, hence why the module is trying to install the Tools on each run.
Can you confirm if you're running mastered or masterless and if you have pluginsync enabled?
Also, Puppet 2.7.x is end-of-life, you may want to upgrade to 3.x - see here: https://ask.puppetlabs.com/question/665/what-is-the-eol-for-puppet-27x/
Here is my puppet.conf on the agent:
# File managed by Puppet
[main]
vardir = /var/lib/puppet
ssldir = $vardir/ssl
logdir = /var/log/puppet
rundir = /var/run/puppet
modulepath = /etc/puppet/modules:/opt/puppet/share/puppet/modules
user = puppet
group = puppet
archive_files = true
archive_file_server = handsoff.dc0.testing.de
[agent]
certname = debian-test3.dc0.testing.de
server = handsoff.dc0.testing.de
report = true
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
graph = true
pluginsync = true
runinterval = 300
I know about the EOL, but there is a need for me to run on the Debian packages for now.
Can I do anything else to help you figure out, what goes wrong here. I would really appreciate a fix for this and would happily provide any information you might need. I'm just not good enough with puppet to debug it myself. :(
Thanks for that, apologies for the delay in response, my day-job is quite hectic at the moment!
I've just added a check in f68199a for the vmwaretools_version
fact that should hard-fail the Puppet run if it cannot find it, so hopefully that should add some more clarity. To the situation.
Can you also post (or ideally Gist) the output of a manual Puppet run with the --verbose --debug
flags added, after you've pulled the latest commit from GitHub?
I've also got this, I'm currently testing out a change to 'manifests/config_tools.pp'
--- a/modules/vmwaretools/manifests/config_tools.pp
+++ b/modules/vmwaretools/manifests/config_tools.pp
@@ -26,6 +26,7 @@ class vmwaretools::config_tools {
exec { 'vmware_config_tools':
command => '/usr/bin/vmware-config-tools.pl -d',
creates => $vmwaretools::params::config_creates_real,
- refreshonly => true,
}
@ofcourseican, Are you able to test this as well?
@craigwatson I did a run with the new version. As you said, it now fails. https://gist.github.com/ofcourseican/61514fdca40a6389ce69
Thanks for confirming, can you confirm you've enabled pluginsync
properly as per the documentation here: http://docs.puppetlabs.com/guides/plugins_in_modules.html#enabling-pluginsync
It seems the line must be present on both master and client nodes and is placed in the [main]
section rather than [agent]
.
@craigwatson I tried it with pluginsync in the main xor in the agent section. the result doesn't change.
Can you confirm that pluginsync is enabled on the master as well as the client?
According to the gist output, the vmwaretools_plugin
fact isn't being loaded.
Yes, it is activated on the agent and on the master.
Hi again. So, I solved the problem :) The thing was that I used environments in my setup (testing and production), for whatever reason, facter didn't load the custom facts that came with the testing environment.
Awesome, glad to know that you got it sorted in the end :)
I'll close this issue now, feel free to create more if you find more issues.
Hey Craig. I am fairly new to Puppet and wanted to try to use your vmwaretools module. It seems like it isn't downloading the tools though, and there is no files directory and no vmwaretools.gz in the /tmp directory. When running puppet agent -t it throws this:
err: /Stage[main]/Vmwaretools::Install::Archive/File[/tmp/vmwaretools/VMwareTools-9.0.0-782409.tar.gz]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/vmwaretools/VMwareTools-9.0.0-782409.tar.gz at /etc/puppet/modules/vmwaretools/manifests/install/archive.pp:28
I'd greatly appreciate any ideas you may have. Thanks!
@Fr0ntSight - thanks for this, though this could be a different issue. Can you please open a new ticket and also include the code you're using to include the vmwaretools
module (either include vmwaretools
or a class resource declaration).
Thanks!