← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1204503] Re: the exception.FixedIpInvalid(msg) hasn't been handled

 

** Changed in: nova
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1204503

Title:
  the exception.FixedIpInvalid(msg) hasn't been handled

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  I write a test for  nova v3 api: fixed_ip,

      def test_set_reserve_with_invalid_ip(self):
          # NOTE(maurosr): since this exercises the same code snippet, we do it
          # only for reserve action
          body = {"reserve": "None"}
          self.assertRaises(exceptions.NotFound,
                            self.client.reserve_fixed_ip,
                            "my.invalid.ip", body)

  
  when test it with mysql, it can work. But  When test it on CI with postgres, it failed. The traceback in nova log is the following:
  2013-07-23 07:47:30.446 19334 DEBUG routes.middleware [-] Matched POST /os-fixed-ips/my.invalid.ip/action __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
  2013-07-23 07:47:30.446 19334 DEBUG routes.middleware [-] Route path: '/os-fixed-ips/:(id)/action', defaults: {'action': u'action', 'controller': <nova.api.openstack.wsgi.Resource object at 0x3d965d0>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
  2013-07-23 07:47:30.446 19334 DEBUG routes.middleware [-] Match dict: {'action': u'action', 'controller': <nova.api.openstack.wsgi.Resource object at 0x3d965d0>, 'id': u'my.invalid.ip'} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
  2013-07-23 07:47:30.447 DEBUG nova.api.openstack.wsgi [req-45127994-dded-470f-a0cb-10e441933351 admin admin] Action: 'action', body: {"reserve": "None"} _process_stack /opt/stack/new/nova/nova/api/openstack/wsgi.py:926
  2013-07-23 07:47:30.447 DEBUG nova.api.openstack.wsgi [req-45127994-dded-470f-a0cb-10e441933351 admin admin] Calling method <bound method FixedIPController.action of <nova.api.openstack.compute.plugins.v3.fixed_ips.FixedIPController object at 0x3d89cd0>> _process_stack /opt/stack/new/nova/nova/api/openstack/wsgi.py:927
  2013-07-23 07:47:30.447 DEBUG nova.api.openstack.compute.plugins.v3.fixed_ips [req-45127994-dded-470f-a0cb-10e441933351 admin admin] Reserving IP address my.invalid.ip action /opt/stack/new/nova/nova/api/openstack/compute/plugins/v3/fixed_ips.py:64
  2013-07-23 07:47:30.450 WARNING nova.db.sqlalchemy.api [req-45127994-dded-470f-a0cb-10e441933351 admin admin] Invalid fixed IP Address my.invalid.ip in request
  2013-07-23 07:47:30.451 ERROR nova.api.openstack.extensions [req-45127994-dded-470f-a0cb-10e441933351 admin admin] Unexpected exception in API method
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions Traceback (most recent call last):
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions   File "/opt/stack/new/nova/nova/api/openstack/extensions.py", line 468, in wrapped
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions     return f(*args, **kwargs)
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions   File "/opt/stack/new/nova/nova/api/openstack/compute/plugins/v3/fixed_ips.py", line 65, in action
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions     return self._set_reserved(context, id, True)
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions   File "/opt/stack/new/nova/nova/api/openstack/compute/plugins/v3/fixed_ips.py", line 75, in _set_reserved
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions     fixed_ip = db.fixed_ip_get_by_address(context, address)
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions   File "/opt/stack/new/nova/nova/db/api.py", line 480, in fixed_ip_get_by_address
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions     return IMPL.fixed_ip_get_by_address(context, address)
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions   File "/opt/stack/new/nova/nova/db/sqlalchemy/api.py", line 121, in wrapper
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions     return f(*args, **kwargs)
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions   File "/opt/stack/new/nova/nova/db/sqlalchemy/api.py", line 1184, in fixed_ip_get_by_address
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions     return _fixed_ip_get_by_address(context, address)
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions   File "/opt/stack/new/nova/nova/db/sqlalchemy/api.py", line 121, in wrapper
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions     return f(*args, **kwargs)
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions   File "/opt/stack/new/nova/nova/db/sqlalchemy/api.py", line 1202, in _fixed_ip_get_by_address
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions     raise exception.FixedIpInvalid(msg)
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions FixedIpInvalid: Invalid fixed IP Address my.invalid.ip in request
  2013-07-23 07:47:30.451 19334 TRACE nova.api.openstack.extensions 
  2013-07-23 07:47:30.454 INFO nova.api.openstack.wsgi [req-45127994-dded-470f-a0cb-10e441933351 admin admin] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <class 'nova.exception.FixedIpInvalid'>
  2013-07-23 07:47:30.454 DEBUG nova.api.openstack.wsgi [req-45127994-dded-470f-a0cb-10e441933351 admin admin] Returning 500 to user: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <class 'nova.exception.FixedIpInvalid'> __call__ /opt/stack/new/nova/nova/api/openstack/wsgi.py:1186
  2013-07-23 07:47:30.454 INFO nova.osapi_compute.wsgi.server [req-45127994-dded-470f-a0cb-10e441933351 admin admin] 127.0.0.1 "POST /v3/os-fixed-ips/my.invalid.ip/action HTTP/1.1" status: 500 len: 410 time: 0.0099280


  You can also find it in the link:
  http://logs.openstack.org/03/29703/18/check/gate-tempest-devstack-vm-
  postgres-full/34370/logs/screen-n-api.txt.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1204503/+subscriptions