9.15. set

9.15.1. set appliance attr

rocks set appliance attr {appliance} {attr} {value} [attr=string] [value=string]

Sets an attribute to an appliance and sets the associated values

arguments

appliance

Name of appliance

attr

Name of the attribute

value

Value of the attribute

parameters

[attr=string]

same as attr argument

[value=string]

same as value argument

examples

# rocks set appliance attr compute sge False

Sets the sge attribution to False for compute appliances

# rocks set appliance attr compute sge attr=cpus value=2

same as above

9.15.2. set attr

rocks set attr {attr} {value} [attr=string] [value=string]

Sets a global attribute for all nodes

arguments

attr

Name of the attribute

value

Value of the attribute

parameters

[attr=string]

same as attr argument

[value=string]

same as value argument

examples

# rocks set attr sge False

Sets the sge attribution to False

related commands

list attr

remove attr

9.15.3. set host attr

rocks set host attr {host} {attr} {value} [attr=string] [value=string]

Sets an attribute to a host and sets the associated values

arguments

host

Host name of machine

attr

Name of the attribute

value

Value of the attribute

parameters

[attr=string]

same as attr argument

[value=string]

same as value argument

examples

# rocks set host attr compute-0-0 cpus 2

Sets the number of cpus of compute-0-0 to 2

# rocks set host attr compute-0-0 attr=cpus value=2

same as above

9.15.4. set host boot

rocks set host boot {host...} [action=string]

Set a bootaction for a host. A hosts action can be set to 'install' or to 'os' (also, 'run' is a synonym for 'os').

arguments

host

One or more host names.

parameters

[action=string]

The label name for the bootaction. This must be one of: 'os', 'install', or 'run'. If no action is supplied, then only the configuration file for the list of hosts will be rewritten.

examples

# rocks set host boot compute-0-0 action=os

On the next boot, compute-0-0 will boot the profile based on its "run action". To see the node's "run action", execute: "rocks list host compute-0-0" and examine the value in the "RUNACTION" column.

9.15.5. set host bootflags

rocks set host bootflags {host...} [flags=string]

Set the boot flags for a host. The boot flags will applied to the configuration file that a host uses to boot the running kernel. For example, if a node uses GRUB as its boot loader, the boot flags will part of the 'append' line.

arguments

host

Zero, one or more host names. If no host names are supplied, then the global bootflag will be set.

parameters

[flags=string]

The boot flags to set for the host.

examples

# rocks set host bootflags compute-0-0 flags="mem=1024M"

Apply the kernel boot flags "mem=1024M" to compute-0-0.

9.15.6. set host cdrom

rocks set host cdrom {host} [cdrom=string] [key=string]

Set the cdrom ISO file for a virtual node through Airboss If you want to change the cdrom ISO and you are root on the physical vm frontend use rocks set host vm cdrom (it does not use airboss)

arguments

host

Host name of machine. This host name should be the name of the machine that you want to set the cdrom

parameters

[cdrom=string]

The cdrom file path on the VM container that runs the virtual host.

[key=string]

A private key that will be used to authenticate the request. This should be a file name that contains the private key.

9.15.7. set host comment

rocks set host comment {host...} {comment} [comment=string]

Set the comment field for a list of hosts.

arguments

host

One or more host names.

comment

The string to assign to the comment field for each host.

parameters

[comment=string]

Can be used in place of the comment argument.

examples

# rocks set host comment compute-0-0 "Fast Node"

Sets the comment field to "Fast Node" for compute-0-0.

# rocks set host comment compute-0-0 compute-0-1 "Slow Node"

Sets the comment field to "Slow Node" for compute-0-0 and compute-0-1.

# rocks set host comment compute-0-0 compute-0-1 comment="Slow Node"

Same as above.

9.15.8. set host cpus

rocks set host cpus {host...} {cpus} [cpus=string]

Set the number of CPUs for a list of hosts.

arguments

host

One or more host names.

cpus

The number of CPUs to assign to each host.

parameters

[cpus=string]

Can be used in place of the cpus argument.

examples

# rocks set host cpus compute-0-0 2

Sets the CPU value to 2 for compute-0-0.

# rocks set host cpus compute-0-0 compute-0-1 4

Sets the CPU value to 4 for compute-0-0 and compute-0-1.

