craigwatson / puppet-vmwaretools

Puppet module for non-OSP VMware Tools Installation
http://forge.puppetlabs.com/CraigWatson1987/vmwaretools
Apache License 2.0
27 stars 40 forks source link

Ubuntu 12.04 LTS - open-vm-tools causes error, prevents install of VMware tools #21

Closed eyeeyeeye closed 11 years ago

eyeeyeeye commented 11 years ago

On Ubuntu 12.04 LTS, after an attempted install of open-vm-tools, puppet-vmwaretools cannot uninstall open-vm-tools, and cannot install VMware-provided tools.

With open-vm-tools removed, puppet is able to install VMware-provided tools.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.3 LTS
Release:    12.04
Codename:   precise

$ apt-get install open-vm-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  dkms ethtool libdumbnet1 libicu48 open-vm-dkms zerofree
Suggested packages:
  open-vm-toolbox
The following NEW packages will be installed:
  dkms ethtool libdumbnet1 libicu48 open-vm-dkms open-vm-tools zerofree
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/10.3 MB of archives.
After this operation, 31.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Selecting previously unselected package dkms.
(Reading database ... 129684 files and directories currently installed.)
Unpacking dkms (from .../dkms_2.2.0.3-1ubuntu3.1_all.deb) ...
Selecting previously unselected package ethtool.
Unpacking ethtool (from .../ethtool_1%3a3.1-1_amd64.deb) ...
Selecting previously unselected package libdumbnet1.
Unpacking libdumbnet1 (from .../libdumbnet1_1.12-3.1_amd64.deb) ...
Selecting previously unselected package libicu48.
Unpacking libicu48 (from .../libicu48_4.8.1.1-3_amd64.deb) ...
Selecting previously unselected package open-vm-dkms.
Unpacking open-vm-dkms (from .../open-vm-dkms_2011.12.20-562307-0ubuntu1_all.deb) ...
Selecting previously unselected package open-vm-tools.
Unpacking open-vm-tools (from .../open-vm-tools_2011.12.20-562307-0ubuntu1_amd64.deb) ...
Selecting previously unselected package zerofree.
Unpacking zerofree (from .../zerofree_1.0.1-2ubuntu1_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.5.0-39-generic
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up dkms (2.2.0.3-1ubuntu3.1) ...
Setting up ethtool (1:3.1-1) ...
Setting up libdumbnet1 (1.12-3.1) ...
Setting up libicu48 (4.8.1.1-3) ...
Setting up open-vm-dkms (2011.12.20-562307-0ubuntu1) ...
Loading new open-vm-tools-2011.12.20 DKMS files...
First Installation: checking all kernels...
Building only for 3.5.0-39-generic
Building for architecture x86_64
Building initial module for 3.5.0-39-generic
Error!  Build of vmblock.ko failed for: 3.5.0-39-generic (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/open-vm-tools/2011.12.20/build/ for more information.
Setting up open-vm-tools (2011.12.20-562307-0ubuntu1) ...
update-initramfs: deferring update (trigger activated)
 * Loading open-vm-tools modules                                                                                
FATAL: Module vmhgfs not found.
FATAL: Module vmsync not found.
FATAL: Module vmblock not found.
FATAL: Module vmxnet not found.
                                                                                                         [ OK ]
 * Starting open-vm daemon vmtoolsd                                                                      [ OK ] 
Setting up zerofree (1.0.1-2ubuntu1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.5.0-39-generic

$ puppet agent --test
Info: Retrieving plugin
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppetdb_server_status.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_persistent_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/concat_basedir.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/custom_auth_conf.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/vmwaretools_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/postgres_default_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/windows.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_version.rb
Info: Caching catalog for puppet-mmdb-qa2.ngs.org
Info: Applying configuration version '1377638257'
Error: Could not find command '/usr/bin/vmware-config-tools.pl'
Error: /Stage[main]/Vmwaretools::Kernel_upgrade/Exec[vmware_config_tools]/returns: change from notrun to 0 failed: Could not find command '/usr/bin/vmware-config-tools.pl'
Notice: Finished catalog run in 1.97 seconds

$ apt-get remove open-vm-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  zerofree libicu48 ethtool libdumbnet1 dkms open-vm-dkms
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  open-vm-tools
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 2,658 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 130505 files and directories currently installed.)
Removing open-vm-tools ...
 * Stopping open-vm guest daemon vmtoolsd                                                                [ OK ] 
 * Removing open-vm-tools modules                                                                               
FATAL: Module vmhgfs not found.
FATAL: Module vmsync not found.
FATAL: Module vmblock not found.
FATAL: Module vmxnet not found.
                                                                                                         [ OK ]
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.5.0-39-generic
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

$ puppet agent --test
Info: Retrieving plugin
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppetdb_server_status.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_persistent_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/concat_basedir.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/custom_auth_conf.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/vmwaretools_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/postgres_default_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/windows.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_version.rb
Info: Caching catalog for puppet-mmdb-qa2.ngs.org
Info: Applying configuration version '1377638257'
Notice: /Stage[main]/Vmwaretools::Config/File[/tmp/vmwaretools]/ensure: created
Notice: /Stage[main]/Vmwaretools::Install::Package/Package[open-vm-dkms]/ensure: ensure changed '2011.12.20-562307-0ubuntu1' to 'purged'
Notice: /Stage[main]/Vmwaretools::Install::Package/Package[open-vm-tools]/ensure: created
Notice: /Stage[main]/Vmwaretools::Install::Archive/File[/tmp/vmwaretools/VMwareTools-9.0.5-1065307.tar.gz]/ensure: defined content as '{md5}924b75b0b522eb462266cf3c24c98837'
Info: /Stage[main]/Vmwaretools::Install::Archive/File[/tmp/vmwaretools/VMwareTools-9.0.5-1065307.tar.gz]: Scheduling refresh of Exec[uncompress_vmwaretools]
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]
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]
Notice: /Stage[main]/Vmwaretools::Install::Exec/Exec[clean_vmwaretools]: Triggered 'refresh' from 1 events
Info: /Stage[main]/Vmwaretools::Install::Exec/Exec[clean_vmwaretools]: Scheduling refresh of Exec[remove_vmwaretools_working_dir]
Notice: /Stage[main]/Vmwaretools::Install::Exec/Exec[remove_vmwaretools_working_dir]: Triggered 'refresh' from 1 events
Notice: Finished catalog run in 31.42 seconds
craigwatson commented 11 years ago

