Bug 1951228

Summary: Instance sticks in BUILD when scheduling with a port assigned invalid MAC
Product: Red Hat OpenStack Reporter: Artom Lifshitz <alifshit>
Component: openstack-neutronAssignee: Rodolfo Alonso <ralonsoh>
Status: CLOSED DUPLICATE QA Contact: Eran Kuris <ekuris>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.2 (Train)CC: akatz, amuller, chrisw, scohen
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-27 08:52:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Artom Lifshitz 2021-04-19 20:57:58 UTC
This bug was initially created as a copy of Bug #1949703

I am copying this bug because: 

Neutron should do port MAC address format validation at the API level, and prevent ports with invalid MAC addresses from being created. See below for full original description.


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 1 Rodolfo Alonso 2021-04-27 08:52:10 UTC

*** This bug has been marked as a duplicate of bug 1949632 ***