9.13. run

9.13.1. run host

rocks run host [host...] {command} [collate=string] [command=string] [delay=string] [managed=boolean] [num-threads=string] [stats=string] [timeout=string] [x11=boolean]

Run a command for each specified host.

arguments

[host]

Zero, one or more host names. If no host names are supplied, the command is run on all 'managed' hosts. By default, all compute nodes are 'managed' nodes. To determine if a host is managed, execute: 'rocks list host attr hostname | grep managed'. If you see output like: 'compute-0-0: managed true', then the host is managed.

command

The command to run on the list of hosts.

parameters

[collate=string]

Prepend the hostname to every output line if this parameter is set to 'yes'. Default is 'no'.

[command=string]

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

[delay=string]

Sets the time (in seconds) to delay between each executed command on multiple hosts. For example, if the command is run on two hosts and if the delay is 10, then the command will be executed on host 1, then 10 seconds later, the command will be executed on host 2. Default is '0' (no delay).

[managed=boolean]

Run the command only on 'managed' hosts, that is, hosts that generally have an ssh login. Default is 'yes'.

[num-threads=string]

The number of threads to start in parallel. If num-threads is 0, then try to run the command in parallel on all hosts. Default is '128'.

[stats=string]

Display performance statistics if this parameter is set to 'yes'. Default is 'no'.

[timeout=string]

Sets the maximum length of time (in seconds) that the command is allowed to run. Default is '30'.

[x11=boolean]

If 'no', disable X11 forwarding when connecting to hosts. Default is 'yes'.

examples

$ rocks run host compute-0-0 command="hostname"

Run the command 'hostname' on compute-0-0.

$ rocks run host compute "ls /tmp"

Run the command 'ls /tmp/' on all compute nodes.

9.13.2. run host sec_attr

rocks run host sec_attr {file}

This command reads a filename that contains pickled information about secure attributes that are relevant to the host. This command is not intended to be run by an administrator.

arguments

file

Filename of the pickled file

9.13.3. run reconfigure

rocks run reconfigure [roll...] [clear=boolean] [showattr=boolean]

Generates a script which can be used to reconfigure a system after some attributes have been changed.

arguments

[roll]

Not implemented. This argument is not implemented

parameters

[clear=boolean]

If clear is true the command will remove all the _old attributes from the database. This command should be run at the beginning of a reconfigure session. Default is 'no'.

[showattr=boolean]

When true it prints the attributes that will be changed when running reconfigure. For example if the user changes the Kickstart_PublicAddress attribute reconfigure will update the Kickstart_PublicBroadcast and Kickstart_PublicNetwork attributes accordingly. This flag can be used to verify what reconfigure will change. Reconfigure will change only the attributes named Kickstart_Private*/Kickstart_Public* Default is 'no'.

examples

# rocks run reconfigure

Generate a script to reconfigure the current system

9.13.4. run roll

rocks run roll [roll...] [dryrun=string] [host=string]

It generates the code necessary to install a Roll on the fly

arguments

[roll]

List of rolls. This should be the roll base name (e.g., base, hpc, kernel).

parameters

[dryrun=string]

It runs the command on the current node. It doesn't work with host flag Default: true

[host=string]

The name of the host that you want to generate the code to install the Roll. It is always better to reinstall the node instead of using this method.

examples

# rocks run roll viz

It generates the bash code necessary to install the Viz Roll onto the current system.

# rocks run roll viz host=compute-0-0

It generates the bash code necessary to install the Viz Roll on compute-0-0.