yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #83738
[Bug 1861401] Re: Renaming instance brokes DNS integration
DNS is expected to match the hostname of an instance, which according to
nova above is immutable. If you want an instance with a different
hostname, you need to create a new one.
** Changed in: neutron
Status: New => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1861401
Title:
Renaming instance brokes DNS integration
Status in neutron:
Invalid
Status in OpenStack Compute (nova):
Opinion
Bug description:
Colleagues,
Description
===========
Renaming instance (e.g. using "openstack server set --name") brokes DNS integration, since it makes it impossible to bind port with new instance's name. So, if user renamed instance and want to access it using name, he can not.
Steps to reproduce
==================
1) You have an instance with some name (e.g. "web01")
2) You rename it using "openstack server set --name web02 web01"
3) You create port with instance's new name (e.g. web02) in order to attach it to the instance
$ openstack port create --network e-net --fixed-ip subnet=e-subnet --dns-name web02 test_port
4) You're trying to attach the port to the instance:
$ nova interface-attach --port-id <uuid> web02
Expected result
===============
Port binds to the instance and instance can be accessed using hostname "web02"
Actual result
=============
Last command in steps above fails with the following message:
ERROR (ClientException): Unexpected API Error. Please report this at
http://bugs.launchpad.net/nova/ and attach the Nova API log if
possible.
Nova log says the following:
2020-01-30 11:43:32.652 17476 ERROR nova.api.openstack.wsgi
PortNotUsableDNS: Port 0425701f-d958-4c81-931a-9594fba7d7d2 not usable
for instance 2d49b781-cef5-4cdd-a310-e74eb98aa514. Value web02
assigned to dns_name attribute does not match instance's hostname
web01
MySQL content show that renaming instance changed column
"display_name", but "hostname" remained with old name:
mysql> select hostname, display_name from instances where uuid='2d49b781-cef5-4cdd-a310-e74eb98aa514';
+----------+--------------+
| hostname | display_name |
+----------+--------------+
| web01 | web02 |
+----------+--------------+
Thus, DNS integration compares port's dns_name to "hostname" not the
"display_name", which makes it unusable after renaming instance.
Either renaming instance need to change both "hostname" and
"display_name" columns or DNS integration need compare port's dns_name
with "display_name".
Environment
===========
Host OS: Ubuntu 18.04 LTS
Openstack: Rocky
$ dpkg -l |grep nova
ii nova-api 2:18.2.3-0ubuntu1~cloud0
ii nova-common 2:18.2.3-0ubuntu1~cloud0
ii nova-conductor 2:18.2.3-0ubuntu1~cloud0
ii nova-novncproxy 2:18.2.3-0ubuntu1~cloud0
ii nova-placement-api 2:18.2.3-0ubuntu1~cloud0
ii nova-scheduler 2:18.2.3-0ubuntu1~cloud0
ii python-nova 2:18.2.3-0ubuntu1~cloud0
ii python-novaclient 2:11.0.0-0ubuntu1~cloud0
Thank you.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1861401/+subscriptions
References