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

Asked by Hua Zhang

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
2012-04-23 09:42:36 TRACE nova.rpc.amqp while not socket_connect(fd, address):
2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib/python2.7/site-packages/eventlet/greenio.py", line 33, in socket_connect
2012-04-23 09:42:36 TRACE nova.rpc.amqp err = descriptor.connect_ex(address)
2012-04-23 09:42:36 TRACE nova.rpc.amqp File "/usr/lib64/python2.7/socket.py", line 224, in meth
2012-04-23 09:42:36 TRACE nova.rpc.amqp return getattr(self._sock,name)(*args)
2012-04-23 09:42:36 TRACE nova.rpc.amqp TypeError: an integer is required
2012-04-23 09:42:36 TRACE nova.rpc.amqp

[root@hua glance]# nova-manage service list
2012-04-23 09:44:26 DEBUG nova.utils [req-0aa57e81-ff10-43e0-8a44-b5e124b69868 None None] backend <module 'nova.db.sqlalchemy.api' from '/bak/openstack/nova/nova/db/sqlalchemy/api.pyc'> from (pid=10045) __get_backend /bak/openstack/nova/nova/utils.py:659
Binary Host Zone Status State Updated_At
nova-compute hua.cn.ibm.com nova enabled :-) 2012-04-23 01:44:24
nova-scheduler hua.cn.ibm.com nova enabled :-) 2012-04-23 01:44:24
nova-cert hua.cn.ibm.com nova enabled :-) 2012-04-23 01:44:24
nova-volume hua.cn.ibm.com nova enabled :-) 2012-04-23 01:44:24
nova-network hua.cn.ibm.com nova enabled :-) 2012-04-23 01:44:24

[root@hua glance]# ./bin/glance -f index
ID Name Disk Format Container Format Size
------------------------------------ ------------------------------ -------------------- -------------------- --------------
5213ac41-a588-419f-9b50-c86217433df9 cirros ami ami 25165824
cec1e65c-b8a2-46cd-8df8-f42b63812df2 cirros-ramdisk ari ari 5882349
be936686-abec-42fe-b789-535006d11d54 cirros-kernel aki aki 4404752

[root@hua glance]# quantum list_nets default
Virtual Networks for Tenant default
 Network ID: 47deee15-5648-4e70-925d-50331dc2b513

