Bug 2278838

Summary: ceph-update-ganesha.yml playbook fails for missing variables
Product: Red Hat OpenStack Reporter: Kenny Tordeurs <ktordeur>
Component: tripleo-ansibleAssignee: Manoj Katari <mkatari>
Status: CLOSED ERRATA QA Contact: Joe H. Rahme <jhakimra>
Severity: low Docs Contact:
Priority: low    
Version: 16.2 (Train)CC: fpantano, jdurgin, jelle.hoylaerts.ext, lhh, madgupta, mariel, mhicks, mkatari
Target Milestone: z4Keywords: Triaged
Target Release: 17.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tripleo-ansible-3.3.1-17.1.20240521070751.8debef3.el9ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-21 09:40:16 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 Kenny Tordeurs 2024-05-03 09:42:46 UTC
Description of problem:
Run the ceph-update-ganesha.yml playbook and provide the ganesha_update_extravars.yaml playbook for additional command parameters:

ansible-playbook -i /usr/share/ansible/tripleo-playbooks/ceph-update-ganesha.yml \
 -e @$HOME/overcloud-deploy/<stack>/config-download/<stack>/global_vars.yaml \
 -e @$HOME/overcloud-deploy/<stack>/config-download/<stack>/cephadm/cephadm-extra-vars-heat.yml \
  -e @$HOME/ganesha_update_extravars.yaml
There are issues with the syntax for which we have this 

https://bugzilla.redhat.com/show_bug.cgi?id=2278837

However even if we specify the inventory and run the playbook we still have issues and some variables are not found, I'll add the exact error message later.

Version-Release number of selected component (if applicable):
OSP 16.2

How reproducible:
100%

Steps to Reproduce:
1. Follow upgrade guide
2.
3.

Actual results:
Errors with the variables, will add the errors in an additional update

Expected results:


Additional info:

Comment 1 Kenny Tordeurs 2024-05-03 11:28:12 UTC
Running this command will give 2 times an error due to missing variables to generate the new /etc/systemd/system/ceph-nfs@.service on the controller nodes.

By searching in the ansible playbooks/other env files what the default values were and landed on adding the following 2 parameters to my ganesha_update_extravars.yaml extra vars file:
~~~
tripleo_ceph_client_config_home: /etc/ceph
tripleo_cephadm_ceph_nfs_dynamic_exports: true
~~~

But even then it’s not possible yet because as the playbook(/usr/share/ansible/tripleo-playbooks/ceph-update-ganesha.yml) is set to gather_facts: false, it’s not able to resolve the variable hostname which is also used in the template.
When you also set this one to true (gather_facts: true) the files get generated and pcs restarts ceph-nfs.

Comment 2 Kenny Tordeurs 2024-05-06 13:12:37 UTC
Here is the output:

TASK [Render ganesha systemd unit] **********************************************************************************************************************************************************

task path: /usr/share/ansible/tripleo-playbooks/ceph-update-ganesha.yml:7

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: 'tripleo_ceph_client_config_home' is undefined. 'tripleo_ceph_client_config_home' is undefined

fatal: [openstack]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'tripleo_ceph_client_config_home' is undefined. 'tripleo_ceph_client_config_home' is undefined"}

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: 'tripleo_ceph_client_config_home' is undefined. 'tripleo_ceph_client_config_home' is undefined

fatal: [openstack]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'tripleo_ceph_client_config_home' is undefined. 'tripleo_ceph_client_config_home' is undefined"}

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: 'tripleo_ceph_client_config_home' is undefined. 'tripleo_ceph_client_config_home' is undefined

fatal: [openstack]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'tripleo_ceph_client_config_home' is undefined. 'tripleo_ceph_client_config_home' is undefined"}

Same for the hostname variable and tripleo_cephadm_ceph_nfs_dynamic_exports variable.

Comment 19 errata-xmlrpc 2024-11-21 09:40:16 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