Error with multiple networks, when kwargs["nics"] is empty

Bug #1831247 reported by Ondrej Duchon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Undecided
Unassigned

Bug Description

Description
===========
There is a situation with several scenarios, where parameter 'auto_assign_nic' is not available (for randomly chosen network prepared by context) and also net-id was not set.

Steps to reproduce
==================
For example this scenario:
- title: NovaServers.boot_lock_unlock_and_delete tests
    scenario:
      NovaServers.boot_lock_unlock_and_delete:
        flavor:
          name: {{flavor_name}}
        image:
          name: {{image_name}}
    runner:
      constant:
        times: 1
        concurrency: 1
    contexts:
      network: {}

Actual result
=============
I want to use network created by context, but method (in rally_openstack/scenarios/nova/utils.py, NR 80) doesn't allow that:

if auto_assign_nic and not kwargs.get("nics", False):
    nic = self._pick_random_nic()
    if nic:
        kwargs["nics"] = nic

Because of not selected network, there is error with multiple network raised.

Logs & Configs
==============
novaclient.exceptions.Conflict: Multiple possible networks found, use a Network ID to be more specific. (HTTP 409)

Revision history for this message
Matt Riedemann (mriedem) wrote :

I'm not sure why this is a nova bug - if the tenant has multiple networks available to it, the request to create the server must specify a network (or port) otherwise yes you get the 400 NetworkAmbiguous error. This sounds like a Rally bug rather than a nova bug.

Note there is a related blueprint to add a default network attribute to neutron and then nova could use that in this case:

https://blueprints.launchpad.net/nova/+spec/deal-with-networkambiguous-error

But that blueprint doesn't have an owner at the moment.

Changed in nova:
status: New → Invalid
Revision history for this message
Ondrej Duchon (duchonondrej) wrote :

Moving to Rally bug.

no longer affects: nova
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to rally-openstack (master)

Reviewed: https://review.opendev.org/662475
Committed: https://git.openstack.org/cgit/openstack/rally-openstack/commit/?id=d63de4bdb0d8653e2fb36e8a9499dcfbce0f9a3f
Submitter: Zuul
Branch: master

commit d63de4bdb0d8653e2fb36e8a9499dcfbce0f9a3f
Author: Ondrej Duchon <email address hidden>
Date: Fri May 31 16:02:08 2019 +0200

    Adds support for choosing first network created in context.

    If scenario doesn't accept parameter 'auto_assign_nic'
    it will choose first available network created in context.

    Change-Id: I3aa8bb2d400abb593f5a2110b5aab82e3d08fcdb
    Closes-Bug: #1831247

Changed in rally:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/rally-openstack 1.6.0

This issue was fixed in the openstack/rally-openstack 1.6.0 release.

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.