From fda3233451db678642fd57f920487db7ca63dc30 Mon Sep 17 00:00:00 2001 From: John Fulton Date: Fri, 17 Jun 2022 16:11:59 -0400 Subject: [PATCH] Fall back to alt path for ceph client data during export The patch to fix the related bug (not this patch) fixes an inconsistency where the ceph client data is somtimes exported to the wrong path. If anyone deployed before they got the fix to the related bug, then this patch will workaround that problem if they export later. When 'openstack overcloud export ceph' is run look in the correct default location for the ceph client data and if it is not found, then fall back to incorrect location. Change-Id: I0b8c747481e561645eefea50cb77ca806a7f0de2 Related-Bug: #1978846 --- tripleoclient/export.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tripleoclient/export.py b/tripleoclient/export.py index 0082cf983..453dd9279 100644 --- a/tripleoclient/export.py +++ b/tripleoclient/export.py @@ -212,6 +212,9 @@ def export_ceph(stack, cephx, if 'cephadm' in config_download_files: ceph_client = "cephadm/ceph_client.yml" file = os.path.join(config_download_dir, stack, ceph_client) + if not os.path.exists(file): + # fall back to old path if user had LP 1978846 during deployment + file = "/home/stack/ceph_client.yaml" with open(file, 'r') as ff: try: ceph_data = yaml.safe_load(ff)