Using MAAS with consumer motherboards

We have a rack filled with machines that all have standard consumer client motherboards, e.g. Z170I PRO GAMING, and remotely switchable IP based power sockets.

As with many normal consumer hardware, the machines don’t have an “always-on” feature. If they were shutdown the only way to turn them back on is to physically press their power button. At some moments MAAS decides to shutdown the machines instead of rebooting them and then somebody has to press the power-button. WOL is not possible. Having the option to never shutdown would solve the issue.

We would like to use MAAS to manage these machines without somebody having to physically press the power button to turn on these machines after commission or release, but it doesn’t work.

Related Content:
The problem is similar to what this person has.

Note, we can remotely power cycle the machines without issue. They would restart if reboot was requested from the OS or they - while they were already running - lose power and get power again (e.g. cycling on the power socket). The problem is that the machines are already powered off thus power cycling on the power socket is not working.

Does anybody here have a tip or hidden configuration we could check out?

1 Like

Inspired by this post I tried to change the cloud-init power state setting in the MAAS server python code from “poweroff” to “restart”.

In order to make that, I had to install MAAS as a deb package and then edit the correct file located at /usr/lib/python3/dist-packages/maasserver/ Then just restart MAAS (e.g. using systemd restart for each of the maas* units, but don’t bother: I just rebooted the whole server).

The effect is that we now have the nodes doing repeated reboots at the “Ready” stage. This is more acceptable, but would use more power than necessary.

The cloud-init specification for the power state change module states that “If mode is any value other than poweroff, halt, or reboot, then no action will be taken.”

Hence, if we change the in the line from “poweroff” to e.g. “any” then we achieve the desired result.

If we want to deploy a machine we now will have to power cycle it using the remote controllable power switch. Then at the next netboot the machine will be set up properly.

I’m glad I’m not the only one with this issue. We have a system where we can remotely trigger the reset power header on the motherboard to power cycle, but this also doesn’t start the server/work if it’s powered off.

I made this script that does that with a Snap installation until MAAS adds the feature.

cp /snap/maas/current/lib/python3.8/site-packages/maasserver/ ~/maas_edits/

# Disable all poweroff
sed -i 's+"mode": "poweroff"+"mode": "any"+g' ~/maas_edits/

mount --bind -o nodev,ro ~/maas_edits/ /snap/maas/current/lib/python3.8/site-packages/maasserver/
snap restart maas

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

i would have to say i think this is the solution, unless you have a feature request you’d like to add to the “Features” category.