yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #91968
[Bug 1618467] Re: cloud-init does not take into consideration proxy when adding PPA's.
Tracked in Github Issues as https://github.com/canonical/cloud-
init/issues/2713
** Bug watch added: github.com/canonical/cloud-init/issues #2713
https://github.com/canonical/cloud-init/issues/2713
** Changed in: cloud-init
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1618467
Title:
cloud-init does not take into consideration proxy when adding PPA's.
Status in cloud-init:
Expired
Status in MAAS:
Opinion
Bug description:
In an environment behind a proxy, I've noticed that cloud-init fails
to add a PPA because it fails to use the proxy to add such PPA. For
example, in this environment we are adding a PPA APT source & defining
the proxy for APT. See below:
2017-06-08 19:50:26,126 - cc_apt_configure.py[DEBUG]: apt config: convert V2 to V3 format for keys 'apt_proxy'
2017-06-08 19:50:26,126 - cc_apt_configure.py[DEBUG]: apt config: V1/2 and V3 format specified, preferring V3
2017-06-08 19:50:26,126 - cc_apt_configure.py[DEBUG]: debconf_selections was not set in config
2017-06-08 19:50:26,126 - cc_apt_configure.py[DEBUG]: handling apt config: {'sources': {'hardware_cert_3': {'source': 'ppa:hardware-certification/public'}}, 'proxy': 'http://10.90.90.1:8000/', 'preserve_sources_list': False, 'security': [{'uri': 'http://archive.ubuntu.com/ubuntu', 'arches': ['default']}], 'primary': [{'uri': 'http://archive.ubuntu.com/ubuntu', 'arches': ['default']}]}
However, this fails to add with the following:
2017-06-08 19:50:26,301 - util.py[DEBUG]: Running command ['add-apt-repository', 'ppa:hardware-certification/public'] with allowed return codes [0] (shell=False, capture=True)
2017-06-08 19:50:37,110 - cc_apt_configure.py[ERROR]: add-apt-repository failed.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/config/cc_apt_configure.py", line 609, in add_apt_sources
util.subp(["add-apt-repository", source], target=target)
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1814, in subp
cmd=args)
cloudinit.util.ProcessExecutionError: Unexpected error while running command.
Command: ['add-apt-repository', 'ppa:hardware-certification/public']
Exit code: 1
Reason: -
Stdout: Cannot add PPA: 'ppa:~hardware-certification/ubuntu/public'.
ERROR: '~hardware-certification' user or team does not exist.
Stderr: -
cloud-init should be using the provided proxy to attempt to add the PPA, provided that cloud-init is being told about a proxy that APT should use. In other words, since we are defining the proxy for APT, it makes sense we use the proxy to PPA add repositories as well.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1618467/+subscriptions