# rocks set host cpus compute-0-0 compute-0-1 cpus=4

Same as above.

9.15.9. set host installaction

rocks set host installaction {host...} {action} [action=string]

Set the install action for a list of hosts.

arguments

host

One or more host names.

action

The install action to assign to each host. To get a list of all actions, execute: "rocks list bootaction".

parameters

[action=string]

Can be used in place of the action argument.

examples

# rocks set host installaction compute-0-0 install

Sets the install action to "install" for compute-0-0.

# rocks set host installaction compute-0-0 compute-0-1 "install i386"

Sets the install action to "install i386" for compute-0-0 and compute-0-1.

# rocks set host installaction compute-0-0 compute-0-1 action="install i386"

Same as above.

9.15.10. set host interface channel

rocks set host interface channel {host...} {iface} {channel} [channel=string] [iface=string]

Sets the channel for a named interface.

arguments

host

One or more hosts.

iface

Interface that should be updated. This may be a logical interface or the MAC address of the interface.

channel

The channel for an interface. Use channel=NULL to clear.

parameters

[channel=string]

Can be used in place of the channel argument.

[iface=string]

Can be used in place of the iface argument.

examples

# rocks set host interface channel compute-0-0 iface=eth1 channel="bond0"

Sets the channel for eth1 to be "bond0" (i.e., it associates eth1 with the bonded interface named "bond0").

# rocks set host interface channel compute-0-0 iface=eth1 channel=NULL

Clear the channel entry.

9.15.11. set host interface iface

rocks set host interface iface {host...} {mac} {iface} [iface=string] [mac=string]

Sets the logical interface of a mac address for particular hosts.

arguments

host

One or more named hosts.

mac

MAC address of the interface whose logical interface will be reassigned

iface

Logical interface.

parameters

[iface=string]

Can be used in place of the iface argument.

[mac=string]

Can be used in place of the mac argument.

examples

# rocks set host interface iface compute-0-0 00:0e:0c:a7:5d:ff eth1

Sets the logical interface of MAC address 00:0e:0c:a7:5d:ff to be eth1

# rocks set host interface iface compute-0-0 iface=eth1 mac=00:0e:0c:a7:5d:ff

Same as above.

related commands

add host

9.15.12. set host interface ip

rocks set host interface ip {host} {iface} {ip} [iface=string] [ip=string]

Sets the IP address for the named interface for one host.

arguments

host

Host name.

iface

Interface that should be updated. This may be a logical interface or the mac address of the interface.

ip

The IP address of the interface. Usually of the form nnn.nnn.nnn.nnn where n is a decimal digit. This format is not enforced. Use IP=NULL to clear.

parameters

[iface=string]

Can be used in place of the iface argument.

[ip=string]

Can be used in place of the ip argument.

examples

# rocks set host interface ip compute-0-0 eth1 192.168.0.10

Sets the IP Address for the eth1 device on host compute-0-0.

# rocks set host interface ip compute-0-0 iface=eth1 ip=192.168.0.10

Same as above.

9.15.13. set host interface mac

rocks set host interface mac {host} {iface} {mac} [iface=string] [mac=string]

Sets the mac address for named interface on host.

arguments

host

Host name.

iface

Interface that should be updated. This may be a logical interface or the mac address of the interface.

mac

The mac address of the interface. Usually of the form dd:dd:dd:dd:dd:dd where d is a hex digit. This format is not enforced. Use mac=NULL to clear the mac address.

parameters

[iface=string]

Can be used in place of the iface argument.

[mac=string]

Can be used in place of the mac argument.

examples

# rocks set host interface mac compute-0-0 eth1 00:0e:0c:a7:5d:ff

Sets the MAC Address for the eth1 device on host compute-0-0.

# rocks set host interface mac compute-0-0 iface=eth1 mac=00:0e:0c:a7:5d:ff

Same as above.

# rocks set host interface mac compute-0-0 iface=eth1 mac=NULL

clears the mac address from the database

related commands

add host

9.15.14. set host interface module

rocks set host interface module {host...} {iface} {module} [iface=string] [module=string]

Sets the device module for a named interface. On Linux this will get translated to an entry in /etc/modprobe.conf.

arguments

host

One or more hosts.

iface

Interface that should be updated. This may be a logical interface or the MAC address of the interface.

module

The software device module of interface. Use module=NULL to clear.

