https://bugzilla.wikimedia.org/show_bug.cgi?id=70646
Bug ID: 70646
Summary: apt-get update does not always run on initial
provision of new vm
Product: MediaWiki-Vagrant
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Web browser: ---
Mobile Platform: ---
This has happened to me twice today while I've been testing a bug that only
happens on during initial provisioning.
* Vagrant brings up a new VM using a the base image stored on my machine.
* Puppet runs in that VM.
* At some point Puppet decides it needs to install a package via apt.
* The apt cache that is baked into the VM image is used because Puppet decided
that this run isn't the run to apply the once-per-hour `apt-get update` command
on.
* The apt cache is old enough that the version of the package given in the
cache is not available in the upstream apt repo anymore.
* `apt-get install whatever` fails with "Unable to fetch some archives, maybe
run apt-get update or try with --fix-missing?"
* The puppet run fails
The hack fix for this is to ssh into the vm and run `sudo apt-get update`
followed by running `vagrant provision`.
Is there a way to keep the "schedule => hourly" parameter to
Exec['update_package_index'] in Class['apt'] but still ensure that on an
initial provision of a VM this is executed? If not we maybe need to switch this
to an "onlyif => test `stat -c %Y /var/lib/apt/periodic/update-success-stamp`
-le $(( `date +%s` - 3600 ))"
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l