Ask Your Question
0

httplib throw "TypeError: an integer is required" when run quantum on fedora 16

asked 2012-04-23 01:59:48 -0500

zhhuabj gravatar image

hi,

 When I run "nova boot "command with quantum on fedora 16, httplib throw ""TypeError: an integer is required" .
 But there is no problem on ubuntu 12.10, does someone meet this problem,  Thanks for the help.

Bellow is some info:

2012-04-23 09:42:36 TRACE nova.rpc.amqp Traceback (most recent call last): 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/bak/openstack/nova/nova/rpc/amqp.py", line 247, in _process_data 2012-04-23 09:42:36 TRACE nova.rpc.amqp rval = node_func(context=ctxt, *node_args) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/bak/openstack/nova/nova/network/quantum/manager.py", line 657, in validate_networks 2012-04-23 09:42:36 TRACE nova.rpc.amqp is_tenant_net = self.q_conn.network_exists(project_id, net_id) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/bak/openstack/nova/nova/network/quantum/quantum_connection.py", line 83, in network_exists 2012-04-23 09:42:36 TRACE nova.rpc.amqp self.client.show_network_details(net_id, tenant=tenant_id) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/bak/openstack/nova/nova/network/quantum/client.py", line 85, in with_params 2012-04-23 09:42:36 TRACE nova.rpc.amqp ret = self.func(instance, *args, *kwargs) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/bak/openstack/nova/nova/network/quantum/client.py", line 247, in show_network_details 2012-04-23 09:42:36 TRACE nova.rpc.amqp return self.do_request("GET", self.network_path % (network)) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/bak/openstack/nova/nova/network/quantum/client.py", line 185, in do_request 2012-04-23 09:42:36 TRACE nova.rpc.amqp c.request(method, action, body, headers) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib64/python2.7/httplib.py", line 955, in request 2012-04-23 09:42:36 TRACE nova.rpc.amqp self._send_request(method, url, body, headers) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib64/python2.7/httplib.py", line 989, in _send_request 2012-04-23 09:42:36 TRACE nova.rpc.amqp self.endheaders(body) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib64/python2.7/httplib.py", line 951, in endheaders 2012-04-23 09:42:36 TRACE nova.rpc.amqp self._send_output(message_body) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib64/python2.7/httplib.py", line 811, in _send_output 2012-04-23 09:42:36 TRACE nova.rpc.amqp self.send(msg) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib64/python2.7/httplib.py", line 773, in send 2012-04-23 09:42:36 TRACE nova.rpc.amqp self.connect() 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib64/python2.7/httplib.py", line 754, in connect 2012-04-23 09:42:36 TRACE nova.rpc.amqp self.timeout, self.source_address) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib/python2.7/site-packages/eventlet/green/socket.py", line 52, in create_connection 2012-04-23 09:42:36 TRACE nova.rpc.amqp sock.connect(sa) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib/python2.7/site-packages/eventlet/greenio.py", line 167, in connect ... (more)

edit retag flag offensive close merge delete

11 answers

Sort by ยป oldest newest most voted
0

answered 2012-04-28 09:42:42 -0500

zhhuabj gravatar image

now I have successfully run the openvswitch plugin + quantum and linuxbridge plugin + quantum on ubuntu server step by step. but still failed to run quantum on fedora 16 and redhat due to above problem.

edit flag offensive delete link more
0

answered 2012-05-02 09:25:57 -0500

zhhuabj gravatar image

dan, very thank you , I have fixed this issue by your good hint, the reason is as you said, nova is pass host value that is not a int, i will fire a bug for nova later, thanks.

edit flag offensive delete link more
0

answered 2012-05-02 09:37:41 -0500

zhhuabj gravatar image

fire bug, https://bugs.launchpad.net/nova/+bug/993149 (https://bugs.launchpad.net/nova/+bug/...)

edit flag offensive delete link more
0

answered 2012-04-23 02:33:06 -0500

danwent gravatar image

Are you sure the config between the two setups is exactly the same? It seems like the python httplib is passing the underlying socket lib a value that is not an int. Perhaps the port number or the timeout? Did you change the default for either of these? Perhaps you specified it as a string, not as an int?

Dan

On Sun, Apr 22, 2012 at 7:00 PM, Zhang Hua < question194444@answers.launchpad.net > wrote:

New question #194444 on quantum: https://answers.launchpad.net/quantum/+question/194444 (https://answers.launchpad.net/quantum...)

hi,

When I run "nova boot "command with quantum on fedora 16, httplib

throw ""TypeError: an integer is required" . But there is no problem on ubuntu 12.10, does someone meet this problem, Thanks for the help.

Bellow is some info:

