nova command fails, when enable squid client in /etc/profile

Bug #1264748 reported by DennyZhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

When testing OpenStack in my local environment, downloading package or yum install takes a lot of time.

Thus, I enable squid in all nodes, by pointing http_proxy to a local squid server.
,-----------
| echo "export http_proxy='http://denny:@192.168.209.1:3128/'" >>/etc/profile
`-----------

squid client works well, but nova cli fail.
,-----------
| [root@control ~(keystone_admin)]# nova --debug hypervisor-show 1
| nova --debug hypervisor-show 1
|
| REQ: curl -i http://192.168.209.131:35357/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "9d278a0b5fcc4f4e"}}}'
|
| INFO (connectionpool:203) Starting new HTTP connection (1): 192.168.209.1
| DEBUG (connectionpool:295) "POST http://192.168.209.131:35357/v2.0/tokens HTTP/1.1" 504 1113
| RESP: [504] {'content-length': '1113', 'via': '1.0 macs-mac-mini.att.net:3128 (squid/2.7.STABLE9)', 'x-cache': 'MISS from macs-mac-mini.att.net', 'x-squid-error': 'ERR_CONNECT_FAIL 61', 'server': 'squid/2.7.STABLE9', 'connection': 'close', 'date': 'Sat, 28 Dec 2013 21:08:08 GMT', 'content-type': 'text/html'}
| RESP BODY: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
| <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
| <TITLE>ERROR: The requested URL could not be retrieved</TITLE>
| <STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
| </HEAD><BODY>
| <H1>ERROR</H1>
| <H2>The requested URL could not be retrieved</H2>
| <HR noshade size="1px">
| <P>
| While trying to retrieve the URL:
| <A HREF="http://192.168.209.131:35357/v2.0/tokens">http://192.168.209.131:35357/v2.0/tokens</A>
| <P>
| The following error was encountered:
| <UL>
| <LI>
| <STRONG>
| Connection to 192.168.209.131 Failed
| </STRONG>
| </UL>
|
| <P>
| The system returned:
| <PRE><I> (61) Connection refused</I></PRE>
|
| <P>
| The remote host or network may be down. Please try the request again.
| <P>Your cache administrator is <A HREF="mailto:webmaster">webmaster</A>.
|
| <BR clear="all">
| <HR noshade size="1px">
| <ADDRESS>
| Generated Sat, 28 Dec 2013 21:08:08 GMT by macs-mac-mini.att.net (squid/2.7.STABLE9)
| </ADDRESS>
| </BODY></HTML>
|
|
| DEBUG (shell:740) <attribute 'message' of 'exceptions.BaseException' objects> (HTTP 504)
| Traceback (most recent call last):
| File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 737, in main
| OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
| File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 667, in main
| self.cs.authenticate()
| File "/usr/lib/python2.6/site-packages/novaclient/v1_1/client.py", line 171, in authenticate
| self.client.authenticate()
| File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 329, in authenticate
| auth_url = self._v2_auth(auth_url)
| File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 411, in _v2_auth
| return self._authenticate(url, body)
| File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 423, in _authenticate
| **kwargs)
| File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 195, in _time_request
| resp, body = self.request(url, method, **kwargs)
| File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 189, in request
| raise exceptions.from_response(resp, body, url, method)
| ClientException: <attribute 'message' of 'exceptions.BaseException' objects> (HTTP 504)
| ERROR: <attribute 'message' of 'exceptions.BaseException' objects> (HTTP 504)
`-----------

DennyZhang (denny-6)
summary: - nova command fail, when enable squid in /etc/profile
+ nova command fails, when enable squid client in /etc/profile
Revision history for this message
Michael Still (mikal) wrote :

So I tested this by:

 - bringing up a new VM in a public cloud
 - installing devstack
 - verifying that I could boot an instance in devstack
 - installing / configuring squid
 - verified squid was working
 - made python nova client requests

These requests appear in the squid log, and work for me.

Are there additional steps I need to duplicate this problem, or is it perhaps a local squid misconfiguration?

Changed in nova:
status: New → Incomplete
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

I think maybe the openstack management network should not be proxied. I use another proxy software in my local env and set openstack management network to ignore list.

Michael Still (mikal)
Changed in nova:
status: Incomplete → Invalid
Revision history for this message
yilong.sun (yilong-sun) wrote :

i encountered this issue, when i use command "nova volume-list --all-tenants 1", it gave the follow error message "ERROR: <attribute 'message' of 'exceptions.BaseException' objects> (HTTP 504)"

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.