Bug 1949703 - Instance sticks in BUILD when scheduling with a port assigned invalid MAC
Summary: Instance sticks in BUILD when scheduling with a port assigned invalid MAC
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 16.2 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Alex Stupnikov
QA Contact: OSP DFG:Compute
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-14 20:28 UTC by nacurry
Modified: 2023-06-01 15:54 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-01 15:54:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 2015092 0 None None None 2023-04-03 14:17:47 UTC
OpenStack gerrit 879350 0 None MERGED Process unlimited exceptions raised by unplug_vifs 2023-06-08 08:28:29 UTC
Red Hat Issue Tracker OSP-2988 0 None None None 2023-03-31 13:31:16 UTC

Description nacurry 2021-04-14 20:28:30 UTC
Description of problem
======================
Currently due to BZ 1949632, you can create a port with an invalid MAC address by omitting characters.

Building an instance with such a port will result in the instance stuck in BUILD state instead of failing.


Version-Release number of selected component
============================================
[root@ess1612-ctrl-0 heat-admin]# podman exec -it nova_scheduler rpm -qa | grep openstack-nova
openstack-nova-common-20.3.1-0.20200626213435.38ee1f3.el8ost.noarch
openstack-nova-scheduler-20.3.1-0.20200626213435.38ee1f3.el8ost.noarch

[root@ess1612-ctrl-0 heat-admin]# podman exec -it neutron_ovs_agent rpm -qa | grep openstack-neutron
openstack-neutron-openvswitch-15.1.1-0.20200611111910.7d97420.el8ost.noarch
openstack-neutron-ml2-15.1.1-0.20200611111910.7d97420.el8ost.noarch
openstack-neutron-common-15.1.1-0.20200611111910.7d97420.el8ost.noarch
openstack-neutron-15.1.1-0.20200611111910.7d97420.el8ost.noarch



How reproducible
================
Every time.

Reproduced with DPDK, SRIOV test machine unavailable.

Steps to Reproduce
==================
1. Create bad port
$ openstack port create --mac-address 40:28:0:00:2:6 --disable-port-security --network ess-dpdk-1370 test-port-bad-mac_user-dpdk2

2. Create server using bad port
$ openstack server create --flavor m1.tiny  --image cirros --nic port-id=023abee9-a896-4678-b6fe-d4abae9066f0 dpdk-instance-bad-mac2

Actual results
==============
Instance hangs in BUILD indeterminately (current lab task, about 6 hours)


Expected results
================
Instance build fails and goes to ERROR

Additional info
===============
- Further info to be provided in ensuing comments.
- Will attach debug logs
- Sosreports available

Comment 3 Artom Lifshitz 2021-04-19 20:58:26 UTC
From Nova's POV, this is valid, as OVO raising a ValueError should cause the instance to go into ERROR, and not remain stuck in BUILD. I've also filed BZ 1951228 with Neutron to request better validation at the port create API level.

Comment 4 nacurry 2021-04-21 00:43:11 UTC
Hi Artom,
> OVO raising a ValueError should cause the instance to go into ERROR, and not remain stuck in BUILD 

Currently, the instance remains in BUILD state indefinitely.  We want it to go into ERROR state, correct?

Comment 5 Artom Lifshitz 2021-04-21 01:12:50 UTC
(In reply to nacurry from comment #4)
> Hi Artom,
> > OVO raising a ValueError should cause the instance to go into ERROR, and not remain stuck in BUILD 
> 
> Currently, the instance remains in BUILD state indefinitely.  We want it to
> go into ERROR state, correct?

Correct. I was essentially agreeing with your initial description, though the impact is admittedly low, since what will most likely end up happening regardless of whether the instance is stuck in BUILD or goes into ERROR is that the user will delete it. The real fix would be for Neutron to validate the MAC address when creating the port - hence why I filed BZ 1951228.

Comment 12 Artom Lifshitz 2023-06-01 15:54:45 UTC
Closing as UPSTREAM since this is a small cosmetic fix and we don't need any downstream trackers/cherry-picks for this.


Note You need to log in before you can comment on or make changes to this bug.