Hi,
We use HPE machines with hardware RAID. We have create customs commissioning scripts to create HW Raids. We have one script to each kind of configuration.
The main problem with this approach is that Maas by default enables all commissioning scripts, so we need to have one commissioning script (with high priority 00-xxx) to disable all others scripts executions and manually select the desired script.
If we can read the tags of a machine (and storage) from the commissioning script, we could use a single partitioning script that, according to which tag, will perform one configuration or another.
This solution is quite powerful, as it gives full control over how to create the partition making practically all the HW compatible.
From https://maas.io/docs/commissioning-scripts-reference it looks like this is supported already. I recall that we have used script metadata to selectively run some scripts and not others on certain machines at certain times, but I donāt recall the details, since we donāt have that hardware any more and donāt currently need custom scripts.
2 Likes
Hi,
I understand that if I put one tag in a machine, if matches with the field tag defined in the script metadata, the script will run at the commissioning.
I want to have the ability to read all the tags from a commissioning script. Something like the the environment variables.
It will by easy, that maas creates a environmet varible named āMACHINE_TAGSā with contains a list or a json. So with a bash or python script will be easy to read/process.
@adolfo94, iiuc, you want to build a series of if statements, based on machine tags; for each tag that is present, you want to run a certain script associated with that tag. do i understand you correctly?
Hi @billwear,
The objective itās automatize the HW RAID creation. Actually we need to select which script we need when we commission a machine. This approach isnāt optimal, because maas by default runs all commissioning script, so when we enlist a machine or re-commission it run all HW RAID creation script (which carries failed results).
The idea itās launch a script when a machine has a specific tag, or read the machine tags so the script can select what do.
@adolfo94, not the answers youāre looking for but FYI you can add the commissioning script tag noauto
so it wonāt run automatically. Thereās also the for_hardware
field where you can select specific PCI devices such as RAID controllers.
1 Like
Old thread but still the same - Iām trying to run specific commissioning script for specific machine type. Iāve tried tagging machine and script, but it does not work. It was like:
Machine has tag ānodeā
commissioning script (41-xxxx) hast tags ānode,noautoā
and while commissioning the 41-xxxx script is not started. When I remove ānoautoā it is started for every machine, regardless of the tag. How can I start specific commissioning script for specific machine/group of machines?? I canāt find any good documentation for using tags, I would really appreciate someoneās help - thanks in advance.