Bug 1955573 - Backup and Restore: Backup openstack client integration - openstack backup with incorrect inventory should give proper error message
Summary: Backup and Restore: Backup openstack client integration - openstack backup wi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: tripleo-ansible
Version: 16.2 (Train)
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: z2
: 16.2 (Train on RHEL 8.4)
Assignee: Juan Badia Payno
QA Contact: Sree
URL:
Whiteboard:
Depends On:
Blocks: 1824806
TreeView+ depends on / blocked
 
Reported: 2021-04-30 12:19 UTC by myadla
Modified: 2022-03-23 22:10 UTC (History)
7 users (show)

Fixed In Version: python-tripleoclient-12.6.1-2.20220114104840.db6a328.el8ost tripleo-ansible-0.8.1-2.20220112214927.5e744eb.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-23 22:10:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 790057 0 None MERGED BnR Added a nfs validation when the nfs server is installed 2021-06-15 14:41:51 UTC
OpenStack gerrit 791009 0 None MERGED BnR added error msg in case there is no inventory 2021-05-26 15:04:37 UTC
OpenStack gerrit 793045 0 None MERGED BnR added error msg in case there is no inventory 2021-06-02 06:54:10 UTC
OpenStack gerrit 793046 0 None MERGED BnR added error msg in case there is no inventory 2021-06-15 14:41:46 UTC
OpenStack gerrit 793047 0 None MERGED BnR added error msg in case there is no inventory 2021-06-15 14:41:47 UTC
OpenStack gerrit 793048 0 None MERGED BnR added error msg in case there is no inventory 2021-06-15 14:41:48 UTC
OpenStack gerrit 796443 0 None MERGED BnR Added a nfs validation when the nfs server is installed 2021-06-28 11:51:27 UTC
OpenStack gerrit 796444 0 None MERGED BnR Added a nfs validation when the nfs server is installed 2021-06-28 11:51:27 UTC
OpenStack gerrit 796445 0 None MERGED BnR Added a nfs validation when the nfs server is installed 2021-06-28 11:51:28 UTC
OpenStack gerrit 796446 0 None MERGED BnR Added a nfs validation when the nfs server is installed 2021-06-28 11:51:29 UTC
Red Hat Issue Tracker OSP-3502 0 None None None 2022-01-28 15:54:50 UTC
Red Hat Issue Tracker UPG-3306 0 None None None 2021-09-07 10:13:41 UTC
Red Hat Product Errata RHBA-2022:1001 0 None None None 2022-03-23 22:10:32 UTC

Description myadla 2021-04-30 12:19:34 UTC
Description of problem:
 Backup and Restore: Backup openstack client integration - openstack backup with incorrect inventory should give proper error message

Negative test is failing as expected however the error message doesn't give any instructions to resolve this.

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/inventory-new.yaml
(Name should not be tripleo-inventory)
2.Run 
$ openstack undercloud backup --setup-nfs

(undercloud) [stack@undercloud-0 ~]$ mv tripleo-inventory.yaml test-inventory.yaml                                     │
(undercloud) [stack@undercloud-0 ~]$ openstack undercloud backup --setup-nfs                                           │
Using /tmp/prepare-nfs-backup.yaml2eakwpz0ansible.cfg as config file                                                   │
[WARNING]: Unable to parse /home/stack/tripleo-inventory.yaml as an inventory source                                   │
[WARNING]: No inventory was parsed, only implicit localhost is available                                               │
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match  │
'all'                                                                                                                  │
[WARNING]: Could not match supplied host pattern, ignoring: BackupNode                                                 │
                                                                                                                       │
PLAY [TripleO BackupNode NFS installation and configuration.] *********************************************************│
skipping: no hosts matched                                                                                             │
                                                                                                                       │
PLAY RECAP ************************************************************************************************************│
                                                                                                                       │
/usr/share/ansible/tripleo-playbooks/prepare-nfs-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_nfs_server', '-c', 'smart', '/usr/share/ansible/tripleo-playbooks/prepare-nfs-backup.yaml'].          │
(undercloud) [stack@undercloud-0 ~]$         

Actual results: Fail but there are no instructions found to resolve this

Expected results: Fail - Expecting message that inventory file could not be found with the expected name and instructions on resolving this


Additional info:

Comment 7 Sree 2022-03-02 18:40:06 UTC
Verified on 16.2 by not providing an NFS server address and below message was observed.

TASK [File shared server group exists and it has at least one server] ************************************************************************************************************
fatal: [localhost]: FAILED! => {
    "assertion": "nfs_server_group_name | default(\"BackupNode\") in groups",
    "changed": false,
    "evaluated_to": false,
    "msg": "There is no server on BackupNode groups"
}

PLAY RECAP ***********************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

/usr/share/ansible/tripleo-playbooks/prepare-nfs-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_nfs_server', '-c', 'smart', '/usr/share/ansible/tripleo-playbooks/prepare-nfs-backup.yaml'].
(undercloud) [stack@undercloud-0 ~]$ exit
logout

Comment 12 errata-xmlrpc 2022-03-23 22:10:08 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 (Release of components for Red Hat OpenStack Platform 16.2.2), 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-2022:1001


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