]> 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:00:06 +0000 (17:00 +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>
src/pybind/mgr/cephadm/module.py

index 5c5e602e944fcd278afc29329e8ed3e95da28565..1451943ab28aacc311845e713041ffa9ad74bf2a 100644 (file)
@@ -495,6 +495,12 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule,
             desc="Destination for cephadm command's persistent logging",
             enum_allowed=['file', 'syslog', 'file,syslog'],
         ),
+        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):
@@ -579,6 +585,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule,
             self.log_refresh_metadata = False
             self.default_cephadm_command_timeout = 0
             self.cephadm_log_destination = ''
+            self.oob_default_addr = ''
 
         self.notify(NotifyType.mon_map, None)
         self.config_notify()
@@ -1631,7 +1638,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()