2012-04-23 09:42:36 TRACE nova.rpc.amqp Traceback (most recent call last): 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/bak/openstack/nova/nova/rpc/amqp.py", line 247, in _process_data 2012-04-23 09:42:36 TRACE nova.rpc.amqp rval = node_func(context=ctxt, *node_args) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/bak/openstack/nova/nova/network/quantum/manager.py", line 657, in validate_networks 2012-04-23 09:42:36 TRACE nova.rpc.amqp is_tenant_net = self.q_conn.network_exists(project_id, net_id) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/bak/openstack/nova/nova/network/quantum/quantum_connection.py", line 83, in network_exists 2012-04-23 09:42:36 TRACE nova.rpc.amqp self.client.show_network_details(net_id, tenant=tenant_id) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/bak/openstack/nova/nova/network/quantum/client.py", line 85, in with_params 2012-04-23 09:42:36 TRACE nova.rpc.amqp ret = self.func(instance, *args, *kwargs) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/bak/openstack/nova/nova/network/quantum/client.py", line 247, in show_network_details 2012-04-23 09:42:36 TRACE nova.rpc.amqp return self.do_request("GET", self.network_path % (network)) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/bak/openstack/nova/nova/network/quantum/client.py", line 185, in do_request 2012-04-23 09:42:36 TRACE nova.rpc.amqp c.request(method, action, body, headers) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib64/python2.7/httplib.py", line 955, in request 2012-04-23 09:42:36 TRACE nova.rpc.amqp self._send_request(method, url, body, headers) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib64/python2.7/httplib.py", line 989, in _send_request 2012-04-23 09:42:36 TRACE nova.rpc.amqp self.endheaders(body) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib64/python2.7/httplib.py", line 951, in endheaders 2012-04-23 09:42:36 TRACE nova.rpc.amqp self._send_output(message_body) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib64/python2.7/httplib.py", line 811, in _send_output 2012-04-23 09:42:36 TRACE nova.rpc.amqp self.send(msg) 2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib64/python2.7/httplib.py", line 773, in send 2012-04-23 09 ...

(more)
edit flag offensive delete link more
0

answered 2012-04-23 03:05:31 -0500

zhhuabj gravatar image

hi dan, I can ensure it is exactly the same between the two setups because I do them by hand rather than devstack script. and I aslo debug line 185 " c.request(method, action, body, headers)" of $nova/nova/network/quantum/client.py in both fedora and ubuntu. I found the input parameters are both same , but that line throw error on fedora. I feel it seems that some upstream problem of httplib, but I'm not sure.

edit flag offensive delete link more
0

answered 2012-04-28 17:31:32 -0500

danwent gravatar image

It looks like this is an error being returned by nova, not quantum.

My best guess is that you're running an older version of nova that is expecting the network-id being passed in during the create-server request to be an integer, not a string UUID. I think the os-create-server extension changed from expecting an int to a UUID in early Essex. Perhaps you're running diablo nova?

edit flag offensive delete link more
0

answered 2012-05-02 02:44:16 -0500

zhhuabj gravatar image

hi dan, thank you so much for the reply, I'am not running diablo nova, I run latest nova by git. and I update the code every day.

edit flag offensive delete link more
0

answered 2012-05-02 04:22:31 -0500

danwent gravatar image

sorry, i missed the first log you posted. This is an error way down in the socket library. My best guess is that either the port or the ip address you are specifying for the quantum server are incorrect (perhaps they are strings when they should be integers?)

Perhaps try to print them out in the do_request method of nova/network/quantum/client.py .

Another possibility? are you trying to use SSL?

edit flag offensive delete link more
0

answered 2012-05-02 08:12:46 -0500

zhhuabj gravatar image

hi dan, I carefully debug it again, exception "TypeError: an integer is required" was throwed from following method in $nova/nova/network/quantum/client.py

c.request(method, action, body, headers)

bellow are some debug infos from eclipse, and following connection type "httplib.HTTPConnection" shows that I haven't use SSL.

Globals Global variables
action unicode: /v1.1/tenants/986a58e77d8c49da9b4ff0dd1e823f0f/networks/7e32a6c6-c9b4-4ef0-8f30-472ea02dcdec.json
body NoneType: None
c HTTPConnection: <httplib.httpconnection instance="" at="" 0x67f1560="">
certs dict: {}
connection_type httplib.HTTPConnection
headers dict: {'Content-Type': 'application/json'}
method str: GET
params NoneType: None
self Client: <nova.network.quantum.client.client object="" at="" 0x532ec90="">

if we use ubuntu, above method will be ok, and all input parameters are all same.

edit flag offensive delete link more
0

answered 2012-05-02 08:20:25 -0500

zhhuabj gravatar image

and as you said "It looks like this is an error being returned by nova, not quantum.", indeed I found out GET reqeust hasn't been send to quantum api by httplib, httplib connection was lost, so it seems that some upstream problem of httplib.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-04-23 01:59:48 -0500

Seen: 363 times

Last updated: May 02 '12