diff options
author | Prashant D <pdhange@redhat.com> | 2024-05-04 01:32:32 +0200 |
---|---|---|
committer | Prashant D <pdhange@redhat.com> | 2024-05-04 01:32:32 +0200 |
commit | cfcdfd6ae2e0580450cc857123ca35e0d4d2ebea (patch) | |
tree | ee3477f62740ed00b9a5217fb9ba91d528bfc51b /src/pybind | |
parent | Merge pull request #56846 from rishabh-d-dave/test-fs-auth (diff) | |
download | ceph-cfcdfd6ae2e0580450cc857123ca35e0d4d2ebea.tar.xz ceph-cfcdfd6ae2e0580450cc857123ca35e0d4d2ebea.zip |
mgr/cephadm: Fix unfound progress events
While applying service specs, cephadm creates a progress event for
the daemons to be added or deleted from the hosts. The progress
event is initialized if progress_total is greater than 0
but at the end cephadm tries to mark the progress event as
complete/fail even though progress event has not been initialized.
Mark progress events as complete/fail only if they are initialized.
Fixes: https://tracker.ceph.com/issues/65799
Signed-off-by: Prashant D <pdhange@redhat.com>
Diffstat (limited to 'src/pybind')
-rw-r--r-- | src/pybind/mgr/cephadm/serve.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pybind/mgr/cephadm/serve.py b/src/pybind/mgr/cephadm/serve.py index 4c7889bd18f..a4f5747cfc9 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -994,9 +994,11 @@ class CephadmServe: hosts_altered.add(d.hostname) self.mgr.spec_store.mark_needs_configuration(spec.service_name()) - self.mgr.remote('progress', 'complete', progress_id) + if progress_total: + self.mgr.remote('progress', 'complete', progress_id) except Exception as e: - self.mgr.remote('progress', 'fail', progress_id, str(e)) + if progress_total: + self.mgr.remote('progress', 'fail', progress_id, str(e)) raise finally: if self.mgr.spec_store.needs_configuration(spec.service_name()): |