Multiple BMC interfaces handling for 30-maas-01-bmc-config

Hello Everyone,

We encounter an issue using multiple BMC network interfaces under 30-maas-01-bmc-config commissioning script.
Depending on what we would like to accomplish we had to patch like this :

--- 30-maas-01-bmc-config       2022-11-30 06:56:20.108519941 +0100
+++ 29-Kontron-me1210-bmc-second-interface       2022-11-30 06:56:20.392523595 +0100
@@ -21,7 +21,7 @@
 # along with this program.  If not, see <>.
 # --- Start MAAS 1.0 script metadata ---
-# name: 30-maas-01-bmc-config
+# name: 29-Kontron-me1210-bmc-second-interface
 # title: Detect and configure BMC's for MAAS use.
 # description: Detect and configure BMC credentials for MAAS use.
 # tags: bmc-config
@@ -174,7 +174,7 @@ class IPMI(BMCConfig):
     def _bmc_get_config(self, section=None):
         """Fetch and cache all BMC settings."""
         print("INFO: Reading current IPMI BMC values...")
-        cmd = ["bmc-config", "--checkout"]
+        cmd = ["bmc-config", "--checkout", "--lan-channel-number=2"]
         if section:
             cmd += ["-S", section]

But this is very unconvenient cause depending on how the machine BMC is connected to the network we have to remember and check or not this new 29-Kontron-me1210-bmc-second-interface script in the list of commissioning scripts.

For sure we always connect only one BMC network interface.
So that would be great that in the case of no IP is detected on a BMC interface, and so the machine cannot be managed, this script just try next BMC interface.
So we wouldn’t have to care about using multiple commissioning scripts depending on which BMC interfaces we are connected to.

That would be even more great if this could be included in 3.3.

Thanks in advance,
Have a nice day,
Best Regard,

Hi @mkl1

we currently have a contributor patch that should fix this, but we don’t have a machine to test it. Would you be willing to test this patch?

Hello Alexsander, I hope you’re doing fine !

Thanks for your answer.

I am starting to look into the patch, but I am not able to find on my snap MaaS 3.2.6 the file test_bmc_config.
Also would I be able to patch a “snap” MaaS ?

Thanks in advance,
Have a nice day,
Best Regards,

Hi @mkl1.

You don’t need file since it is a unit-test and it is not used by the deployed MAAS instance in any way.

As for patching snap installs, unfortunately, you won’t be able to to do that due to read-only nature of the snaps. To test that patch, you could either

  • upload the patched script as a custom commissioning script and use it instead of the default 30-maas-01-bmc-config;
  • build your own MAAS snap with that patch being applied;
  • install MAAS from .deb packages and patch it.

Hope that helps, have a nice day!

Hello and Thanks Igor and Alexander !

I finally found the time to try this and it seems to have solved my issue about using the second interface of the BMC.

Best Regards,

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.