[root@hua glance]# nova boot --image 5213ac41-a588-419f-9b50-c86217433df9 --flavor 1 --nic net-id=47deee15-5648-4e70-925d-50331dc2b513 test1
ERROR: TypeError: an integer is required (HTTP 400)
[root@hua glance]# nova --debug boot --image 5213ac41-a588-419f-9b50-c86217433df9 --flavor 1 --nic net-id=47deee15-5648-4e70-925d-50331dc2b513 test1
connect: (localhost, 35357)
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: localhost:35357\r\nContent-Length: 103\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "password"}}}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json
header: Vary: X-Auth-Token
header: Content-Length: 1965
header: Date: Mon, 23 Apr 2012 01:43:47 GMT
connect: (localhost, 8774)
send: u'GET /v1.1/986a58e77d8c49da9b4ff0dd1e823f0f/flavors/1 HTTP/1.1\r\nHost: localhost:8774\r\nx-auth-project-id: admin\r\nx-auth-token: 287894ed777746f48ff6413a653f5857\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id: req-ec38e804-0f74-4fa8-b896-b3cb5302d66a
header: Content-Type: application/json
header: Content-Length: 347
header: Date: Mon, 23 Apr 2012 01:43:47 GMT
send: u'GET /v1.1/986a58e77d8c49da9b4ff0dd1e823f0f/images/5213ac41-a588-419f-9b50-c86217433df9 HTTP/1.1\r\nHost: localhost:8774\r\nx-auth-project-id: admin\r\nx-auth-token: 287894ed777746f48ff6413a653f5857\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id: req-10527be7-143c-4e85-b5ee-b808a675d103
header: Content-Type: application/json
header: Content-Length: 779
header: Date: Mon, 23 Apr 2012 01:43:47 GMT
send: u'POST /v1.1/986a58e77d8c49da9b4ff0dd1e823f0f/servers HTTP/1.1\r\nHost: localhost:8774\r\nContent-Length: 195\r\nx-auth-project-id: admin\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nx-auth-token: 287894ed777746f48ff6413a653f5857\r\nuser-agent: python-novaclient\r\ncontent-type: application/json\r\n\r\n{"server": {"name": "test1", "imageRef": "5213ac41-a588-419f-9b50-c86217433df9", "flavorRef": "1", "max_count": 1, "min_count": 1, "networks": [{"uuid": "47deee15-5648-4e70-925d-50331dc2b513"}]}}'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Content-Length: 77
header: Content-Type: application/json; charset=UTF-8
header: X-Compute-Request-Id: req-9aaecbd6-d22b-4086-99be-296b86b7098b
header: Date: Mon, 23 Apr 2012 01:43:48 GMT
DEBUG (shell:423) TypeError: an integer is required (HTTP 400)
Traceback (most recent call last):
  File "/bak/openstack/python-novaclient/novaclient/shell.py", line 420, in main
    OpenStackComputeShell().main(sys.argv[1:])
  File "/bak/openstack/python-novaclient/novaclient/shell.py", line 371, in main
    args.func(self.cs, args)
  File "/bak/openstack/python-novaclient/novaclient/v1_1/shell.py", line 209, in do_boot
    server = cs.servers.create(*boot_args, **boot_kwargs)
  File "/bak/openstack/python-novaclient/novaclient/v1_1/servers.py", line 456, in create
    **boot_kwargs)
  File "/bak/openstack/python-novaclient/novaclient/v1_1/base.py", line 153, in _boot
    return_raw=return_raw, **kwargs)
  File "/bak/openstack/python-novaclient/novaclient/base.py", line 149, in _create
    resp, body = self.api.client.post(url, body=body)
  File "/bak/openstack/python-novaclient/novaclient/client.py", line 139, in post
    return self._cs_request(url, 'POST', **kwargs)
  File "/bak/openstack/python-novaclient/novaclient/client.py", line 124, in _cs_request
    **kwargs)
  File "/bak/openstack/python-novaclient/novaclient/client.py", line 107, in request
    raise exceptions.from_response(resp, body)
