]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: redeploy when some dependency daemon is add/removed 58230/head
authorRedouane Kachach <rkachach@ibm.com>
Mon, 24 Jun 2024 15:41:10 +0000 (17:41 +0200)
committerRedouane Kachach <rkachach@ibm.com>
Mon, 24 Jun 2024 15:46:07 +0000 (17:46 +0200)
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 <rkachach@ibm.com>
src/pybind/mgr/cephadm/serve.py
src/pybind/mgr/cephadm/tests/test_services.py

index 4eb1bfe3d7b03d36e9dba6a3688556480e18e191..606fe744d7ec13f62751b791ad49ba285501cba3 100644 (file)
@@ -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':
index 5b484d094fb0ce3d319a8a814705e5a50420b847..1f8dfa190fb9db265c3f33933286f6e494199760 100644 (file)
@@ -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,
                     )