Closed krdoor closed 8 years ago
Thanks for reporting this - it's unfortunately a chicken/egg problem as the exec
to cleanup the directory is only triggered after a successful install.
I do have an idea on how to remove the directory after a failed download, but I'm away at the moment so unable to test - will let you know.
Thanks for your reply. I will test your fix as soon as possible, but I'm not in a hurry, just wanted to report this so it gets fixed one day :-)
Hi,
Huge apologies for the delay in looking at this - I have just added a new parameter to the module to force the download script to remove bad downloads, so now you can set clean_failed_download
to true
:)
Thanks, Craig
No problem, thanks for the fix, I will give it a try
Kristof Van Doorsselaere
Hogeschool Gent Directie Financiën en ICT
Valentin Vaerwijckweg 1 BE-9000 Gent T +32 9 243 35 20 HoGent.be
From: Craig Watson notifications@github.com Reply-To: craigwatson/puppet-vmwaretools reply@reply.github.com Date: Tuesday 21 June 2016 at 01:15 To: craigwatson/puppet-vmwaretools puppet-vmwaretools@noreply.github.com Cc: Kristof Van Doorsselaere kristof.vandoorsselaere@hogent.be, Author author@noreply.github.com Subject: Re: [craigwatson/puppet-vmwaretools] When archive download fails, only first puppet agent run fails (#80)
Hi,
Huge apologies for the delay in looking at this - I have just added a new parameter to the module to force the download script to remove bad downloads, so now you can set clean_failed_download to true :)
Thanks, Craig
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Example:
[root@netdot tmp]# puppet agent -t -v Info: Using configured environment 'development' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Caching catalog for netdot.example.com Info: Applying configuration version 'fa03611fb58d7b4c0465bc74b60da9177dab75a8' Notice: /Stage[main]/Vmwaretools::Install/File[/tmp/vmwaretools]/ensure: created Notice: /Stage[main]/Vmwaretools::Install::Archive/File[/tmp/vmwaretools/download.sh]/ensure: defined content as '{md5}4f98bdc7ccbf32e4f427a2cf17fe7bdd' Info: /Stage[main]/Vmwaretools::Install::Archive/File[/tmp/vmwaretools/download.sh]: Scheduling refresh of Exec[download_vmwaretools] Notice: /Stage[main]/Vmwaretools::Install::Exec/Exec[download_vmwaretools]/returns: Checksum mismatch. Got e6276447e1b29813443e2a3214cc42fd, should have been 370c21913c7f21bd9900bb91563feeaf -- removing downloaded archive. Error: /Stage[main]/Vmwaretools::Install::Exec/Exec[download_vmwaretools]: Failed to call refresh: /tmp/vmwaretools/download.sh returned 1 instead of one of [0] Error: /Stage[main]/Vmwaretools::Install::Exec/Exec[download_vmwaretools]: /tmp/vmwaretools/download.sh returned 1 instead of one of [0] Notice: /Stage[main]/Nrpe/Service[nrpe_service]/ensure: ensure changed 'stopped' to 'running' Info: /Stage[main]/Nrpe/Service[nrpe_service]: Unscheduling refresh on Service[nrpe_service] Notice: Applied catalog in 2.36 seconds
Next time we run the agent we get:
[root@netdot tmp]# puppet agent -t -v Info: Using configured environment 'development' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Caching catalog for netdot.example.com Info: Applying configuration version 'fa03611fb58d7b4c0465bc74b60da9177dab75a8' Notice: /Stage[main]/Nrpe/Service[nrpe_service]/ensure: ensure changed 'stopped' to 'running' Info: /Stage[main]/Nrpe/Service[nrpe_service]: Unscheduling refresh on Service[nrpe_service] Notice: Applied catalog in 2.22 seconds [root@netdot tmp]#
When we remove /tmp/vmwaretools the error returns
Running the download script results in: [root@netdot tmp]# /tmp/vmwaretools/download.sh Checksum mismatch. Got e6276447e1b29813443e2a3214cc42fd, should have been 370c21913c7f21bd9900bb91563feeaf -- removing downloaded archive.
[root@netdot tmp]# wget http://files.example.com/vmware/VMwareTools-10.0.5-3227872.tar.gz --2016-04-07 13:19:19-- http://files.example.com/vmware/VMwareTools-10.0.5-3227872.tar.gz Resolving proxy.example.com (proxy.example.com)... X.X.X.X, XXX:XXX:X:XXX:XXXX::XX Connecting to proxy.example.com (proxy.example.com)|192.168.99.1|:8080... connected. Proxy request sent, awaiting response... 403 Forbidden 2016-04-07 13:19:19 ERROR 403: Forbidden.
The problem was caused by a missing firewall rule, but I would expect that every agent run fails, and not only the first one
The code we use in our module: if $is_virtual { if $::manufacturer =~ /(?i:^vmware)/ { class { 'vmwaretools': version => '10.0.5-3227872', force_install => true, archive_url => 'http://files.example.com/vmware', archive_md5 => '370c21913c7f21bd9900bb91563feeaf', }