beoconfig

Name

beoconfig – View or manipulate a Scyld ClusterWare configuration files.

Synopsis

beoconfig [-a, –all string] [-c, –config file] [-d, –delete string] [-D, –deleteall string] [-i, –insert string] [-r, –replace string1 string2] [-n, –node nodes] [-w, –withcomments] [-l, –syslog] [-h, –help] [-u, –usage] [-V, –version]

Description

beoconfig manipulates a Scyld ClusterWare configuration file to insert, replace, or delete “string” entries. A “string” consists of an initial keyword, plus zero or more parameters, plus an optional comment. This utility is commonly used in script files to retrieve parameters from the config file.

Options

The following options are available to the beoconfig program.

-a, --all search-string

Return all entries with specified search-string keyword.

-c file, --config file

Read configuration file file. Default is /etc/beowulf/config.

-d, --delete string

Delete the specified string from the config file.

-D, --deleteall string

Delete all instances of specified string from the config file.

-h, --help

Show a usage message.

-i, --insert string

Append the specified string to the config file if it does not already exist. When inserting a “node” entry, you must also specify a --node nodes argument.

-l, --syslog

Log error messages to the syslog (/var/log/messages).

-n, --node nodes

Perform action on specified nodes only. Nodes can be specified individually, as ranges, or as a comma-separated list of individual nodes and/or ranges.

-r, --replace <string1 string2>

Replace string1 with string2.

-u, --usage

Show a usage summary.

-V, --version

Show this version number.

-w, --withcomments

Show entries including comments.

Examples

[user@cluster user] $ export CLUSTERDEV="beoconfig interface"
[user@cluster user] $ $CLUSTERDEV
eth1

View MAC addresses for all nodes in /etc/beowulf/config:

[user@cluster user] $ beoconfig -a "node"
00:50:45:01:03:68 00:50:45:01:03:69
00:50:45:5C:29:F6 00:50:45:5C:29:F7
00:50:45:BB:A6:EA 00:50:45:BB:A6:EB
off
off
00:50:45:CD:BE:61

Demonstrate –withcomments

[root@cluster ~]#  beoconfig --insert "newkeyword param1 # with comment"
[root@cluster ~]#  beoconfig newkeyword
param1
[root@cluster ~]#  beoconfig -w newkeyword
param1 # with comment
# Now remove the unnecessary "newkeyword" entry:
[root@cluster ~]#  beoconfig -d newkeyword

Enable only Nodes 1, 2 and 8, to use IPMI

[root@cluster ~]#  beoconfig --node 1 --insert "ipmi enabled"
[root@cluster ~]#  beoconfig --node 8 --insert "ipmi enabled"
[root@cluster ~]#  beoconfig --node 2 --insert "ipmi enabled"
[root@cluster ~]#  beoconfig --node 1 "ipmi"
enabled
[root@cluster ~]#  beoconfig --node 3 "ipmi"
disabled

Looking in /etc/beowulf/config, one will see that the ‘ipmi’ keyword has a global value of ‘disabled’. However, there is another ‘ipmi’ keyword entry, and this one has an embedded node-set.

[root@cluster ~]# cat /etc/beowulf/config | grep ipmi
ipmi disabled
ipmi 1-2,8 enabled

Replace functionality: Suppose the config file has a ‘nodewake’ line to invoke an IPMI version 2.0 script for nodes 1 through 10, but node 5 has been replaced with a machine that supports only IPMI version 1.5. An admin must now replace node 5’s nodewake script.

[root@cluster ~]#  cat /etc/beowulf/config | grep nodewake
#nodewake /usr/lib/beoboot/bin/node_wake_ipmi
nodewake 1-10 /nfs/support/scripts/nodeup_ipmiv2.0
[root@cluster ~]#  beoconfig --node 5 --replace "nodewake *" \
                      "nodewake /nfs/support/scripts/nodeup_ipmiv1.5"
[root@cluster ~]#  cat /etc/beowulf/config | grep nodewake
#nodewake /usr/lib/beoboot/bin/node_wake_ipmi
nodewake 1-4,6-10 /nfs/support/scripts/nodeup_ipmiv2.0
nodewake 5 /nfs/support/scripts/nodeup_ipmiv1.5

Insert node-holes for node’s 0 through 9, while adding a MAC address for node 10

[root@cluster ~]#  beoconfig -a node
[root@cluster ~]#  beoconfig -i "node 00:11:22:33:44:55 " --node 10
[root@cluster ~]#  beoconfig -a node
off ##node number 000
off ##node number 001
off ##node number 002
off ##node number 003
off ##node number 004
off ##node number 005
off ##node number 006
off ##node number 007
off ##node number 008
off ##node number 009
node 00:11:22:33:44:55

Get the MAC address for node 10

[root@cluster ~]# beoconfig -n 10 node
00:11:22:33:44:55