Bug 1664710 - Undercloud upgrade changes domain back to localdomain
Summary: Undercloud upgrade changes domain back to localdomain
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: documentation
Version: 14.0 (Rocky)
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: ---
: ---
Assignee: RHOS Documentation Team
QA Contact: RHOS Documentation Team
URL:
Whiteboard:
Depends On: 1661804 1665032
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-09 13:45 UTC by Martin Schuppert
Modified: 2020-10-09 12:29 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1661804
Environment:
Last Closed: 2020-10-09 12:29:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 2 Jose Luis Franco 2019-01-14 15:12:41 UTC
Hey Martin,

If we strictly follow the OSP13 installation steps, the overcloud_domain_name parameter had to be configured during the undercloud installation in order to set the domain to redhat.local, so the same should be performed for the upgrade:
undercloud.conf:

overcloud_domain_name=redhat.local

Besides, the environment files used for the overcloud deployment may have the CloudDomain also set to the same value. If we pass the same environment files to the overcloud prepare command that we passed during deployment, then we should end up having the right domain configured.

Comment 3 Martin Schuppert 2019-01-14 15:20:56 UTC
(In reply to Jose Luis Franco from comment #2)
> Hey Martin,
> 
> If we strictly follow the OSP13 installation steps, the
> overcloud_domain_name parameter had to be configured during the undercloud
> installation in order to set the domain to redhat.local, so the same should
> be performed for the upgrade:
> undercloud.conf:
> 
> overcloud_domain_name=redhat.local
> 
> Besides, the environment files used for the overcloud deployment may have
> the CloudDomain also set to the same value. If we pass the same environment
> files to the overcloud prepare command that we passed during deployment,
> then we should end up having the right domain configured.

Hi Jose,

thanks for checking, just to be clear, the issue is not with the overcloud,
the issue/question is with the services on the undercloud. If we won't set
the CoudDomain for the undercloud, the services there will fall back to 
localdomain. Should the upgrade guide contain a step/information to set the
CloudDomain to what is configured on the undercloud as the domain.

Comment 5 Jose Luis Franco 2019-01-17 10:44:54 UTC
Hey Martin,

Yes, I'm also referring to the undercloud. The problem in the test is that when upgrading the undercloud it was forgotten to include the overcloud_domain_name=redhat.local into undercloud.conf. 

If you see the code in python-tripleoclient, this parameter is taken also to configure the undercloud local hostname: https://github.com/openstack/python-tripleoclient/blob/0d9ac70c031621d4f2985db99b0558e9d0647045/tripleoclient/v1/undercloud_config.py#L394-L396 which, when not specified defaults to localdomain, as we can see in this BZ: https://github.com/openstack/python-tripleoclient/blob/0d9ac70c031621d4f2985db99b0558e9d0647045/tripleoclient/v1/tripleo_deploy.py#L998

I've just reproduced this issue in my environment and passing the right overcloud_domain_name variable in undercloud.conf solved it:

Fresh deployed OSP13 with specific hostname:

UNDERCLOUD:

(undercloud) [stack@undercloud-0 ~]$ nova service-list
+--------------------------------------+----------------+---------------------------+----------+---------+-------+----------------------------+-----------------+-------------+
| Id                                   | Binary         | Host                      | Zone     | Status  | State | Updated_at                 | Disabled Reason | Forced down |
+--------------------------------------+----------------+---------------------------+----------+---------+-------+----------------------------+-----------------+-------------+
| dc89d0e1-809e-47a3-b161-27a4f8c92e18 | nova-conductor | undercloud-0.redhat.local | internal | enabled | up    | 2019-01-17T07:48:01.000000 | -               | False       |
| 453997b5-b9ed-46bf-91eb-e3f39b32c3a2 | nova-scheduler | undercloud-0.redhat.local | internal | enabled | up    | 2019-01-17T07:48:04.000000 | -               | False       |
| 7bce5230-a7b4-496f-94b9-82cb98dcc5b2 | nova-compute   | undercloud-0.redhat.local | nova     | enabled | up    | 2019-01-17T07:48:01.000000 | -               | False       |
+--------------------------------------+----------------+---------------------------+----------+---------+-------+----------------------------+-----------------+-------------+

(undercloud) [stack@undercloud-0 ~]$ neutron agent-list
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+--------------------------------------+--------------------+--------------------------------------+-------------------+-------+----------------+---------------------------+
| id                                   | agent_type         | host                                 | availability_zone | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+--------------------------------------+-------------------+-------+----------------+---------------------------+
| 073a8dba-0583-4193-a6a9-aea8da78dbb4 | Baremetal Node     | ddf80749-b548-4332-91b6-04f7c71014b9 |                   | :-)   | True           | ironic-neutron-agent      |
| 61291b4e-64f2-4716-9ad6-6ebbd8642cba | Open vSwitch agent | undercloud-0.redhat.local            |                   | :-)   | True           | neutron-openvswitch-agent |
| 95316218-8680-4a3c-a11f-bb9f57329ffd | DHCP agent         | undercloud-0.redhat.local            | nova              | :-)   | True           | neutron-dhcp-agent        |
| c6144332-ee5b-43ac-a5a5-da1dc1e916d2 | Baremetal Node     | bf8ad23c-a7cb-4733-b2d8-d0b56a01e308 |                   | :-)   | True           | ironic-neutron-agent      |
+--------------------------------------+--------------------+--------------------------------------+-------------------+-------+----------------+---------------------------+

