Using dcli to Execute Commands Across a Cluster

Use the dcli utility to execute commands across a group of nodes on a Big Data Service cluster and return the output. You can use dcli to reinstall or reconfigure software on your cluster.

dcli Syntax

dcli [option] [command]

dcli Return Values

  • 0: The command ran successfully on all nodes.

  • 1: One or more nodes were inaccessible or remote execution returned a nonzero value. A message lists the unresponsive nodes. Execution continues on the other nodes.

  • 2: A local error prevented the command from executing.

If you interrupt the local dcli process, then the remote commands may continue without returning their output or status.

dcli Example

Following is an example of the dcli utility.

This example returns the default list of target nodes:

# dcli -t
Target nodes: ['bda1node01-adm.example.com', 'bda1node02-adm.example.com', 'bda1node03-adm.example.com', 'bda1node04-adm.example.com', 'bda1node05-adm.example.com', 'bda1node06-adm.example.com', 'bda1node07-adm.example.com', 'bda1node08-adm.example.com', 'bda1node09-adm.example.com']