Bug 1868940 - oslo_config not accepting undercore in the hostnames
Summary: oslo_config not accepting undercore in the hostnames
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-oslo-config
Version: 16.0 (Train)
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: z3
: 16.2 (Train on RHEL 8.4)
Assignee: dabarzil
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-14 13:49 UTC by Eduard Barrera
Modified: 2023-09-15 01:30 UTC (History)
6 users (show)

Fixed In Version: python-oslo-config-6.11.3-2.20201217142051.9b1ccea.el8ost.1
Doc Type: Enhancement
Doc Text:
This enhancement adds the type `HostDomain`. `HostDomain` is the same as `HostAddress` with the added support of the underscore character - RFC1033. Systems such as DomainKeys and service records use the underscore. The Compute service can use the `HostDomain` type to define `live_migration_inbound_addr`.
Clone Of:
Environment:
Last Closed: 2021-09-15 07:08:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1892044 0 None None None 2020-08-18 13:55:47 UTC
OpenStack gerrit 746723 0 None MERGED Add a new type HostDomain. 2021-02-17 04:42:31 UTC
Red Hat Issue Tracker OSP-1836 0 None None None 2022-08-30 11:56:50 UTC
Red Hat Product Errata RHEA-2021:3483 0 None None None 2021-09-15 07:09:09 UTC

Internal Links: 2124079

Description Eduard Barrera 2020-08-14 13:49:33 UTC
Description of problem:

openstack services are failing to start when a hostname with underscord _ is provided

2020-08-14 15:42:35.813 8 ERROR nova During handling of the above exception, another exception occurred:
2020-08-14 15:42:35.813 8 ERROR nova 
2020-08-14 15:42:35.813 8 ERROR nova Traceback (most recent call last):
2020-08-14 15:42:35.813 8 ERROR nova   File "/usr/bin/nova-compute", line 10, in <module>
2020-08-14 15:42:35.813 8 ERROR nova     sys.exit(main())
2020-08-14 15:42:35.813 8 ERROR nova   File "/usr/lib/python3.6/site-packages/nova/cmd/compute.py", line 59, in main
2020-08-14 15:42:35.813 8 ERROR nova     service.wait()
2020-08-14 15:42:35.813 8 ERROR nova   File "/usr/lib/python3.6/site-packages/nova/service.py", line 458, in wait
2020-08-14 15:42:35.813 8 ERROR nova     _launcher.wait()
2020-08-14 15:42:35.813 8 ERROR nova   File "/usr/lib/python3.6/site-packages/oslo_service/service.py", line 392, in wait
2020-08-14 15:42:35.813 8 ERROR nova     status, signo = self._wait_for_exit_or_signal()
2020-08-14 15:42:35.813 8 ERROR nova   File "/usr/lib/python3.6/site-packages/oslo_service/service.py", line 367, in _wait_for_exit_or_signal
2020-08-14 15:42:35.813 8 ERROR nova     self.conf.log_opt_values(LOG, logging.DEBUG)
2020-08-14 15:42:35.813 8 ERROR nova   File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2589, in log_opt_values
2020-08-14 15:42:35.813 8 ERROR nova     _sanitize(opt, getattr(group_attr, opt_name)))
2020-08-14 15:42:35.813 8 ERROR nova   File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 3134, in __getattr__
2020-08-14 15:42:35.813 8 ERROR nova     return self._conf._get(name, self._group)
2020-08-14 15:42:35.813 8 ERROR nova   File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2631, in _get
2020-08-14 15:42:35.813 8 ERROR nova     value, loc = self._do_get(name, group, namespace)
2020-08-14 15:42:35.813 8 ERROR nova   File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2705, in _do_get
2020-08-14 15:42:35.813 8 ERROR nova     raise ConfigFileValueError(message)
2020-08-14 15:42:35.813 8 ERROR nova oslo_config.cfg.ConfigFileValueError: Value for option live_migration_inbound_addr from LocationInfo(location=<Locations.user: (4, True)>, detail='/etc/nova/nova.conf') is not valid: overcloud-novacompute_edge1-0.internalapi.localdomain is not a valid host address
2020-08-14 15:42:35.813 8 ERROR nova 




OSP16.0

# podman exec -u 0 -ti nova_libvirt rpm -qa | grep oslo-config
python3-oslo-config-6.11.2-0.20200221150642.22c286c.el8ost.noarch


# grep overcloud-novacompute_edge1-0.internalapi.localdomain /etc/hosts
172.16.12.80 overcloud-novacompute_edge1-0.internalapi.localdomain overcloud-novacompute_edge1-0.internalapi



How reproducible:
always

Steps to Reproduce:

1. add a hostname with underscord in the config file, for example

/etc/nova/nova.conf
live_migration_inbound_addr = overcloud-novacompute_edge1-0.internalapi.localdomain

ensure hostname is in etc/hosts

# grep overcloud-novacompute_edge1-0.internalapi.localdomain /etc/hosts
172.16.12.80 overcloud-novacompute_edge1-0.internalapi.localdomain overcloud-novacompute_edge1-0.internalapi

2. Restart container
3.

Actual results:
service fails to start

Expected results:
service start normally

Comment 2 Hervé Beraud 2020-08-18 13:53:31 UTC
Hello

Public bug opened [1] and fix submitted [2].

[1] https://bugs.launchpad.net/oslo.config/+bug/1892044
[2] https://review.opendev.org/#/c/746723/

Comment 6 Hervé Beraud 2021-01-20 13:27:19 UTC
Fixed in version python-oslo-config-6.11.3-2.20201217142051.9b1ccea.el8ost.1

Comment 9 dabarzil 2021-04-06 09:05:10 UTC
After editing nova.conf it doesn't stick after commiting and restarting:
[root@compute-1 ~]# podman commit a1802113af00 undercloud-0.ctlplane.redhat.local:8787/rh-osbs/rhosp16-openstack-nova-libvirt:20200416.1
[root@compute-1 ~]# podman restart a1802113af00

Any advice?

Comment 12 dabarzil 2021-05-19 11:45:06 UTC
Has been verified with python-oslo-config-6.11.3-2.20201217142051.9b1ccea.el8ost.1
and openstack services are ok with a hostname with underscore

Comment 14 errata-xmlrpc 2021-09-15 07:08:45 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 (RHOSP) 16.2 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/RHEA-2021:3483

Comment 15 Red Hat Bugzilla 2023-09-15 01:30:16 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days


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