This is the manual for clusterctl v0.1.0. The latest release is v0.4.0: read its manual.
clusterctl exec

clusterctl exec

clusterctl exec

Run one command on many nodes at once

Synopsis

Run a command on every node of a set, in parallel.

The argument vector is quoted once and reassembled by the remote shell, so it arrives exactly as it was typed. A timeout is enforced on the node with timeout(1), because killing the local ssh would leave the remote process running.

clusterctl exec -n @idle – uptime clusterctl exec -n exe[1-10] –dedup – uname -r clusterctl exec -n exe[1-4] –script ‘systemctl is-active slurmd || journalctl -u slurmd -n 5’

With –dedup the nodes that answered the same thing are collapsed into one block, which turns a thousand replies into the few worth reading.

clusterctl exec [-n NODESET] -- COMMAND... [flags]

Options

      --confirm            ask before running, as the destructive commands do
  -b, --dedup              collapse nodes that answered the same thing
  -h, --help               help for exec
  -r, --root               run as root
      --script string      shell program to run instead of a command
      --stdin              read standard input once and send it to every node
      --timeout duration   how long the command may run on a node (default: from the configuration)
  -u, --user string        remote account to run as

Options inherited from parent commands

      --config strings    configuration file or directory to read, repeatable (default: CLUSTERCTL_CONFIG or the search path)
      --context string    context to act on (default: the current one)
      --dry-run           report what would be done and change nothing
      --fanout int        how many hosts to work on at once (default: from the configuration)
      --force             allow protected hosts to be touched
  -n, --nodes string      node set to act on, for example 'exe[1-10],@idle'
  -o, --output string     output format: table, wide, json, yaml, nodeset, name, jsonpath=, jq= (default "table")
      --set stringArray   override one configuration value as PATH=VALUE, repeatable
  -y, --yes               answer the confirmation prompts with yes

SEE ALSO

  • clusterctl - Administer HPC clusters from one binary