Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2158396

Summary: [OVN migration] recovery-backup playbook fails with 'no hosts matched' if role name is ControllerSriov
Product: Red Hat OpenStack Reporter: Roman Safronov <rsafrono>
Component: openstack-neutronAssignee: Arnau Verdaguer <averdagu>
Status: CLOSED ERRATA QA Contact: Fiorella Yanac <fyanac>
Severity: medium Docs Contact:
Priority: medium    
Version: 17.1 (Wallaby)CC: averdagu, bcafarel, chrisw, ekuris, fdiazbra, fyanac, jamsmith, jlibosva, jstransk, mariel, ramishra, scohen, ykarel
Target Milestone: z4Keywords: Triaged
Target Release: 17.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-18.6.1-17.1.20240918120815.85ff760.el9ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-21 09:38:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roman Safronov 2023-01-05 10:16:38 UTC
Description of problem:

On attempt to backup control plane nodes on SR-IOV environment (that was deployed using ControllerSriov role name rather than Controller) openstack overcloud backup  --setup-rear command is unable to find controller nodes, see log below.

Note, roles files were created by openstack overcloud roles generate -o roles_data.yaml ControllerSriov ComputeSriov

Version-Release number of selected component (if applicable):
RHOS-17.1-RHEL-9-20221130.n.1
tripleo-ansible-3.3.1-1.20221118000810.288cc16.el9ost.noarch

How reproducible:
100%

Steps to Reproduce:
1.Create roles files for SR-IOV overcloud deployment by generating them using
openstack overcloud roles generate -o roles_data.yaml ControllerSriov ComputeSriov

2.Deploy the overcloud
3.Setup nfs by running openstack overcloud backup --setup-nfs 
4.Try to setup rear tool on controller nodes controller nodes by running
openstack overcloud backup  --setup-rear

Actual results:
Nodes with ControllerSriov role are not detected as control plane nodes. openstack overcloud backup  --setup-rear command fails.

Expected results:
controller nodes are detected, setup ReaR tool succeeded

Note: in case I rename ControllerSriov role to Controller before deploying overcloud then openstack overcloud backup  --setup-rear  is able to detect controller nodes

Additional info:

from ansible log 