parameters

[iface=string]

Can be used in place of the iface argument.

[module=string]

Can be used in place of the module argument.

examples

# rocks set host interface module compute-0-0 eth1 e1000

Sets the device module for eth1 to be e1000 on host compute-0-0.

# rocks set host interface module compute-0-0 iface=eth1 module=e1000

Same as above.

# rocks set host interface module compute-0-0 iface=eth1 module=NULL

Clear the module entry.

related commands

add host

9.15.15. set host interface name

rocks set host interface name {host} {iface} {name} [iface=string] [name=string]

Sets the logical name of a network interface on a particular host.

arguments

host

Host name.

iface

Interface that should be updated. This may be a logical interface or the MAC address of the interface.

name

Name of this interface (e.g. newname). This is only the name associated with a certain interface. FQDNs are disallowed. To set the domain or zone for an interface, use the "rocks add network" command, and then associate the interface with the network

parameters

[iface=string]

Can be used in place of the iface argument.

[name=string]

Can be used in place of the name argument.

examples

# rocks set host interface name compute-0-0 eth1 cluster-0-0

Sets the name for the eth1 device on host compute-0-0 to cluster-0-0.zonename. The zone is decided by the subnet that the interface is attached to.

# rocks set host interface name compute-0-0 iface=eth1 name=c0-0

Same as above.

related commands

add host

add network

9.15.16. set host interface options

rocks set host interface options {host...} {iface} [iface=string] [options=string]

Sets the options for a device module for a named interface. On Linux, this will get translated to an entry in /etc/modprobe.conf.

arguments

host

One or more hosts.

iface

Interface that should be updated. This may be a logical interface or the MAC address of the interface.

parameters

[iface=string]

Can be used in place of the iface argument.

[options=string]

The options for an interface. Use options=NULL to clear. In Rocks 5.4 (linux): options='dhcp' or options='noreport' have special meaning. Bonded interfaces use options field to set up bonding options.

examples

# rocks set host interface options compute-0-0 iface=eth1 options="Speed=10"

Sets the option "Speed=10" for eth1 on e1000 on host compute-0-0.

# rocks set host interface options compute-0-0 iface=eth1 options=NULL

Clear the options entry.

# rocks set host interface options compute-0-0 iface=eth0 options="dhcp"

Linux only: Configure eth0 interface for DHCP instead of static.

# rocks set host interface options compute-0-0 iface=eth0 options="noreport"

Linux only: Tell rocks report host interface to ignore this interface when writing configuration files

9.15.17. set host interface subnet

rocks set host interface subnet {host...} {iface} {subnet} [iface=string] [subnet=string]

Sets the subnet for named interface on one of more hosts.

arguments

host

One or more named hosts.

iface

Interface that should be updated. This may be a logical interface or the MAC address of the interface.

subnet

The subnet address of the interface. This is a named subnet and must be listable by the command 'rocks list network'.

parameters

[iface=string]

Can be used in place of the iface argument.

[subnet=string]

Can be used in place of the subnet argument.

examples

# rocks set host interface subnet compute-0-0 eth1 public

Sets eth1 to be on the public subnet.

# rocks set host interface mac compute-0-0 iface=eth1 subnet=public

Same as above.

related commands

add host

9.15.18. set host interface vlan

rocks set host interface vlan {host...} {iface} {vlan} [iface=string] [vlan=string]

Sets the VLAN ID for an interface on one of more hosts.

arguments

host

One or more named hosts.

iface

Interface that should be updated. This may be a logical interface or the mac address of the interface.

vlan

The VLAN ID that should be updated. This must be an integer and the pair 'subnet/vlan' must be defined in the VLANs table.

parameters

[iface=string]

Can be used in place of the iface argument.

[vlan=string]

Can be used in place of the vlan argument.

examples

# rocks set host interface vlan compute-0-0-0 eth0 3

Sets compute-0-0-0's private interface to VLAN ID 3.

# rocks set host interface vlan compute-0-0-0 subnet=eth0 vlan=3

Same as above.

related commands

add host

9.15.19. set host membership

rocks set host membership {host...} {membership} [membership=string]

Set the membership for hosts.

arguments

host

One or more host names.

membership

The membership to assign to each host.

parameters

[membership=string]

Can be used in place of the membership argument.

examples

