transient network failures during apt-add-repository are fatal

Bug #1654640 reported by Francis Ginther
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Autopilot Log Analyser
New
Undecided
Unassigned
Charm Helpers
New
Undecided
Unassigned

Bug Description

Saw this on an automated landscape autopilot run:

[from keystone-2:/var/log/juju/unit-landscape-client-52.log]
2017-01-06 15:31:47 INFO juju-log Installing ['apt-transport-https', 'wget'] with options: ['--option=Dpkg::Options:
:=--force-confold']
2017-01-06 15:31:47 INFO install Reading package lists...
2017-01-06 15:31:47 INFO install Building dependency tree...
2017-01-06 15:31:47 INFO install Reading state information...
2017-01-06 15:31:47 INFO install apt-transport-https is already the newest version (1.2.15ubuntu0.2).
2017-01-06 15:31:47 INFO install wget is already the newest version (1.17.1-1ubuntu1.1).
2017-01-06 15:31:47 INFO install 0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
2017-01-06 15:31:48 INFO install Cannot add PPA: 'ppa:~landscape/ubuntu/trunk'.
2017-01-06 15:31:48 INFO install ERROR: '~landscape' user or team does not exist.
2017-01-06 15:31:49 INFO install Traceback (most recent call last):
2017-01-06 15:31:49 INFO install File "/var/lib/juju/agents/unit-landscape-client-52/charm/hooks/install", line 92, in <module>
2017-01-06 15:31:49 INFO install sys.exit(hooks.execute(sys.argv))
2017-01-06 15:31:49 INFO install File "/var/lib/juju/agents/unit-landscape-client-52/charm/hooks/charmhelpers/core/hookenv.py", line 598, in execute
2017-01-06 15:31:49 INFO install self._hooks[hook_name]()
2017-01-06 15:31:49 INFO install File "/var/lib/juju/agents/unit-landscape-client-52/charm/hooks/install", line 34, in install
2017-01-06 15:31:49 INFO install add_apt_source(origin)
2017-01-06 15:31:49 INFO install File "/var/lib/juju/agents/unit-landscape-client-52/charm/hooks/install", line 88, in add_apt_source
2017-01-06 15:31:49 INFO install return add_source(url, key)
2017-01-06 15:31:49 INFO install File "/var/lib/juju/agents/unit-landscape-client-52/charm/hooks/charmhelpers/fetch/__init__.py", line 265, in add_source
2017-01-06 15:31:49 INFO install subprocess.check_call(['add-apt-repository', '--yes', source])
2017-01-06 15:31:49 INFO install File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
2017-01-06 15:31:49 INFO install raise CalledProcessError(retcode, cmd)
2017-01-06 15:31:49 INFO install subprocess.CalledProcessError: Command '['add-apt-repository', '--yes', 'ppa:landscape/trunk']' returned non-zero exit status 1
2017-01-06 15:31:49 ERROR juju.worker.uniter.operation runhook.go:107 hook "install" failed: exit status 1

The 'add-apt-repository' error can occur as the result of transient network issues. In this case, it's fatal to the install hook.

Tags: landscape
Revision history for this message
Francis Ginther (fginther) wrote :
Revision history for this message
Francis Ginther (fginther) wrote :

Added autopilot-log-analyser to track writing an issue analyser for this error.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.