2023-01-04 16:12:32,038 p=176950 u=stack n=ansible | TASK [recovery-backup : Setup REAR on the controllers] *************************
2023-01-04 16:12:32,038 p=176950 u=stack n=ansible | Wednesday 04 January 2023  16:12:32 +0000 (0:00:16.241)       0:00:20.708 ***** 
2023-01-04 16:12:36,341 p=176950 u=stack n=ansible | fatal: [localhost]: FAILED! => {"changed": true, "cmd": "source /home/stack/stackrc &&\nopenstack overcloud backup --inventory /tmp/backup-recover-temp/tripleo-inventory.yaml --setup-rear --extra-vars '{\n        \"tripleo_backup_and_restore_server\": 192.168.25.1\n      }'\n", "delta": "0:00:03.960545", "end": "2023-01-04 16:12:36.311553", "msg": "non-zero return code", "rc": 1, "start": "2023-01-04 16:12:32.351008", "stderr": "Ansible execution failed. playbook: /usr/share/ansible/tripleo-playbooks/prepare-overcloud-backup.yaml, Run Status: failed, Return Code: 10\nAnsible execution failed. playbook: /usr/share/ansible/tripleo-playbooks/prepare-overcloud-backup.yaml, Run Status: failed, Return Code: 10", "stderr_lines": ["Ansible execution failed. playbook: /usr/share/ansible/tripleo-playbooks/prepare-overcloud-backup.yaml, Run Status: failed, Return Code: 10", "Ansible execution failed. playbook: /usr/share/ansible/tripleo-playbooks/prepare-overcloud-backup.yaml, Run Status: failed, Return Code: 10"], "stdout": "[DEPRECATION WARNING]: ANSIBLE_CALLBACK_WHITELIST option, normalizing names to \r\nnew standard, use ANSIBLE_CALLBACKS_ENABLED instead. This feature will be \r\nremoved from ansible-core in version 2.15. Deprecation warnings can be disabled\r\n by setting deprecation_warnings=False in ansible.cfg.\r\n[WARNING]: Could not match supplied host pattern, ignoring: Controller\n\r\nPLAY [Stop executing if one of the hosts is unreachable] ***********************\nskipping: no hosts matched\n\r\nPLAY [TripleO Controller ReaR installation and configuration.] *****************\nskipping: no hosts matched\n\r\nPLAY RECAP *********************************************************************\n2023-01-04 16:12:35.917846 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Summary Information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n2023-01-04 16:12:35.918367 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Total Tasks: 0          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n2023-01-04 16:12:35.918851 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Elapsed Time: 0:00:00.056278 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n2023-01-04 16:12:35.919228 |                                 UUID |       Info |       Host |   Task Name |   Run Time\n2023-01-04 16:12:35.919669 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End Summary Information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", "stdout_lines": ["[DEPRECATION WARNING]: ANSIBLE_CALLBACK_WHITELIST option, normalizing names to ", "new standard, use ANSIBLE_CALLBACKS_ENABLED instead. This feature will be ", "removed from ansible-core in version 2.15. Deprecation warnings can be disabled", " by setting deprecation_warnings=False in ansible.cfg.", "[WARNING]: Could not match supplied host pattern, ignoring: Controller", "", "PLAY [Stop executing if one of the hosts is unreachable] ***********************", "skipping: no hosts matched", "", "PLAY [TripleO Controller ReaR installation and configuration.] *****************", "skipping: no hosts matched", "", "PLAY RECAP *********************************************************************", "2023-01-04 16:12:35.917846 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Summary Information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", "2023-01-04 16:12:35.918367 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Total Tasks: 0          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", "2023-01-04 16:12:35.918851 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Elapsed Time: 0:00:00.056278 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", "2023-01-04 16:12:35.919228 |                                 UUID |       Info |       Host |   Task Name |   Run Time", "2023-01-04 16:12:35.919669 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End Summary Information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"]}
2023-01-04 16:12:36,343 p=176950 u=stack n=ansible | PLAY RECAP *********************************************************************
2023-01-04 16:12:36,343 p=176950 u=stack n=ansible | localhost                  : ok=4    changed=3    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0

Comment 1 Fernando Díaz 2023-01-10 11:26:52 UTC
Hi Roman, It seems that there is a parameter missing in the execution to configure the correct controller group name, that by default is set to "Controller" as you can see in [1]. 
Can you please retry the execution with this parameter?

openstack overcloud backup --setup-rear --extra-vars '{"tripleo_controller_group_name": "ControllerSriov"}'

[1] https://github.com/openstack/tripleo-ansible/blob/2aa8015d17074b7590efe30cee6136f7398f3454/tripleo_ansible/roles/backup_and_restore/defaults/main.yml#L21

Comment 2 Roman Safronov 2023-01-10 11:39:30 UTC
Hi Fernando, I think you're right. Unfortunately I can't test it right now but I think you can already move the BZ to neutron because the neutron's recovery-backup playbook for ovn migration (that I used) does not allow specifying this parameter, https://github.com/openstack/neutron/blob/master/tools/ovn_migration/tripleo_environment/playbooks/roles/recovery-backup/tasks/main.yml#L48

Comment 3 Roman Safronov 2023-01-11 14:20:43 UTC
I can confirm that adding "tripleo_controller_group_name": "ControllerSriov" to --extra-vars allows  "openstack overcloud backup --setup-rear" command to find control plane nodes properly.

Comment 27 errata-xmlrpc 2024-11-21 09:38:21 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 (RHOSP 17.1.4 bug fix and 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/RHBA-2024:9974