Bug 1955562

Summary: Backup and Restore: Backup openstack client integration - openstack backup using bad nfs server address is not erroring out
Product: Red Hat OpenStack Reporter: myadla
Component: tripleo-ansibleAssignee: Juan Badia Payno <jbadiapa>
Status: CLOSED ERRATA QA Contact: Sree <skovili>
Severity: low Docs Contact:
Priority: high    
Version: 16.2 (Train)CC: ayefimov, elicohen, jbadiapa, jlarriba, myadla, nweinber, skovili
Target Milestone: z2Keywords: Triaged
Target Release: 16.2 (Train on RHEL 8.4)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tripleo-ansible-0.8.1-2.20210714224810.3670515.el8ost, openstack-tripleo-heat-templates-11.6.1-2.20210714224810.d647156.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-23 22:28:29 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:
Bug Depends On:    
Bug Blocks: 1824806    

Description myadla 2021-04-30 12:01:59 UTC
Description of problem:
Backup and Restore: Backup openstack client integration - openstack backup using bad nfs server address is not erroring out

As a negative test, passed wrong nfs server address inorder to test the error message. But the test is passing without any errors

Version-Release number of selected component (if applicable): RHOS-16.2-RHEL-8-20210420.n.0, tripleo-ansible-0.6.1-2.20210323013845.00f09d9.el8ost.1.noarch

How reproducible: 100%


Steps to Reproduce:
1.Create inventory file without nfs server in it
/home/stack/tripleo-inventory.yaml

2. Run 
$ openstack undercloud backup --setup-rear -- extra-vars {"tripleo_backup_and_restore_nfs_server": "10.20.30.40"}'

Actual results: Pass

Expected results: It should fail and error message should explain that the provided server is unreachable


Additional info:

Comment 10 Sree 2022-03-02 14:09:53 UTC
Error is now displayed:

TASK [backup-and-restore : Check NFS server IP] **********************************************************************************************************************************
fatal: [undercloud]: FAILED! => {"changed": true, "cmd": ["ping", "-c", "1", "10.20.30.40"], "delta": "0:00:10.013342", "end": "2022-03-02 14:07:02.377527", "msg": "non-zero return code", "rc": 1, "start": "2022-03-02 14:06:52.364185", "stderr": "", "stderr_lines": [], "stdout": "PING 10.20.30.40 (10.20.30.40) 56(84) bytes of data.\n\n--- 10.20.30.40 ping statistics ---\n1 packets transmitted, 0 received, 100% packet loss, time 0ms", "stdout_lines": ["PING 10.20.30.40 (10.20.30.40) 56(84) bytes of data.", "", "--- 10.20.30.40 ping statistics ---", "1 packets transmitted, 0 received, 100% packet loss, time 0ms"]}

PLAY RECAP ***********************************************************************************************************************************************************************
undercloud                 : ok=10   changed=5    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

/usr/share/ansible/tripleo-playbooks/prepare-undercloud-backup.yaml did not complete successfully.
Ansible playbook execution failed: ['ansible-playbook-3', '-u', 'root', '-i', '/home/stack/tripleo-inventory.yaml', '-v', '-t bar_setup_rear', '--extra-vars', "{'tripleo_backup_and_restore_nfs_server': '10.20.30.40'}", '-c', 'smart', '/usr/share/ansible/tripleo-playbooks/prepare-undercloud-backup.yaml'].


Verified on version 16.2

Comment 15 errata-xmlrpc 2022-03-23 22:28:29 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 (Moderate: Red Hat OpenStack Platform 16.2 (openstack-tripleo-heat-templates) security update), 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/RHSA-2022:0995