I'm unsure if fixing previously-broken installations is within the scope of the module. That said, can you post the output of facter -p after the broken open-vm-tools attempt and before the Puppet run?

eyeeyeeye commented 11 years ago

Hi Craig,

I removed the VMware provided tools, then installed the open tools, then ran facter -p:

architecture => amd64
augeasversion => 1.0.0
bios_release_date => 06/22/2012
bios_vendor => Phoenix Technologies LTD
bios_version => 6.00
blockdevice_fd0_size => 0
blockdevice_sda_model => Virtual disk
blockdevice_sda_size => 17179869184
blockdevice_sda_vendor => VMware
blockdevice_sr0_model => VMware IDE CDR00
blockdevice_sr0_size => 67463168
blockdevice_sr0_vendor => NECVMWar
blockdevices => fd0,sda,sr0
boardmanufacturer => Intel Corporation
boardproductname => 440BX Desktop Reference Platform
boardserialnumber => None
concat_basedir => /var/opt/lib/pe-puppet/concat
custom_auth_conf => false
domain => ngs.org
facterversion => 1.7.1
filesystems => ext3,ext4,iso9660,vfat
fqdn => puppet-agent-54.ngs.org
hardwareisa => x86_64
hardwaremodel => x86_64
hostname => puppet-agent-54
id => root
interfaces => eth0,lo
ip6tables_version => 1.4.12
ipaddress => 10.100.202.54
ipaddress_eth0 => 10.100.202.54
ipaddress_lo => 127.0.0.1
iptables_version => 1.4.12
is_pe => true
is_virtual => true
kernel => Linux
kernelmajversion => 3.5
kernelrelease => 3.5.0-40-generic
kernelversion => 3.5.0
last_run => Fri Sep  6 17:32:45 EDT 2013
lsbdistcodename => precise
lsbdistdescription => Ubuntu 12.04.3 LTS
lsbdistid => Ubuntu
lsbdistrelease => 12.04
lsbmajdistrelease => 12
macaddress => 00:50:56:b4:69:16
macaddress_eth0 => 00:50:56:b4:69:16
manufacturer => VMware, Inc.
memoryfree => 1.65 GB
memoryfree_mb => 1687.29
memorysize => 1.96 GB
memorysize_mb => 2003.20
memorytotal => 1.96 GB
mtu_eth0 => 1500
mtu_lo => 16436
netmask => 255.255.255.0
netmask_eth0 => 255.255.255.0
netmask_lo => 255.0.0.0
network_eth0 => 10.100.202.0
network_lo => 127.0.0.0
operatingsystem => Ubuntu
operatingsystemrelease => 12.04
osfamily => Debian
path => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
pe_major_version => 3
pe_minor_version => 0
pe_patch_version => 0
pe_version => 3.0.0
physicalprocessorcount => 1
postgres_default_version => 9.1
processor0 => Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
processorcount => 1
productname => VMware Virtual Platform
ps => ps -ef
puppet_vardir => /var/opt/lib/pe-puppet
puppetversion => 3.2.2 (Puppet Enterprise 3.0.0)
root_home => /root
rubysitedir => /opt/puppet/lib/ruby/site_ruby/1.9.1
rubyversion => 1.9.3
selinux => false
serialnumber => VMware-42 34 8e fd 13 1c ac 0d-1e 16 81 a1 12 74 62 d6
sshdsakey => AAAAB3NzaC1kc3MAAACBAJQ8ijEQGPYmOKOd3j5dsDzfb+RrujHMGkazHehFLU5lfwY3xWh7b/i8jOSINYsS2nUJ05ywrYgQ5DJSALk0/YWugA3hcEZHBIsSSkGNgeMk9hJrAocVOvKSBBSramP+4xN4DTaVe1lbDiHg4xsSdeX1+S5w4XoZOBRNHdY91D3xAAAAFQCdO673LTM9xxJOjL2dmu4fCn/3YQAAAIAvMICbn1WNC/5msdBqtN9+re1xmNpY8Za4i3IB1BT7l+AHTIHPzkxiA5fmL4py4HhTpoHOePblVrgfim3NwsAuYUmfvNxiSNauC94zhnATP36t0xO5AbXoCaJMIsxqexWudGx72IFH12BC0FAUZy+qbKDiobm91fBFSx+LfnU8WgAAAIBg4M72FHJFjebX5VmlqQDYodtSVm1ytVMWbMmpSw4Ud4KXd7YFU1zjBy5m8Ya3ejWGOYf+0kgrWK10trg+AnjBlH9iwmoVp4JJ3D3CtXMSDxmycNV1kdvKa91a+YNP2zjligPHrnAKXm0HBPXcdy0dmaDhPrFfLIrPD7qAnFos/A==
sshecdsakey => AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHznVIh6rAvZ+fvtqhqrxEQO1DLr4Bek9AhIJyqGWyk0o7XWSuv4Ho4g8E/ywkoETvvt15tdnJ8kaNmWrEgiKJA=
sshfp_dsa => SSHFP 2 1 40efd5abf78f914dd927e2eca000eefd1b533736
SSHFP 2 2 e449045eb4903aa114ed7bfab6fde37c0e8b55ee383279776e3fce87ac86a659
sshfp_ecdsa => SSHFP 3 1 5150aec2a234365520cb8bbba5c9424ee08e9a08
SSHFP 3 2 49300f667b49d305adb0d89aced7adb367ae3685800c2f19b6b28ef32b348f12
sshfp_rsa => SSHFP 1 1 4912a15abb603381bf70f1b442c8fd5e292a06b9
SSHFP 1 2 288320fc5f3363d053a0bcb4f7ad6724608893c8427bf9636dd9637489bd068c
sshrsakey => AAAAB3NzaC1yc2EAAAADAQABAAABAQDLsFrENLfydjVqgOvaEMmHktQz3ZIDOLKD0hWMfQNdpxcmnJW+AlwH3jrGc1/3nHD+7fy86sbfvEvh6kDHAPllkcb40bAplo8Aj9nLc7TktyklQ7ybkC4QxhmxKN0+qOEXHqKApIRuDGz2H7OK8f1tRx8tOOoPUqWRtKJUoCVCRAjkjwE8LsI4ZaX11H885QFMIX+65ckfRHjWZ4VYCXhnryzuX+kepBZ2bXxZgkxvb7Gld72FEHbljeQBgJIfgq8WL5i0woym6073Dro9RH1cD0lpJ4tyMK1EwOjoXgG05x07jLiNg7TX5NQgX3JHjBMxd/9ZtLxGht01b0CxJmpx
swapfree => 0.00 MB
swapfree_mb => 0.00
swapsize => 0.00 MB
swapsize_mb => 0.00
timezone => EDT
type => Other
uniqueid => 007f0101
uptime => 3:43 hours
uptime_days => 0
uptime_hours => 3
uptime_seconds => 13406
uuid => 42348EFD-131C-AC0D-1E16-81A1127462D6
virtual => vmware
vmwaretools_version => 9.1.0-562307
craigwatson commented 11 years ago

Ah, I see the problem - the install isn't being kicked off because the vmwaretools_version fact is actually reporting a version number, even though the open-vm-tools installation failed.

I'm not sure how the module can easily detect and recover from this - and even if it could, the secondary question is whether it should.

I'm tagging this as wontfix for now, though please feel free to let me know if there is something that can be done to mitigate the issue :)

eyeeyeeye commented 11 years ago

Hi Craig,

My thought was to incorporate something along the lines of

package { 'open-vm-tools':
  ensure => absent,
}

I will test to see if I can incorporate this into my copy of the module, at least for ubuntu.

Thanks!

craigwatson commented 11 years ago

That stanza actually already exists in manifests/install/package.pp on lines 24 to 26.

The ensure => purged is equivalent to apt-get remove --purge open-vm-tools.

eyeeyeeye commented 11 years ago

I just saw that! :)