]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: add "original_weight" parameter to OSD class
authorAdam King <adking@redhat.com>
Mon, 19 Aug 2024 16:30:24 +0000 (12:30 -0400)
committerYuri Weinstein <yweinste@redhat.com>
Tue, 27 Aug 2024 17:59:40 +0000 (17:59 +0000)
Fixes: https://tracker.ceph.com/issues/67329
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 04330f5df92994882efcd4879d5c37279138e97b)
(cherry picked from commit 44914fafdd2dbf4a2a9296989bb3e151ed2c8967)

src/pybind/mgr/cephadm/services/osd.py

index 75b3fc58c761e0a50544a2fe48adc8bdef9fbc05..9b09b8c9f492556c8ae19b116bfe8a923778d423 100644 (file)
@@ -621,7 +621,8 @@ class OSD:
                  force: bool = False,
                  hostname: Optional[str] = None,
                  zap: bool = False,
-                 no_destroy: bool = False):
+                 no_destroy: bool = False,
+                 original_weight: Optional[float] = None):
         # the ID of the OSD
         self.osd_id = osd_id
 
@@ -656,7 +657,7 @@ class OSD:
         # mgr obj to make mgr/mon calls
         self.rm_util: RemoveUtil = remove_util
 
-        self.original_weight: Optional[float] = None
+        self.original_weight: Optional[float] = original_weight
 
         # Whether devices associated with the OSD should be zapped (DATA ERASED)
         self.zap = zap