Install hook may fail if package index is out of date
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
haproxy (Juju Charms Collection) |
New
|
Undecided
|
Unassigned |
Bug Description
series: trusty
provider: local (vagrant)
I've run into a problem in certain situations where the install hook will consistently fail:
2015-01-08 15:46:47 INFO install Suggested packages:
2015-01-08 15:46:47 INFO install vim-haproxy python-jinja2-doc
2015-01-08 15:46:47 INFO install The following NEW packages will be installed:
2015-01-08 15:46:47 INFO install haproxy python-jinja2 python-markupsafe
2015-01-08 15:46:47 INFO install 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
2015-01-08 15:46:47 INFO install Need to get 628 kB of archives.
2015-01-08 15:46:47 INFO install After this operation, 1912 kB of additional disk space will be used.
2015-01-08 15:46:47 INFO install WARNING: The following packages cannot be authenticated!
2015-01-08 15:46:47 INFO install haproxy python-markupsafe python-jinja2
2015-01-08 15:46:47 INFO install E: There are problems and -y was used without --force-yes
2015-01-08 15:46:47 INFO install Traceback (most recent call last):
2015-01-08 15:46:47 INFO install File "hooks/hooks.py", line 1019, in <module>
2015-01-08 15:46:47 INFO install main(hook_name)
2015-01-08 15:46:47 INFO install File "hooks/hooks.py", line 979, in main
2015-01-08 15:46:47 INFO install install_hook()
2015-01-08 15:46:47 INFO install File "hooks/hooks.py", line 756, in install_hook
2015-01-08 15:46:47 INFO install apt_install(
2015-01-08 15:46:47 INFO install File "/var/lib/
2015-01-08 15:46:47 INFO install subprocess.
2015-01-08 15:46:47 INFO install File "/usr/lib/
2015-01-08 15:46:47 INFO install raise CalledProcessEr
2015-01-08 15:46:47 INFO install subprocess.
2015-01-08 15:46:47 ERROR juju.worker.uniter uniter.go:486 hook failed: exit status 1
I've found two things that resolve the issue:
1) add '--force-yes' to the `apt-get install` command
2) call apt-get update prior to `apt-get install`