Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Archive won't be re-downloaded when md5sum and archive on server is updated #72

Open
jgrumboe opened this issue Jan 24, 2018 · 0 comments

Comments

@jgrumboe
Copy link

We have an archive resource like this:

   archive { 'oracle_patch':
      ensure        => present,
      url           => 'http://some.server/path/oracle_patch.tgz',
      target        => '/some/path/local',
      digest_type   => 'md5',
      digest_string => $::oracle_patch_md5sum,
      extension     => 'tgz',
      src_target    => '/some/path/local',
      checksum      => true,
      user          => 'oracle',
      timeout       => 600,
    }

$::oracle_patch_md5sum is defined in hiera.

First run everything is fine, archive is downloaded and extracted.
So days later we updated the archive on the webserver and the md5sum in hiera.

The md5sum is created correctly as the new one, but the file isn't downloaded again, because the exec-resource is only firing if no downloaded file is present (see 'creates' below).

      exec {"download archive ${name} and check sum":
        command     => "curl ${proxy_option} -s -S ${insecure_arg} ${redirect_arg} -o ${src_target}/${name} '${url}'",
        creates     => "${src_target}/${name}",
        logoutput   => true,
        timeout     => $timeout,
        path        => $path,
        require     => Package['curl'],
        notify      => $_notify,
        user        => $user,
        refreshonly => $refreshonly,
      }

So the checksum checks went wrong and everything is deleted.
On the second puppet run everything is running fine, since nothing is present on local disk.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant