2.5. Inspecting and Changing PXE Behaviour

There are two parts to the Rocks database for modifying PXE behaviour: pxeboot and pxeaction. The pxeboot part determines which logical action should be performed. The base roll ships with three logical actions: "os", "install", and "memtest". The second table in the pxeaction table. The associates a logical action with specific tftp configuration. The pxeaction table supports a default configuration for an action and it supports a per-node override of the default configuration.

Warning

It is possible to have commands affect all nodes. In this case use '%' as the host wildcard. For example rocks set host pxeboot % action=install will cause ALL nodes to reinstall at next pxeboot.

Note

For commands that take lists of hosts, it is possible to use an appliance type for the host(s) argument. rocks list appliance are the list of valid appliance types. To set the pxeaction of all compute appliances to be install, use rocks set host pxeboot compute action=install

The following illustrates how to inspect the current action of nodes and then the specifics of each action.

[root@vizzy ~]# rocks list host pxeboot
HOST         ACTION 
vizzy:       os     
compute-0-0: os     
compute-0-1: os     
compute-1-0: os     
compute-1-1: install
compute-2-0: os     
compute-2-1: os 


[root@vizzy ~]# rocks list host pxeaction compute-1-1
ACTION           COMMAND        ARGS
install          kernel vmlinuz append ks initrd=initrd.img ramdisk_size=150000
                                lang= devfs=nomount pxe kssendmac selinux=0
install headless kernel vmlinuz append ks initrd=initrd.img ramdisk_size=150000
                                lang= devfs=nomount pxe kssendmac selinux=0 headless vnc
memtest          kernel memtest -------------------------------------------------
os               localboot 0    -----------------------------------------------
[root@vizzy ~]# 

In the above, all nodes are set to pxeboot the "os", except for node compute-1-1. That node will call the pxeboot named "install". In the case the tftp configuration file contain the details arguments of the listed in the install action. The command rocks list host pxeaction compute-1-1 shows the details of each logical action.

2.5.1. Changing a logical PXE action

It is possible to override the details of a logical action on a per-node basis. Suppose that we wanted to make the logical action of "install" for compute-1-1 to be headless and to set a flag acpi=off. Then the following will accomplish this using a Rocks add command.

[root@vizzy ~]# rocks add host pxeaction compute-1-1 action=install command="kernel vmlinuz" \
args="append ks initrd=initrd.img ramdisk_size=150000 lang= devfs=nomount pxe kssendmac selinux=0 headless vnc acpi=off" 

To inspect that the change is indeed specific to just compute-1-1, then do the following

[root@vizzy ~]# rocks list host pxeaction compute-1-1
ACTION           COMMAND        ARGS
install          kernel vmlinuz append ks initrd=initrd.img ramdisk_size=150000
                                lang= devfs=nomount pxe kssendmac selinux=0 headless vnc acpi=off
install headless kernel vmlinuz append ks initrd=initrd.img ramdisk_size=150000
                                lang= devfs=nomount pxe kssendmac selinux=0 headless vnc         
memtest          kernel memtest ------------------------------------------------
os               localboot 0    ------------------------------------------------

[root@vizzy ~]# rocks list host pxeaction compute-1-0 
ACTION           COMMAND        ARGS
install          kernel vmlinuz append ks initrd=initrd.img ramdisk_size=150000
                                lang= devfs=nomount pxe kssendmac selinux=0
install headless kernel vmlinuz append ks initrd=initrd.img ramdisk_size=150000
                                lang= devfs=nomount pxe kssendmac selinux=0 headless vnc
memtest          kernel memtest ------------------------------------------------
os               localboot 0    ------------------------------------------------

In the above, compute-1-1 has a specific override for its install pxeaction. compute-1-0 still retains the default install action.

Warning

Manipulating the pxeaction does NOT update the actual tftp configuration file. You must use rocks set pxeboot action=<action> hostname to actually write the specific tftp configuration file

Note

To remove a specific override of a pxeaction for a node use rocks remove host pxeaction action=<action> hostname

2.5.2. Running Memtest86

It is often useful to run the memory testing tool memtest86+ to determine if memory is valid. The straightforward way to accomplish this in Rocks 4.3 is to apply the following procedure (in our example case for host compute-1-1)

  1. # rocks set host pxeboot compute-1-1 action=memtest

  2. Boot node compute-1-1 by power cycle or other means.

  3. After compute-1-1 has successfully started the diagnostic, reset the pxeboot parameter # rocks set host pxeboot compute-1-1 action=os