]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: add a new config option 'oob_default_addr'
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 24 Jan 2024 15:08:14 +0000 (15:08 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Tue, 30 Jan 2024 17:02:30 +0000 (17:02 +0000)
So there's a default value (169.254.1.1) which is the default
address for the 'OS to iDrac pass-through' interface.
Given that node-proxy will reach the RedFish API through this interface,
we can make users avoid to pass that addr when providing the host spec
at bootstrap time.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit b09fd672c9838a091d6779047f3292acbb62070d)

src/pybind/mgr/cephadm/module.py

index c5a7602f77675d659493f737d475c0741026c43e..54bbd63b4b0f2726747b4ca63b8bdf57edbbd340 100644 (file)
@@ -480,6 +480,12 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule,
             desc='Default timeout applied to cephadm commands run directly on '
             'the host (in seconds)'
         ),
+        Option(
+            'oob_default_addr',
+            type='str',
+            default='169.254.1.1',
+            desc="Default address for RedFish API (oob management)."
+        ),
     ]
 
     def __init__(self, *args: Any, **kwargs: Any):
@@ -563,6 +569,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule,
             self.cgroups_split = True
             self.log_refresh_metadata = False
             self.default_cephadm_command_timeout = 0
+            self.oob_default_addr = ''
 
         self.notify(NotifyType.mon_map, None)
         self.config_notify()
@@ -1615,7 +1622,7 @@ Then run the following:
 
         if spec.oob:
             if not spec.oob.get('addr'):
-                spec.oob['addr'] = spec.hostname
+                spec.oob['addr'] = self.oob_default_addr
             if not spec.oob.get('port'):
                 spec.oob['port'] = '443'
             host_oob_info = dict()