This is an old revision of the document!
Table of Contents
Reimaging Testnodes
Summary
mira and smithi are automatically reimaged by FOG when locked using teuthology-lock.
Prior to 2018, we didn't have FOG and testnodes would need to be reimaged every so often using cobbler when the OS would get too mangled to re-use. The dhcp server is configured to point smithi and mira to the FOG PXE server. All other machine types can use Cobbler.
Having said that, Cobbler is configured using ceph-cm-ansible and primarily to install on /dev/sda on a machine with a single NIC. If a machine has a more complex configuration than that, the Manual method below is recommended.
Cobbler Web UI
If you don't already have a Cobbler Web UI account, request one by filing a ticket.
Single Machine (Manual)
- Click Systems on the left sidebar
- Locate the system you want to reimage
- If desired, increase the Items/page dropdown in the upper right corner
- Click the system's name under the Name header
- Go to the Networking tab
- Make a note of the current MAC address
- Change the MAC address to
DE:AD:BE:EF:AF:AFor something else you know is bogus (this makes sure the PXE server doesn't recognize the machine you're reimaging after it reboots so that you get the Cobbler Menu) - Save
- Open a Java Web Console by logging into the target machine's IPMI Web UI (
target.ipmi.sepia.ceph.com) - Reboot the machine either using the Java Web Console menu or ipmitool
- Watch the Java Web Console. You should eventually be presented with the Cobbler Menu which should look something like this
- Arrow down and highlight the OS you intend to install. Then press Tab
- Erase everything except the
initrd=andvmlinuz=parameters.- If you're installing CentOS or RHEL, you must also add
inst.repo=http://172.21.0.11/cobbler/ks_mirror/DISTRO(e.g.,inst.repo=http://172.21.0.11/cobbler/ks_mirror/CentOS-7.5-x86_64)
- Press Enter
- You should end up with a graphical installation
- When you're done, go back in the Networking settings for the machine and set the MAC address back.
Single Machine (Automated)
- Click Systems on the left sidebar
- Locate the system you want to reimage
- If desired, increase the Items/page dropdown in the upper right corner
- Click the system's name under the Name header
- Set the Profile dropdown to your desired distro/profile
- Check Netboot Enabled
- Click Save
- Power cycle the testnode
Multiple Machines (Automated)
- Click Systems on the left sidebar
- Check the boxes next to the systems you want to reimage
- If desired, select Change profile under the Batch Actions drop-down at the top
- Enter the desired profile name
- Click OK
- Check the boxes next to the systems you want to reimage (again if you changed the Profile)
- Select Netboot Enabled under the Batch Actions drop-down at the top
- Click OK
- Power cycle the testnodes you wish to reimage
Cobbler CLI
You will need to have sudo access on the cobbler host. This is typically reserved for Infra Admins.
ssh cobbler.front.sepia.ceph.com
# To see a list of available Profiles/Distros,
sudo cobbler profile list
# To list the systems
sudo cobbler system list
# After you've decided on a profile,
sudo cobbler system edit --name $SHORT_HOSTNAME --profile=$PROFILE_NAME --netboot-enabled=1
# Example:
sudo cobbler system edit --name smithi001 --profile=CentOS-7.2-x86_64 --netboot-enabled=1
# Example for reimaging a large number of testnodes at once:
for host in smithi{001..030}; do sudo cobbler system edit --name $host --profile=CentOS-7.2-x86_64 --netboot-enabled=1; ipmitool -I lanplus -U inktank -P XXXXX -H $host.ipmi.sepia.ceph.com chassis power cycle; done
Now power cycle the testnode.
