Comment 3 for bug 1267723

Revision history for this message
Weiwen Chen (wei-wen-chen) wrote :

This is a problem:
# nova --insecure interface-attach cirros
ERROR: Failed to attach interface (HTTP 500) (Request-ID: req-0d424f10-0974-41cc-b1a6-9c945f96997c)

https://github.com/openstack/nova/blob/master/nova/compute/manager.py file has the check:
 if len(network_info) != 1:
            LOG.error(_('allocate_port_for_instance returned %(ports)s ports')
                      % dict(ports=len(network_info)))

However, in https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py: _get_available_networks()
if no network specified, it will get all networks in the tenant.

If more than one network in the tenant, this will definitely causing the above check failed.