# rocks set host membership "NAS Appliance" nas-0-0

Sets the membership to 'NAS Appliance' for nas-0-0.

# rocks set host membership "NAS Appliance" membership=nas-0-0

Same as above.

# rocks set host membership Compute

Sets the membership to 'Compute' for all known hosts.

9.15.20. set host name

rocks set host name {host} {name} [name=string]

Rename a host.

arguments

host

The current name of the host.

name

The new name for the host.

parameters

[name=string]

Can be used in place of the 'name' argument.

examples

# rocks set host name compute-0-0 new-compute-0-0

Changes the name of compute-0-0 to new-compute-0-0.

# rocks set host cpus compute-0-0 name=new-compute-0-1

Same as above.

9.15.21. set host power

rocks set host power {host...} [action=string] [key=string]

Turn the power for a host on or off.

arguments

host

One or more host names.

parameters

[action=string]

The power setting. This must be one of 'on', 'off' or 'install'. The 'install' action will turn the power on and force the host to install.

[key=string]

A private key that will be used to authenticate the request. This should be a file name that contains the private key. If not specified it will default to $HOME/.ssh/id_rsa.pub or $HOME/.ssh/id_dsa.pub

examples

$ rocks set host power compute-0-0 action=on

Turn on the power for compute-0-0.

9.15.22. set host rack

rocks set host rack {host...} {rack} [rack=string]

Set the rack number for a list of hosts.

arguments

host

One or more host names.

rack

The rack number to assign to each host.

parameters

[rack=string]

Can be used in place of rack argument.

examples

# rocks set host rack compute-2-0 2

Set the rack number to 2 for compute-2-0.

# rocks set host rack compute-0-0 compute-0-1 0

Set the rack number to 0 for compute-0-0 and compute-0-1.

# rocks set host rack compute-0-0 compute-0-1 rack=0

Same as above.

9.15.23. set host rank

rocks set host rank {host...} {rank} [rank=string]

Set the rank number for a list of hosts.

arguments

host

One or more host names.

rank

The rank number to assign to each host.

parameters

[rank=string]

Can be used in place of rank argument.

examples

# rocks set host rank compute-0-2 2

Set the rank number to 2 for compute-0-2.

# rocks set host rank compute-0-0 compute-1-0 0

Set the rank number to 0 for compute-0-0 and compute-1-0.

# rocks set host rank compute-0-0 compute-1-0 rank=0

Same as above.

9.15.24. set host roll

rocks set host roll {host} {name} {version} {arch} [arch=string] [name=string] [os=string] [version=string]

Associates a roll with a frontend appliance.

arguments

host

Host name of a frontend machine.

name

Name of the roll (e.g., 'base').

version

Version of the roll (e.g., '5.2').

arch

Architecture of the roll (e.g., 'x86_64').

parameters

[arch=string]

Same as 'arch' argument.

[name=string]

Same as 'name' argument.

[os=string]

The OS version. The default is 'linux'.

[version=string]

Same as 'version' argument.

examples

# rocks set host roll frontend-0-0-0 base 5.2 x86_64

Associates the roll with name/version/arch of 'base/5.2/x86_64' to frontend-0-0-0.

related commands

list host roll

9.15.25. set host runaction

rocks set host runaction {host...} {action} [action=string]

Set the run action for a list of hosts.

arguments

host

One or more host names.

action

The run action to assign to each host. To get a list of all actions, execute: "rocks list bootaction".

parameters

[action=string]

Can be used in place of the action argument.

examples

# rocks set host runaction compute-0-0 os

Sets the run action to "os" for compute-0-0.

# rocks set host runaction compute-0-0 compute-0-1 memtest

Sets the run action to "memtest" for compute-0-0 and compute-0-1.

# rocks set host runaction compute-0-0 compute-0-1 action=memtest

Same as above.

9.15.26. set host sec_attr

rocks set host sec_attr {host} [attr=string] [crypted=boolean] [enc=string] [value=string]

Set a host-specific secure attribute to the database. The user also has the option of not supplying the value on the command line. The command will prompt the user to enter the secure attribute value, and will not echo this value on screen. If the user chooses to enter the value for the secure attribute by prompt, then the value entered must be in an unencrypted form.

arguments

host

Host name of machine

parameters

[attr=string]

Name of the attribute

[crypted=boolean]

