Automating Baremetal Node Creation for Ironic

Sometime your shell scripts get out of control. Sometimes you are proud of them. Sometimes….both.

I need to be able to re-add a bunch of nodes to an OpenStack cluster on a regular basis. Yes, I could do this with Ansible, but, well, Ansible is great for doing something via SSH, and this just needs to be done here and now. So shell is fine.

This started as a one liner, and got a bit bigger.

Continue reading

JNLP Access to BMC On Fedora

Ampere has two models of Servers out: Falcon and Mt. Jades. The Falcons are the older one, and make up many of our utility servers.

I recently had to get in to a serial console on the machine. The IPMI address hosts a web console. From that you can get a serial console on the server, but you need JNLP, which stands for Java Net Launch Protocol. It is implemented by IcedTea in OpenJDK: icedtea-web is the name of the RPM on Fedora 34.

bkr job status

Here’s a one liner for showing the status of all your beaker jobs.

for JOB in $( bkr job-list -o $( bkr whoami | jq -r '.username' )  | jq -r ".[]"   ) ; do bkr job-results $JOB | xpath -q -e "string(/job/recipeSet/recipe/@status)" ; done

Select only the Jades

Some custom jq for RegEx selection of OpenStack Ironic baremetal nodes. Our Server types show up in their names. I want to be able to build lists of only the Mt. Jade Servers, which have names that look like this:

jade09-r097

openstack baremetal node list  --sort provision_state:asc   -c UUID -c Name -f json | jq '.[] | select(.Name | test("jade."))'

Debugging a Clean Failure in Ironic

My team is running a small OpenStack cluster with reposnsibility for providing bare metal nodes via Ironic. Currently, we have a handful of nodes that are not usable. They show up as “Cleaning failed.” I’m learning how to debug this process.

Continue reading