Bug 2041346

Summary: [RHOSP 16.1] set the log priority to log.info in "ensure_device_is_ready" function in ip_lib.py
Product: Red Hat OpenStack Reporter: Punit Kundal <pkundal>
Component: openstack-neutronAssignee: Slawek Kaplonski <skaplons>
Status: CLOSED ERRATA QA Contact: Eran Kuris <ekuris>
Severity: low Docs Contact:
Priority: high    
Version: 16.1 (Train)CC: ccamposr, chrisw, fgadkano, scohen
Target Milestone: z9Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-neutron-15.2.1-1.20220124083747.40d217c.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-07 20:28:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Punit Kundal 2022-01-17 07:08:28 UTC
Description of problem:

It is noticed that when creating a subnet with dhcp enabled; the "ensure_device_is_ready" function logs with error priority:

+++
def ensure_device_is_ready(device_name, namespace=None):
    dev = IPDevice(device_name, namespace=namespace)
    try:
        # Ensure the device has a MAC address and is up, even if it is already
        # up.
        if not dev.link.exists or not dev.link.address:
            LOG.error("Device %s cannot be used as it has no MAC "
                      "address", device_name)
            return False
        dev.link.set_up()
    except RuntimeError:
        return False
    return True
+++

this appears to be called from the below:

+++
   1612     def setup(self, network):
   1613         """Create and initialize a device for network's DHCP on this host."""
   1614         try:
   1615             port = self.setup_dhcp_port(network)
   1616         except Exception:
   1617             with excutils.save_and_reraise_exception():
   1618                 # clear everything out so we don't leave dangling interfaces
   1619                 # if setup never succeeds in the future.
   1620                 self._cleanup_stale_devices(network, dhcp_port=None)
   1621         self._update_dhcp_port(network, port)
....
   1640         if ip_lib.ensure_device_is_ready(interface_name,
   1641                                          namespace=network.namespace):
   1642             LOG.debug('Reusing existing device: %s.', interface_name)
   1643             # force mtu on the port for in case it was changed for the network
   1644             mtu = getattr(network, 'mtu', 0)
   1645             if mtu:
   1646                 self.driver.set_mtu(interface_name, mtu,
   1647                                     namespace=network.namespace)
   1648         else:
   1649             try:
   1650                 self.plug(network, port, interface_name)
+++

this should rather be logged with either log.info or log.debug instead

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 16 errata-xmlrpc 2022-12-07 20:28:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat OpenStack Platform 16.1.9 (openstack-neutron) security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8870