http proxy 403 downloading maas images

Bug #1538474 reported by Paolo de Rosa
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
maas-deployer
Incomplete
Undecided
Unassigned

Bug Description

When http_proxy is set maas deployer, the request to upload images to maas fails due to a 403 error from the proxy. So a workaround could be to add in no_proxy env variable at least maas server ip and localhost.

description: updated
Revision history for this message
Edward Hope-Morley (hopem) wrote :

Paolo, i'm not sure what could be causing this. Can you please provide some log output and relevant config so I can see exactly at which point this is happening? If what you are asking for if to have m-d add env vars in cloud-init then I am working on this atm.

Changed in maas-deployer:
status: New → Incomplete
summary: - When http_proxy is set maas-deployer use it
+ http proxy 403 downloading maas images
Revision history for this message
Cédric OLLIVIER (m.col) wrote :
Download full text (3.8 KiB)

I think I reproduce a similar issue. Please find below the related data.

$ sudo ./02-maasdeploy.sh
...
2016-03-03 08:56:08,813 DEBUG Executing: 'ssh -i /home/labo/.ssh/id_maas -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet ubuntu@192.168.122.2 maas maas boot-resources import' stdin='LC_ALL=C'
2016-03-03 08:56:11,758 DEBUG Command executed successfully: stdout='Import of boot resources started'
2016-03-03 08:56:11,759 DEBUG Logging into 192.168.122.2
Traceback (most recent call last):
  File "/usr/bin/maas-deployer", line 9, in <module>
    load_entry_point('maas-deployer==0.0.6', 'console_scripts', 'maas-deployer')()
  File "/usr/lib/python2.7/dist-packages/maas_deployer/cli.py", line 88, in main
    engine.deploy(target)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/engine.py", line 74, in deploy
    self.wait_for_import_boot_images(client, maas_config)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/engine.py", line 317, in wait_for_import_boot_images
    checker.do_login()
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/maasclient/bootimages.py", line 38, in do_login
    response, _ = self.http.request(url, 'GET')
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1569, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1316, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1251, in _conn_request
    conn.connect()
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 900, in connect
    self.sock.connect((self.host, self.port) + sa[2:])
  File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 424, in connect
    self.__negotiatehttp(destpair[0], destpair[1])
  File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 390, in __negotiatehttp
    raise HTTPError((statuscode, statusline[2]))
httplib2.socks.HTTPError: (403, 'Forbidden')

$ env |grep proxy
http_proxy=http://10.193.118.37:8080
ftp_proxy=http://10.193.118.37:8080
https_proxy=http://10.193.118.37:8080
no_proxy=10.0.0.0/8,192.168.0.0/12

$ git diff
diff --git a/ci/deployment.yaml b/ci/deployment.yaml
index 8ebfd5a..a736577 100644
--- a/ci/deployment.yaml
+++ b/ci/deployment.yaml
@@ -32,11 +32,11 @@ demo-maas:
         disk_size: 60G

         # Apt http proxy setting(s)
- #apt_http_proxy:
+ apt_http_proxy: http://10.193.118.37:8080

         # Package sources. These will be used on the MAAS controller.
         apt_sources:
- - ppa:maas/next
+ - ppa:maas/stable
           - ppa:juju/stable

         # Virsh power settings
@@ -45,9 +45,9 @@ demo-maas:
         # --remote is used. If no power settings are desired, then do not
         # supply the virsh block.
         virsh:
- rsa_priv_key: /home/ubuntu/.ssh/id_rsa
- rsa_pub_key: /home/ubuntu/.ssh/id_rsa.pub
- uri: qemu+ssh://ubuntu@192.168.122.1/system
+ rsa_priv_key: /hom...

Read more...

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.