0

I'm working with MAAS. I have been able to get IPMI and Wake On Lan to power on nodes. For some nodes that do not support Wake On Lan and also do not have IPMI, I have a Server Technology Sentry Switched CDU (current 7.0p firmware). MAAS seems to be unable to start nodes using the Sentry Switch CDU option.

For the "Power Address" I entered the IP of the CDU. For the "Power ID" I entered A1 for the first plug, A2 for the second and so on. (Also tried the names instead of the ID's) For the "Power User" and "Power Password" I entered the credentials for the CDU.

Do I need to edit fence_cdu.template? Is there more documentation around power control for MAAS? I've searched but not found much.

I'm using MAAS 1.7. Updates were run a few days ago.

0

Here is what worked for me. FYI, I'm using Utopic for my MAAS controller. All actions I performed were performed directly from the MAAS controller terminal or via ssh.

Earlier in my problem solving process after asking the question, I downgraded my CDU to firmware 6.0g and have not upgraded it back to 7.0p yet but if I do, I'll comment here on the results.

For whatever reason, fence_cdu (a wonderful little program that lets you manage the cdu from terminal made by Andres Rodriguez of Canonical) did not exist in /usr/sbin after installing MAAS. So I decided to install fence-agents which installed version 4.0.7.1-2.1 (from Utopic's sources). That did place several fence_ programs in /usr/sbin, but not the one I needed "fence_cdu". I downloaded the various fence-agents packages available from https://launchpad.net/ubuntu/+source/fence-agents to examine them and noticed that releases after Precise did not include fence_cdu. So, I removed the Utopic version of fence-agents.

sudo apt-get --purge remove fence-agents

I followed the information at https://help.ubuntu.com/community/PinningHowto to pin the Precise version of fence-agents so apt-get would install the version that included fence_cdu. In short, I created /etc/apt/apt.conf.d/01ubuntu

sudo nano /etc/apt/apt.conf.d/01ubuntu

Added the following to the 01ubuntu file:

APT::Default-Release "utopic";

Edited my sources:

sudo nano /etc/apt/sources.list

Added the following to sources.list:

deb http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse

Created /etc/apt/preferences:

sudo nano /etc/apt/preferences

Added the following to the preferences file:

Package: fence-agents
Pin: release n=precise
Pin-Priority: 991

I ran:

apt-get update

Then I checked to make sure the version of fence-agents I wanted would install:

apt-cache policy fence-agents

That showed me it would install version 3.1.5-2ubuntu2 so I installed it:

sudo apt-get install fence-agents

After the firmware downgrade, the "Control State" of each outlet was "Idle Off". For some reason, MAAS cannot perform power operations on an outlet in this state. My fix is to first perform an operation like power on or off via ssh/telnet or the CDU's built in web gui which changes the control state and subsequent MAAS operations will work. This has to be performed for each outlet.

I tested it from the MAAS controller (it did not work until performing an operation via ssh/telnet or the CDU web gui as mentioned in the previous paragraph):

fence_cdu -a 10.0.0.10 -n TowerA_Outlet1 -l myCDUusername -p myCDUpassword -o on -v fence_cdu -a 10.0.0.10 -n TowerA_Outlet1 -l myCDUusername -p myCDUpassword -o off -v

Line 1 powered on the first outlet on the CDU. Line 2 powered it off. The IP 10.0.0.10 was the IP of my CDU. If you are following this, replace myCDUusername and myCDUpassword accordingly. TowerA_Outlet1 was the outlet name of my first outlet. I didn't get it to work with the outlet ID for some reason. Names are good enough for me.

Then I used the MAAS web gui to edit each node's settings. I selected "Sentry Switch CDU" as the "Power type". Entered my CDU's IP address as the "Power address". Entered the appropriate "Outlet Name" in as the "Power ID". I entered the CDU user and password as the "Power user" and "Power password".

I am very happy that MAAS can now power on and power off nodes accordingly. If I release a node while "Disk Erasing on release" is enabled, nothing happens. My workaround for that is to abort the disk erasure then stop the node. Re-issue the release command should power it on and erase the disks. If you can remember, it's better to just stop the node which powers it off, then issue the release which will power it on and erase the disks.

  • It seems pinning the fence-agents package in order to get fence_cdu is no longer needed if using Ubuntu LTS 14.04.3. The default fence-agents package includes it now. – Brandon Marler Oct 2 '15 at 13:27

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.