Floating IP test assume label is private

Bug #978958 reported by Julien Danjou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Julien Danjou

Bug Description

======================================================================
ERROR: test suite for <class 'tempest.tests.test_floating_ips_actions.FloatingIPsTest'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/lib/python2.7/dist-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/lib/python2.7/dist-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/lib/python2.7/dist-packages/nose/util.py", line 478, in try_run
    return func()
  File "/home/jd/Work/src/tempest/tempest/tests/test_floating_ips_actions.py", line 27, in setUpClass
    cls.fixed_ip_addr = body['addresses']['private'][0]['addr']
KeyError: 'private'

This is raised because the code assume the label of the network will be private, but it might be things like "private_12" since network/manager.py creates network with such names.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/6459

Changed in tempest:
assignee: nobody → Julien Danjou (jdanjou)
status: New → In Progress
Revision history for this message
Julien Danjou (jdanjou) wrote :

======================================================================
FAIL: All public and private addresses for
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jd/Work/src/tempest/tempest/tests/compute/test_server_addresses.py", line 64, in test_list_server_addresses
    and len(addresses['private']) > 0)
AssertionError: False is not True

This test fails too for the same (bad) reason.

Revision history for this message
Jay Pipes (jaypipes) wrote :

Hmm, darn it I wish the extension documentation was better :( Not sure if this is a bug in Tempest or if it is indeed possible for the private key to be missing from the return...

I'll try to investigate.

Revision history for this message
Julien Danjou (jdanjou) wrote :

I've fixed this one too in https://review.openstack.org/#change,6459 anyway.

and as I wrote in the first message:

"This is raised because the code assume the label of the network will be private, but it might be things like "private_12" since network/manager.py creates network with such names."

So clearly, I doubt anything in the spec says that IT IS named "private". :)

Revision history for this message
Daryl Walleck (dwalleck) wrote :

I wish there were docs around this too. At this point I'm about read to just dive in and start reverse engineering things. Since I don't know any of the business logic around this it's tough to say what a true solution is. Without anything else, I'm assuming a floating ip could be assigned to a network named "foo" as well. It sounds like something we would want to configure or infer. I prefer explicit usually, but I'm not sure what makes sense in this case.

Revision history for this message
David Kranz (david-kranz) wrote :

I asked a nova question about this a while back but it expired without answer https://answers.launchpad.net/nova/+question/187343. Looking at the code, I don't think this 'label' is used for anything at all code-wise. So it could be anything which I guess means we should not be expecting any name in particular.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/6459
Committed: http://github.com/openstack/tempest/commit/24ea4ad6293a0fa908304364bc3b17916dcb56da
Submitter: Jenkins
Branch: master

commit 24ea4ad6293a0fa908304364bc3b17916dcb56da
Author: Julien Danjou <email address hidden>
Date: Wed Apr 11 16:15:00 2012 +0200

    Do not assume network names

    It might be anything else than "public" or "private". This fixes bug #978958.

    Change-Id: Id15d5416b6e437750d352e38873880fef286cfc0
    Signed-off-by: Julien Danjou <email address hidden>

Changed in tempest:
status: In Progress → Fix Committed
Jay Pipes (jaypipes)
Changed in tempest:
status: Fix Committed → Fix Released
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.