Is "value" already crypted or not

[enc=string]

Encryption scheme to use to crypt the value. Currently supported values are "sha", "crypt", "portable".

[value=string]

Value of the attribute. If value is a file, read the value from that file

examples

# rocks set host sec_attr compute-0-0 attr=db_pw value=DatabasePassword crypted=false enc=sha

Sets a secure attribute called db_pw to the crypted value of "DatabasePassword" using the sha1 encoding schema.

# rocks set host sec_attr compute-0-0 attr=db_pw value=77e6674e6d71f898d5fc79424117c86731ca7498 crypted=true

Same as above

9.15.27. set network mtu

rocks set network mtu {network...} {mtu} [mtu=string]

Sets the MTU for one or more named networks.

arguments

network

One or more named networks that should have the defined MTU.

mtu

MTU that named networks should have.

parameters

[mtu=string]

Can be used in place of 'mtu' argument.

examples

# rocks set network mtu optiputer 9000

Sets the "optiputer" MTU address to 9000.

# rocks set network mtu optiputer mtu=9000

Same as above.

9.15.28. set network netmask

rocks set network netmask {network...} {netmask} [netmask=string]

Sets the network mask for one or more named networks .

arguments

network

One or more named networks that should have the defined netmask.

netmask

Netmask that named networks should have.

parameters

[netmask=string]

Can be used in place of netmask argument.

examples

# rocks set network netmask optiputer 255.255.255.0

Sets the netmask for the "optiputer" network to a class-c address space.

# rocks set network netmask optiputer netmask=255.255.255.0

Same as above.

# rocks set network netmask optiputer cavewave 255.255.0.0

Sets the netmask for the "optiputer" and "cavewave" networks to a class-b address space.

9.15.29. set network servedns

rocks set network servedns {network} {servedns} [servedns=bool]

Sets/Unsets the capability for serving DNS for a given subnet

arguments

network

Name of the Network

servedns

True/False

parameters

[servedns=bool]

True/False

9.15.30. set network subnet

rocks set network subnet {network...} {subnet} [subnet=string]

Sets the subnet for one or more named networks.

arguments

network

One or more named networks that should have the defined subnet.

subnet

Subnet that named networks should have.

parameters

[subnet=string]

Can be used in place of subnet argument.

examples

# rocks set network subnet optiputer 132.239.51.0

Sets the "optiputer" subnet address to 132.239.51.0.

# rocks set network subnet optiputer subnet=132.239.51.0

Same as above.

# rocks set network subnet optiputer cavewave 67.58.32.0

Sets both the "optiputer" and "cavewave" subnet addresses to the same value of 67.58.32.0.

9.15.31. set network zone

rocks set network zone {network} {zone} [zone=string]

Set the zone/domain name associated with a subnet

arguments

network

Network Name

zone

Zone / Domain that the network belongs to. Example: optiputer.net

parameters

[zone=string]

Zone / Domain that the network belongs to. Example: optiputer.net

9.15.32. set os attr

rocks set os attr {os} {attr} {value} [attr=string] [value=string]

Sets an attribute to an os and sets the associated values

arguments

os

Name of os

attr

Name of the attribute

value

Value of the attribute

parameters

[attr=string]

same as attr argument

[value=string]

same as value argument

examples

# rocks set os attr linux sge False

Sets the sge attribution to False for linux nodes

9.15.33. set sec_attr

rocks set sec_attr {attr} [crypted=boolean] [enc=string] [value=string]

Set a secure attribute to the database. The user also has the option of not supplying the value on the command line. The command will prompt the user to enter the secure attribute value, and will not echo this value on screen. If the user chooses to enter the value for the secure attribute by prompt, then the value entered must be in an unencrypted form.

arguments

attr

Name of the attribute

parameters

[crypted=boolean]

Is "value" already crypted or not

[enc=string]

Encryption scheme to use to crypt the value. Currently supported values are "sha", "crypt", "portable".

[value=string]

Value of the attribute. If value is a file, read the value from the file

examples

# rocks set sec_attr db_pw value=DatabasePassword crypted=false enc=sha

Sets a secure attribute called db_pw to the crypted value of "DatabasePassword" using the sha1 encoding schema.

# rocks set sec_attr db_pw value=77e6674e6d71f898d5fc79424117c86731ca7498 crypted=true

Same as above