Nova clears Neutron port dns_name when shelving/unshelving instance

Bug #2058725 reported by Andrew Bonney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Unassigned

Bug Description

As far as I can tell this is likely to be a Nova issue rather than Neutron, but as it relates to both I can't be certain.

Description
===========
When an instance is first created, the 'dns_name' for its network port(s) reflects the instance name. When the instance is then shelved (and unshelved), this 'dns_name' disappears, resulting in an inability to resolve this VM by name using the tenant network's internal DNS servers.

Steps to reproduce
==================
* Deploy an OpenStack instance including Neutron internal DNS integration as-per https://docs.openstack.org/neutron/latest/admin/config-dns-int.html
* Create an instance with any name and observe the matching DNS name associated with its network port.
Example: openstack server create --flavor tempest1 --image cirros --network public my-instance
* Shelve the instance and re-check the DNS name associated with the network port. Optionally unshelve to observe the issue persists.

Expected result
===============
The DNS name should always match the instance name, or at least should return to the correct value once the instance is unshelved.

Actual result
=============
The DNS name is removed once the instance is shelved, resulting in a generic FQDN like 'host-172-29-249-175.example.org.'

From the command line, after initial instance creation:

root@aio1-utility-container-cd7fbf05:~# openstack port show f6d4723a-af13-40e5-b94a-bba7fb1fb9fb
...
| dns_assignment | fqdn='my-instance.example.org.', hostname='my-instance', ip_address='172.29.249.175' |
| dns_domain | |
| dns_name | my-instance |
...

After a shelve operation (and optionally after an unshelve):

root@aio1-utility-container-cd7fbf05:~# openstack port show f6d4723a-af13-40e5-b94a-bba7fb1fb9fb
...
| dns_assignment | fqdn='host-172-29-249-175.example.org.', hostname='host-172-29-249-175', ip_address='172.29.249.175' |
| dns_domain | |
| dns_name | |
...

Environment
===========
Nova 2023.1 252e660
Neutron 2023.1 29cc1a6
Libvirt+KVM
Ceph Reef
Linux Bridge with VXLAN

Also tested against 2023.2 releases.

description: updated
summary: - Nova clears Neutron port dns_name when shelving instance
+ Nova clears Neutron port dns_name when shelving/unshelving instance
description: updated
Changed in nova:
status: New → In Progress
Revision history for this message
Andrew Bonney (andrewbonney) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.