yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #64657
[Bug 1618467] Re: cloud-init does not take into consideration proxies when adding PPA's.
** Summary changed:
- [2.1] Fail to add PPA behind maas-proxy
+ cloud-init does not take into consideration proxies when adding PPA's.
** Summary changed:
- cloud-init does not take into consideration proxies when adding PPA's.
+ cloud-init does not take into consideration proxy when adding PPA's.
** Also affects: cloud-init
Importance: Undecided
Status: New
** Description changed:
- I have an environment behind maas-proxy, this is how machines connect to
- the external world. I've added an additional repository in MAAS to add a
- PPA, however, when the PPA is added, it fails with:
+ 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:
- 2016-08-30 13:39:39,473 - util.py[WARNING]: Failed to run debconf-set-selections for grub-dpkg
- 2016-08-30 13:39:52,061 - cc_apt_configure.py[ERROR]: add-apt-repository failed.
+ 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 397, in add_apt_sources
+ 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 1832, in subp
+ 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:andreserl/maas']
+ Command: ['add-apt-repository', 'ppa:hardware-certification/public']
Exit code: 1
Reason: -
- Stdout: "Cannot add PPA: 'ppa:~andreserl/ubuntu/maas'.\nERROR: '~andreserl' user or team does not exist.\n"
- Stderr: ''
- 2016-08-30 13:39:52,124 - util.py[WARNING]: Running module apt-configure (<module 'cloudinit.config.cc_apt_configure' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_apt_configure.py'>) failed
- ubuntu@node01:/var/log$ sudo add-apt-repository ppa:andreserl/maas
+ 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.
** Changed in: maas
Status: Triaged => Opinion
** Changed in: maas
Importance: High => Undecided
--
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:
New
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