rack_tool - tool for doing operations related to one or more IPU-Machines in a rack


rack_tool.py [–version] [–help] <command> [<args>] [–ipum name bmc ip gw ip bmc username bmc password gw username gw password] [–config-file config file] [–global-credentials bmc username bmc password gw username gw password] [–log-dir log directory]
rack_tool.py upgrade [–help] [–golden] [–gw-root-overlay path to overlay]
rack_tool.py bist [–help]
rack_tool.py vipu-test [–help] [–vipu-path path to vipu binaries]
rack_tool.py status [–help] [–no-color]
rack_tool.py hostname [–help]
rack_tool.py install-key [–help]
rack_tool.py update-root-overlay [–help] [–overlay overlay directory]
rack_tool.py run-command [–help] -c command -d device
rack_tool.py bmc-factory-reset [–help]
rack_tool.py power-off [–help] [–hard]
rack_tool.py power-on [–help]
rack_tool.py power-cycle [–help]
rack_tool.py logging-server [–help] -a address -p port -d device rack_tool.py encrypt-login-data [–help]
rack_tool.py generate-password [–help] –encrypt -d device


rack_tool is a tool to make it easy to do operations related to all IPU-Machines in a rack.


The options –ipum, –global-credentials and –config-file must go after the command parameters.

-v, –version

Print the version of the tool

-h, –help

Prints the synopsis and a list of all available commands. –help can also be given after a command to show individual help for each command.

–ipum name bmc ip gw ip bmc username bmc password gw username gw password
Option to manually define which IPU-Machines to perform operations on, instead of using a config file. Several IPU-Machines can be selected by passing the –ipum option multiple times.
rack_tool.py upgrade --ipum machine1 root password itadmin password
–global-credentials bmc username bmc password gw username gw password
Option to set a common set of login details for the IPU-Machines selected with –ipum option. If this option is used, the password and username parameters for the –ipum option can be omitted.
rack_tool.py upgrade --ipum machine1 --ipum machine2 --global-credentials root password itadmin password
–config-file config file
Config file with information about IPU-Machines to connect to. The config file will be ignored if the ‘–ipum’ parameter is given.
rack_tool.py upgrade --config-file /home/ipuuser/my_config_file.json
–log-dir log directory
Custom directory to write log files to.
rack_tool.py upgrade --log-dir /home/ipuuser/logs



Start upgrade of IPU-Machines.


Run built-in self test that checks that most components on the board are available and functional.


Run Virtual-IPU tests.


Show status of IPU-Machines in a rack.


Set hostname on GW and BMC.


Install the current user’s public SSH key to all IPU-Machines.


Copy all files in GW root overlay directory to all IPU-Machines


Run a command on a device (“bmc” or “gw”) on all IPU-Machines.


Do factory reset on the BMC on all IPU-Machines.


Power off GW and IPUs on all IPU-Machines


Power on GW and IPUs on all IPU-Machines


Power cycle GW and IPUs on all IPU-Machines


Set logging server on a device (“bmc” or “gw”) on all IPU-Machines


Encrypt login data in the rack_config.json file


Generate new and change passwords for BMC and/or GW on IPU-Machines and save the encrypted passwords to the rack_config.json file

Exit status

0 Successful program execution.
1 Unsuccessful program execution.

GW root overlay

This is a directory that contains all the files that should be copied to the GW after an upgrade. This makes it possible to create site-specific files that should be persistent on the GW after upgrade. The contents of this directory are copied over to the GW automatically if the location of this directory is given either as an object in the rack config file or as input parameter. The structure of the directory should be the same as the root directory on the GW.
An example of files that can be useful to have in the GW root overlay is files that relate to the outside world, such as NTP and syslog configuration files.

rack_config.json file format

rack_config.json is a JSON file that rack_tool uses to connect to all the IPU-Machines in a rack. It consists of one mandatory object “machines” and two optional objects “global_credentials” and “gw_root_overlay”. rack_tool will look for a config file in three different places with the following priority:
1. The file passed with the –config-file parameter.
2. A file named rack_config.json in the current working directory.
3. A rack_config.json file in the ~/.rack_tool/ directory

This is an object that holds the login details of the BMC and GW. the object has the following key/value pairs:

"global_credentials": {
    "bmc_username": "<username>",
    "bmc_passwd": "<password>",
    "gw_username": "<username>",
    "gw_passwd": "<password>"

This object is a key/value pair that points to the location of the GW root overlay.

"gw_root_overlay": "/home/ipuuser/.rack_tool/root-overlay",
This object is a key/value pair that points to the directory where logs should be stored. If this object is not present in the config file, rack_tool will place logs in the first of the following directories that it has write permission to:
  1. rack_tool_location/logs

  2. /var/log/rack_tool

  3. current_working_directory/rack_tool_logs

"log_directory": "/home/ipuuser/rack_tool_logs"

This is an array of machine objects that holds information about each IPU-Machine in the rack. Each machine object consists of the following key/value pairs:

"machines": [
        "name": "<machine name>",
        "sn": "<serial number>",
        "mac_bmc": "<mac address>",
        "mac_gw": "<mac address>",
        "bmc_ip": "<ip address>",
        "gw_ip": "<ip address>",
        "rnic_ip": "<ip address>"



This directory is the default location for configuration files.


This is the rack configuration file for the rack.


This is the default directory for GW root overlay files