From: Redouane Kachach Date: Mon, 24 Jun 2024 15:41:10 +0000 (+0200) Subject: mgr/cephadm: redeploy when some dependency daemon is add/removed X-Git-Tag: v20.0.0~1614^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=faa2daf8a701db64a7cf13d7290634f7e51fe6d7;p=ceph.git mgr/cephadm: redeploy when some dependency daemon is add/removed previous code was failing to redeploy in some scenarios when daemons are removed. The new check takes into account both when services are add or removed plus changes on the secure_monitoring_stack value. Signed-off-by: Redouane Kachach --- diff --git a/src/pybind/mgr/cephadm/serve.py b/src/pybind/mgr/cephadm/serve.py index 4eb1bfe3d7b0..606fe744d7ec 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -1093,7 +1093,7 @@ class CephadmServe: action = 'reconfig' # we need only redeploy if secure_monitoring_stack value has changed: if dd.daemon_type in ['prometheus', 'node-exporter', 'alertmanager']: - diff = list(set(last_deps) - set(deps)) + diff = list(set(last_deps).symmetric_difference(set(deps))) if any('secure_monitoring_stack' in e for e in diff): action = 'redeploy' elif dd.daemon_type == 'jaeger-agent': diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index 5b484d094fb0..1f8dfa190fb9 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -1418,7 +1418,6 @@ spec: "deploy_arguments": [], "params": { 'tcp_ports': [4200, 9094], - 'reconfig': True, }, "meta": { 'service_name': 'alertmanager', @@ -1432,7 +1431,7 @@ spec: }, "config_blobs": {}, }), - use_current_daemon_image=True, + use_current_daemon_image=False, )