BadRequest: TypeError: an integer is required (HTTP

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
dan wendlandt
Solved:
Last query:
Last reply:
Revision history for this message
dan wendlandt (danwent) said :
#1

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 <
<email address hidden>> wrote:

> New question #194444 on quantum:
> https://answers.launchpad.net/quantum/+question/194444
>
> 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
> 2012-04-23 09:42:36 TRACE nova.rpc.amqp while not socket_connect(fd,
> address):
> 2012-04-23 09:42:36 TRACE nova.rpc.amqp File
> "/usr/lib/python2.7/site-packages/eventlet/greenio.py", line 33, in
> socket_connect
> 2012-04-23 09:42:36 TRACE nova.rpc.amqp err =
> descriptor.connect_ex(address)
> 2012-04-23 09:42:36 TRACE nova.rpc.amqp File
> "/usr/lib64/python2.7/socket.py", line 224, in meth
> 2012-04-23 09:42:36 TRACE nova.rpc.amqp return
> getattr(self._sock,name)(*args)
> 2012-04-23 09:42:36 TRACE nova.rpc.amqp TypeError: an integer is required
> 2012-04-23 09:42:36 TRACE nova.rpc.amqp
>
>
>
> [root@hua glance]# nova-manage service list
> 2012-04-23 09:44:26 DEBUG nova.utils
> [req-0aa57e81-ff10-43e0-8a44-b5e124b69868 None None] backend <module
> 'nova.db.sqlalchemy.api' from
> '/bak/openstack/nova/nova/db/sqlalchemy/api.pyc'> from (pid=10045)
> __get_backend /bak/openstack/nova/nova/utils.py:659
> Binary Host Zone
> Status State Updated_At
> nova-compute hua.cn.ibm.com nova
> enabled :-) 2012-04-23 01:44:24
> nova-scheduler hua.cn.ibm.com nova
> enabled :-) 2012-04-23 01:44:24
> nova-cert hua.cn.ibm.com nova
> enabled :-) 2012-04-23 01:44:24
> nova-volume hua.cn.ibm.com nova
> enabled :-) 2012-04-23 01:44:24
> nova-network hua.cn.ibm.com nova
> enabled :-) 2012-04-23 01:44:24
>
>
> [root@hua glance]# ./bin/glance -f index
> ID Name Disk
> Format Container Format Size
> ------------------------------------ ------------------------------
> -------------------- -------------------- --------------
> 5213ac41-a588-419f-9b50-c86217433df9 cirros ami
> ami 25165824
> cec1e65c-b8a2-46cd-8df8-f42b63812df2 cirros-ramdisk ari
> ari 5882349
> be936686-abec-42fe-b789-535006d11d54 cirros-kernel aki
> aki 4404752
>
>
> [root@hua glance]# quantum list_nets default
> Virtual Networks for Tenant default
> Network ID: 47deee15-5648-4e70-925d-50331dc2b513
>
>
>
> [root@hua glance]# nova boot --image 5213ac41-a588-419f-9b50-c86217433df9
> --flavor 1 --nic net-id=47deee15-5648-4e70-925d-50331dc2b513 test1
> ERROR: TypeError: an integer is required (HTTP 400)
> [root@hua glance]# nova --debug boot --image
> 5213ac41-a588-419f-9b50-c86217433df9 --flavor 1 --nic
> net-id=47deee15-5648-4e70-925d-50331dc2b513 test1
> connect: (localhost, 35357)
> send: 'POST /v2.0/tokens HTTP/1.1\r\nHost:
> localhost:35357\r\nContent-Length: 103\r\ncontent-type:
> application/json\r\naccept-encoding: gzip, deflate\r\naccept:
> application/json\r\nuser-agent: python-novaclient\r\n\r\n{"auth":
> {"tenantName": "admin", "passwordCredentials": {"username": "admin",
> "password": "password"}}}'
> reply: 'HTTP/1.1 200 OK\r\n'
> header: Content-Type: application/json
> header: Vary: X-Auth-Token
> header: Content-Length: 1965
> header: Date: Mon, 23 Apr 2012 01:43:47 GMT
> connect: (localhost, 8774)
> send: u'GET /v1.1/986a58e77d8c49da9b4ff0dd1e823f0f/flavors/1
> HTTP/1.1\r\nHost: localhost:8774\r\nx-auth-project-id:
> admin\r\nx-auth-token: 287894ed777746f48ff6413a653f5857\r\naccept-encoding:
> gzip, deflate\r\naccept: application/json\r\nuser-agent:
> python-novaclient\r\n\r\n'
> reply: 'HTTP/1.1 200 OK\r\n'
> header: X-Compute-Request-Id: req-ec38e804-0f74-4fa8-b896-b3cb5302d66a
> header: Content-Type: application/json
> header: Content-Length: 347
> header: Date: Mon, 23 Apr 2012 01:43:47 GMT
> send: u'GET
> /v1.1/986a58e77d8c49da9b4ff0dd1e823f0f/images/5213ac41-a588-419f-9b50-c86217433df9
> HTTP/1.1\r\nHost: localhost:8774\r\nx-auth-project-id:
> admin\r\nx-auth-token: 287894ed777746f48ff6413a653f5857\r\naccept-encoding:
> gzip, deflate\r\naccept: application/json\r\nuser-agent:
> python-novaclient\r\n\r\n'
> reply: 'HTTP/1.1 200 OK\r\n'
> header: X-Compute-Request-Id: req-10527be7-143c-4e85-b5ee-b808a675d103
> header: Content-Type: application/json
> header: Content-Length: 779
> header: Date: Mon, 23 Apr 2012 01:43:47 GMT
> send: u'POST /v1.1/986a58e77d8c49da9b4ff0dd1e823f0f/servers
> HTTP/1.1\r\nHost: localhost:8774\r\nContent-Length:
> 195\r\nx-auth-project-id: admin\r\naccept-encoding: gzip,
> deflate\r\naccept: application/json\r\nx-auth-token:
> 287894ed777746f48ff6413a653f5857\r\nuser-agent:
> python-novaclient\r\ncontent-type: application/json\r\n\r\n{"server":
> {"name": "test1", "imageRef": "5213ac41-a588-419f-9b50-c86217433df9",
> "flavorRef": "1", "max_count": 1, "min_count": 1, "networks": [{"uuid":
> "47deee15-5648-4e70-925d-50331dc2b513"}]}}'
> reply: 'HTTP/1.1 400 Bad Request\r\n'
> header: Content-Length: 77
> header: Content-Type: application/json; charset=UTF-8
> header: X-Compute-Request-Id: req-9aaecbd6-d22b-4086-99be-296b86b7098b
> header: Date: Mon, 23 Apr 2012 01:43:48 GMT
> DEBUG (shell:423) TypeError: an integer is required (HTTP 400)
> Traceback (most recent call last):
> File "/bak/openstack/python-novaclient/novaclient/shell.py", line 420, in
> main
> OpenStackComputeShell().main(sys.argv[1:])
> File "/bak/openstack/python-novaclient/novaclient/shell.py", line 371, in
> main
> args.func(self.cs, args)
> File "/bak/openstack/python-novaclient/novaclient/v1_1/shell.py", line
> 209, in do_boot
> server = cs.servers.create(*boot_args, **boot_kwargs)
> File "/bak/openstack/python-novaclient/novaclient/v1_1/servers.py", line
> 456, in create
> **boot_kwargs)
> File "/bak/openstack/python-novaclient/novaclient/v1_1/base.py", line
> 153, in _boot
> return_raw=return_raw, **kwargs)
> File "/bak/openstack/python-novaclient/novaclient/base.py", line 149, in
> _create
> resp, body = self.api.client.post(url, body=body)
> File "/bak/openstack/python-novaclient/novaclient/client.py", line 139,
> in post
> return self._cs_request(url, 'POST', **kwargs)
> File "/bak/openstack/python-novaclient/novaclient/client.py", line 124,
> in _cs_request
> **kwargs)
> File "/bak/openstack/python-novaclient/novaclient/client.py", line 107,
> in request
> raise exceptions.from_response(resp, body)
> BadRequest: TypeError: an integer is required (HTTP
>
>
> --
> You received this question notification because you are an answer
> contact for quantum.
>

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira, Inc: www.nicira.com
twitter: danwendlandt
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Revision history for this message
Hua Zhang (zhhuabj) said :
#2

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.

Revision history for this message
Hua Zhang (zhhuabj) said :
#3

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.

Revision history for this message
Best dan wendlandt (danwent) said :
#4

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?

Revision history for this message
Hua Zhang (zhhuabj) said :
#5

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.

Revision history for this message
dan wendlandt (danwent) said :
#6

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?

Revision history for this message
Hua Zhang (zhhuabj) said :
#7

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.

Revision history for this message
Hua Zhang (zhhuabj) said :
#8

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.

Revision history for this message
Hua Zhang (zhhuabj) said :
#9

Thanks dan wendlandt, that solved my question.

Revision history for this message
Hua Zhang (zhhuabj) said :
#10

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.

Revision history for this message
Hua Zhang (zhhuabj) said :
#11