Comment 1 for bug 1978846

Revision history for this message
John Fulton (jfulton-org) wrote :

Analysis of system where bug was encountered:

No such file or directory:
  '/home/stack/overcloud-deploy/central/config-download/central/cephadm/ceph_client.yml

Instead we have this:

  /home/stack/ceph_client.yaml

Let's think about how TripleO controls where this file is:

What should happen if I just read the code:

A. THT sets this to [1]

  "{{ playbook_dir }}/cephadm/ceph_client.yml"

B. tripleo-ansible saves [2] this to a variable which defaults it to [3] [4]:

  tripleo_ceph_client_vars: "/home/stack/ceph_client.yaml"

C. tripleo-pythonclient looks for it in [5]:

  ceph_client = "cephadm/ceph_client.yml"
  file = os.path.join(config_download_dir, stack, ceph_client)

A and C are not inconsistent because:

  playbook_dir == (config_download_dir + stack)

B is not consistent w/ A+C, so I should update that if nothing else. Was that the root cause?

Let's look at if THT had that set in the deployment:

  config-download/central/cephadm/cephadm-extra-vars-heat.yml:tripleo_ceph_client_vars: /home/stack/ceph_client.yaml

There:

(undercloud) [stack@site-undercloud-0 templates]$ grep CephClientConfigVars *.yaml
overcloud-ceph-deployed.yaml: CephClientConfigVars: /home/stack/ceph_client.yaml
(undercloud) [stack@site-undercloud-0 templates]$

The default from tripleo-ansible was exported and that's why THT didn't override it.

Definitely a bug. Probably needs two patches:

1. tripleo-ansible: new default consistent with what THT would produce
2. python-tripleoclient: also look in /home/stack/ceph_client.yaml related-bug (for current users)

[1] https://github.com/openstack/tripleo-heat-templates/blob/stable/wallaby/deployment/cephadm/ceph-base.yaml#L335-L337

[2] https://github.com/openstack/tripleo-ansible/blob/master/tripleo_ansible/roles/tripleo_cephadm/tasks/export.yaml#L86-L92

[3] https://github.com/openstack/tripleo-ansible/blob/master/tripleo_ansible/roles/tripleo_cephadm/defaults/main.yml#L37

[4] https://github.com/openstack/tripleo-ansible/blob/master/tripleo_ansible/roles/tripleo_ceph_client/defaults/main.yml#L25

[5] https://github.com/openstack/python-tripleoclient/blob/stable/wallaby/tripleoclient/export.py#L214