(undercloud) [stack@undercloud-0 ~]$ openstack baremetal node list
+--------------------------------------+--------------+--------------------------------------+-------------+--------------------+-------------+
| UUID                                 | Name         | Instance UUID                        | Power State | Provisioning State | Maintenance |
+--------------------------------------+--------------+--------------------------------------+-------------+--------------------+-------------+
| bf8ad23c-a7cb-4733-b2d8-d0b56a01e308 | compute-0    | 1fecea91-6d9f-403f-a293-6f5e413512f9 | power on    | active             | False       |
| ddf80749-b548-4332-91b6-04f7c71014b9 | controller-0 | fb87c3d2-74c9-43e8-9287-1df62b930e5b | power on    | active             | False       |
+--------------------------------------+--------------+--------------------------------------+-------------+--------------------+-------------+
(undercloud) [stack@undercloud-0 ~]$ nova stop 1fecea91-6d9f-403f-a293-6f5e413512f9
Request to stop server 1fecea91-6d9f-403f-a293-6f5e413512f9 has been accepted.
(undercloud) [stack@undercloud-0 ~]$ openstack baremetal node list
+--------------------------------------+--------------+--------------------------------------+-------------+--------------------+-------------+
| UUID                                 | Name         | Instance UUID                        | Power State | Provisioning State | Maintenance |
+--------------------------------------+--------------+--------------------------------------+-------------+--------------------+-------------+
| bf8ad23c-a7cb-4733-b2d8-d0b56a01e308 | compute-0    | 1fecea91-6d9f-403f-a293-6f5e413512f9 | power off   | active             | False       |
| ddf80749-b548-4332-91b6-04f7c71014b9 | controller-0 | fb87c3d2-74c9-43e8-9287-1df62b930e5b | power on    | active             | False       |
+--------------------------------------+--------------+--------------------------------------+-------------+--------------------+-------------+


===========UPGRADE TO 14 PUDDLE 2019-01-07.1=====================

undercloud.conf before running "openstack undercloud upgrade"
[DEFAULT]
# Network interface on the Undercloud that will be handling the PXE
# boots and DHCP for Overcloud instances. (string value)
container_images_file = /home/stack/containers-prepare-parameter.yaml
docker_insecure_registries = rhos-qe-mirror-qeos.usersys.redhat.com:5000,brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888,registry.access.redhat.com
local_interface = eth0
local_ip = 192.168.24.1/24
undercloud_public_host = 192.168.24.2
undercloud_admin_host = 192.168.24.3
#TODO: use release >= 10 when RHBZ#1633193 is resolved
undercloud_ntp_servers=clock.redhat.com
overcloud_domain_name = redhat.local
hieradata_override = /home/stack/hiera_override.yaml
[ctlplane-subnet]
local_subnet = ctlplane-subnet
cidr = 192.168.24.0/24
dhcp_start = 192.168.24.5
dhcp_end = 192.168.24.24
gateway = 192.168.24.1
inspection_iprange = 192.168.24.100,192.168.24.120
masquerade = true
#TODO(skatlapa): add param to override masq

=============UNDERCLOUD UPGRADED==================

Install artifact is located at /home/stack/undercloud-install-20190117094656.tar.bzip2

########################################################

Deployment successfull!

########################################################

Writing the stack virtual update mark file /var/lib/tripleo-heat-installer/update_mark_undercloud

##########################################################

The Undercloud has been successfully upgraded.

Useful files:

Password file is at ~/undercloud-passwords.conf
The stackrc file is at ~/stackrc

Use these files to interact with OpenStack services, and
ensure they are secured.

##########################################################
================================================

(undercloud) [stack@undercloud-0 ~]$ nova service-list
+--------------------------------------+----------------+---------------------------+----------+---------+-------+----------------------------+-----------------+-------------+
| Id                                   | Binary         | Host                      | Zone     | Status  | State | Updated_at                 | Disabled Reason | Forced down |
+--------------------------------------+----------------+---------------------------+----------+---------+-------+----------------------------+-----------------+-------------+
| dc89d0e1-809e-47a3-b161-27a4f8c92e18 | nova-conductor | undercloud-0.redhat.local | internal | enabled | up    | 2019-01-17T10:30:49.000000 | -               | False       |
| 453997b5-b9ed-46bf-91eb-e3f39b32c3a2 | nova-scheduler | undercloud-0.redhat.local | internal | enabled | up    | 2019-01-17T10:30:49.000000 | -               | False       |
| 7bce5230-a7b4-496f-94b9-82cb98dcc5b2 | nova-compute   | undercloud-0.redhat.local | nova     | enabled | up    | 2019-01-17T10:30:43.000000 | -               | False       |
+--------------------------------------+----------------+---------------------------+----------+---------+-------+----------------------------+-----------------+-------------+
(undercloud) [stack@undercloud-0 ~]$ openstack baremetal node list
+--------------------------------------+--------------+--------------------------------------+-------------+--------------------+-------------+
| UUID                                 | Name         | Instance UUID                        | Power State | Provisioning State | Maintenance |
+--------------------------------------+--------------+--------------------------------------+-------------+--------------------+-------------+
| bf8ad23c-a7cb-4733-b2d8-d0b56a01e308 | compute-0    | 1fecea91-6d9f-403f-a293-6f5e413512f9 | power on    | active             | False       |
| ddf80749-b548-4332-91b6-04f7c71014b9 | controller-0 | fb87c3d2-74c9-43e8-9287-1df62b930e5b | power on    | active             | False       |
+--------------------------------------+--------------+--------------------------------------+-------------+--------------------+-------------+
(undercloud) [stack@undercloud-0 ~]$ nova stop 1fecea91-6d9f-403f-a293-6f5e413512f9
Request to stop server 1fecea91-6d9f-403f-a293-6f5e413512f9 has been accepted.


If you need it, I have the environment available for debugging.

Comment 7 Jesse Pretorius 2020-10-09 12:29:30 UTC
OSP14 went EOL in Jan 2020. If this bug is still applicable to a different version then please re-open it and re-target it.


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