Bug 2010243 - [OSP16.1][OVN] disable dhcp after network creation not updated metadata
Summary: [OSP16.1][OVN] disable dhcp after network creation not updated metadata
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-networking-ovn
Version: 16.1 (Train)
Hardware: x86_64
OS: Linux
high
high
Target Milestone: z8
: 16.1 (Train on RHEL 8.2)
Assignee: Rodolfo Alonso
QA Contact: Eduardo Olivares
URL:
Whiteboard:
Depends On:
Blocks: 2015620 2018424
TreeView+ depends on / blocked
 
Reported: 2021-10-04 10:15 UTC by Luigi Tamagnone
Modified: 2022-07-04 09:53 UTC (History)
9 users (show)

Fixed In Version: python-networking-ovn-7.3.1-1.20211021113440.4e24f4c.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2015620 2018424 (view as bug list)
Environment:
Last Closed: 2022-03-24 11:01:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 807692 0 None MERGED [OVN] Update the DHCP options when the metadata port is modified 2021-11-19 11:30:47 UTC
Red Hat Issue Tracker OSP-10148 0 None None None 2021-11-15 12:41:12 UTC
Red Hat Product Errata RHBA-2022:0986 0 None None None 2022-03-24 11:02:05 UTC

Description Luigi Tamagnone 2021-10-04 10:15:55 UTC
Description of problem:
Disable DHCP on a provider network after the creation didn't change the metadata information. 

Version-Release number of selected component (if applicable):
[rhosp-release] Red Hat OpenStack Platform release 16.1.6 GA (Train)
[os-release] Red Hat Enterprise Linux 8.2 (Ootpa) 8.2 (Ootpa)

Steps to Reproduce:
1. create a provider network with DHCP enabled
2. Disable DHCP on provider network
3. Launch an instance on this network, Openstack reserves an IP address in that network for the instance. However, the instance will never be reachable as it doesn't get its IP address configured. It didn't change if it is used config-drive or cloudinit for metadata propagation.

Actual results:
- In the case of the config drive, the network is labelled ipv4_dhcp:
~~~
  "networks": [
    {
      "id": "network0",
      "type": "ipv4_dhcp",
      "link": "tapxx-bf",
      "network_id": "xxx"
    }
~~
- In case of cloudinit, netplan:
~~~
network:
    ethernets:
        ens3:
            dhcp4: true
            match:
                macaddress: xxx
            set-name: ens3
    version: 2
~~~
However, the subnet to which these instances are attached has DHCP disabled:
~~~
$ openstack subnet show -f json xxx_subnet
{
  "allocation_pools": [
    {
      "start": "xxx",
      "end": "xxx"
    }
  ],
  "cidr": "xxx/21",
  "created_at": "2021-08-27T06:50:58Z",
  "description": "",
  "dns_nameservers": [
    "xxx",
    "xxx"
  ],
  "enable_dhcp": false,
  "gateway_ip": "xxx",
  "host_routes": [],
  "id": "xxx",
  "ip_version": 4,
  "ipv6_address_mode": null,
  "ipv6_ra_mode": null,
  "location": {
    "cloud": "",
    "region_name": "xxx",
    "zone": null,
    "project": {
      "id": "xxx",
      "name": "admin",
      "domain_id": null,
      "domain_name": "Default"
    }
  },
  "name": "xxx",
  "network_id": "xxx",
  "prefix_length": null,
  "project_id": "xxx",
  "revision_number": 1,
  "segment_id": null,
  "service_types": [],
  "subnetpool_id": null,
  "tags": [],
  "updated_at": "2021-09-27T09:40:15Z"
}
~~~

Expected results:
DHCP disable from metadata output

Comment 23 errata-xmlrpc 2022-03-24 11:01:44 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 (Red Hat OpenStack Platform 16.1.8 bug fix and enhancement advisory), 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/RHBA-2022:0986


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