]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/cephadm: add systemd unit to stored info about daemons
authorAdam King <adking@redhat.com>
Wed, 31 Jan 2024 18:37:40 +0000 (13:37 -0500)
committerAdam King <adking@redhat.com>
Wed, 19 Feb 2025 20:33:08 +0000 (15:33 -0500)
We already collect this in `cephadm ls` but don't
store it currently. Storing it will allow us to expose
it to users who want that information.

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit c939c95265cf17e7ab5ad60f95b5bbaabfd32ef1)

src/pybind/mgr/cephadm/module.py
src/pybind/mgr/orchestrator/_interface.py

index 6d2cf33e63a3544d07a45f7459f842b4999ae5ef..ce183e2f163f39e89aca46b0bae62cf19386aeed 100644 (file)
@@ -960,6 +960,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule,
                 ports=d.get('ports'),
                 ip=d.get('ip'),
                 deployed_by=d.get('deployed_by'),
+                systemd_unit=d.get('systemd_unit'),
                 rank=rank,
                 rank_generation=rank_generation,
                 extra_container_args=d.get('extra_container_args'),
index 04eb70a733620fc70d6bb7b2497511e25b949d3c..953461dab8de7604339d8870f3bcf6ab647a67ca 100644 (file)
@@ -1054,6 +1054,7 @@ class DaemonDescription(object):
                  ports: Optional[List[int]] = None,
                  ip: Optional[str] = None,
                  deployed_by: Optional[List[str]] = None,
+                 systemd_unit: Optional[str] = None,
                  rank: Optional[int] = None,
                  rank_generation: Optional[int] = None,
                  extra_container_args: Optional[GeneralArgList] = None,
@@ -1120,6 +1121,8 @@ class DaemonDescription(object):
 
         self.deployed_by = deployed_by
 
+        self.systemd_unit = systemd_unit
+
         self.is_active = is_active
 
         self.extra_container_args: Optional[ArgumentList] = None
@@ -1274,6 +1277,7 @@ class DaemonDescription(object):
         out['ip'] = self.ip
         out['rank'] = self.rank
         out['rank_generation'] = self.rank_generation
+        out['systemd_unit'] = self.systemd_unit
 
         for k in ['last_refresh', 'created', 'started', 'last_deployed',
                   'last_configured']:
@@ -1310,6 +1314,7 @@ class DaemonDescription(object):
         out['is_active'] = self.is_active
         out['ports'] = self.ports
         out['ip'] = self.ip
+        out['systemd_unit'] = self.systemd_unit
 
         for k in ['last_refresh', 'created', 'started', 'last_deployed',
                   'last_configured']: