← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1950180] Re: After disabling dhcp on a network, metadata is still reporting that is enabled

 

Thanks Hemanth for following up on this!

I think it makes sense to close this as Invalid for nova since, as you
pointed out, the problem has been fixed entirely in Neutron 16.4.2.

Closing this as Invalid for nova.

** Changed in: nova
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1950180

Title:
  After disabling dhcp on a network, metadata is still reporting that is
  enabled

Status in networking-ovn:
  Invalid
Status in OpenStack Compute (nova):
  Invalid

Bug description:
  After disabling dhcp on a network, metadata still reports that the
  network is of type: ipv4_dhcp

  Version:
  ovn: 20.03.2-0ubuntu0.20.04.2
  neutron: 2:16.4.0-0ubuntu3~cloud0

  Steps to reproduce:

  1. I have a network with dhcp enabled:
  Network: 732e626d-2aa7-49bf-bf17-0849c9196b84
  Subnet: 04064e53-2b95-477b-ad87-844cf9f8ba2e

  Dhcp is enabled.

  Port list:
   os port list --long --network 732e626d-2aa7-49bf-bf17-0849c9196b84
  +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+--------------------------------------+--------------+------+
  | ID                                   | Name | MAC Address       | Fixed IP Addresses                                                           | Status | Security Groups                      | Device Owner | Tags |
  +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+--------------------------------------+--------------+------+
  | d3092f18-632b-4e2d-bf03-6044daea82d7 |      | fa:16:3e:e8:e2:44 | ip_address='10.17.10.201', subnet_id='04064e53-2b95-477b-ad87-844cf9f8ba2e' | DOWN   |                                      | network:dhcp |      |
  | e0d0246f-035e-4623-bb04-80323763d4e4 |      | fa:16:3e:23:d0:44 | ip_address='10.17.10.210', subnet_id='04064e53-2b95-477b-ad87-844cf9f8ba2e' | ACTIVE | f7db7448-2de2-4849-8257-d3d2a9ac32e9 | compute:az1  |      |
  +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+--------------------------------------+--------------+------+

  I create a VM on that network, and from the Vm I curl the metadata and I get the info re my network:
  $ curl http://169.254.169.254/openstack/latest/network_data.json
  ...
  {"id": "network1", "type": "ipv4_dhcp", "link": "tape0d0246f-03", "network_id": "732e626d-2aa7-49bf-bf17-0849c9196b84"}
  ...

  2. I disable dhcp on the subnet:

  os subnet set --no-dhcp 04064e53-2b95-477b-ad87-844cf9f8ba2e

  Port list is not updated:
  $ os port list --long --network 732e626d-2aa7-49bf-bf17-0849c9196b84
  +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+--------------------------------------+--------------+------+
  | ID                                   | Name | MAC Address       | Fixed IP Addresses                                                           | Status | Security Groups                      | Device Owner | Tags |
  +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+--------------------------------------+--------------+------+
  | d3092f18-632b-4e2d-bf03-6044daea82d7 |      | fa:16:3e:e8:e2:44 | ip_address='10.17.10.201', subnet_id='04064e53-2b95-477b-ad87-844cf9f8ba2e' | DOWN   |                                      | network:dhcp |      |
  | e0d0246f-035e-4623-bb04-80323763d4e4 |      | fa:16:3e:23:d0:44 | ip_address='10.17.10.210', subnet_id='04064e53-2b95-477b-ad87-844cf9f8ba2e' | ACTIVE | f7db7448-2de2-4849-8257-d3d2a9ac32e9 | compute:az1  |      |
  +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+--------------------------------------+--------------+------+

  3. Hard reboot the VM and curl network data and metadata still reports dhcp is enabled:
  $ os server reboot --hard 64658fed-2b76-4f73-a89c-e9d82fab0ac1
  $ curl http://169.254.169.254/openstack/latest/network_data.json
  ...
  {"id": "network1", "type": "ipv4_dhcp", "link": "tape0d0246f-03", "network_id": "732e626d-2aa7-49bf-bf17-0849c9196b84"}
  ...

  4. I removed the fixed-ip from the dhcp port and hard reboot the vm again and this time metadata retrieve the correct value for the network:
  $ os port set --no-fixed-ip d3092f18-632b-4e2d-bf03-6044daea82d7
  $ os server reboot --hard 64658fed-2b76-4f73-a89c-e9d82fab0ac1
  $ curl http://169.254.169.254/openstack/latest/network_data.json
  ...
  {"id": "network1", "type": "ipv4", "link": "tape0d0246f-03", "ip_address": "10.17.10.210", "netmask": "255.255.255.0", "routes": [], "network_id": "732e626d-2aa7-49bf-bf17-0849c9196b84", "services": [{"type": "dns", "address": "10.0.0.233"}, {"type": "dns", "address": "10.0.20.233"}]}
  ...

  5. If dhcp is toggled again we hit the issue again.

To manage notifications about this bug go to:
https://bugs.launchpad.net/networking-ovn/+bug/1950180/+subscriptions