Updated on 2025-08-09 GMT+08:00

MRS Bootstrap Action Overview

You can run bootstrap actions to install additional third-party software, modify the cluster running environment, and perform other customizations.

Bootstrap actions can execute scripts on specified nodes before or after the first startup of cluster components. You can only manually run the third-party component installation script on the node to install a running cluster component.

If you choose to run bootstrap actions when scaling out a cluster, the bootstrap actions will be run on the newly added nodes in the same way.

If you use auto scaling, MRS allows you to customize automation scripts for auto scaling. Automation scripts can be executed before and after auto scaling and automatically adapt to service workload changes, freeing you from manual operations. In addition, automation scripts, which are fully customizable and can be scheduled for execution at specific times, can significantly enhance auto scaling flexibility and cater to individual needs.

  • MRS 2.x and earlier versions: Bootstrap action scripts must be executed as user root. Improper use of the scripts may affect cluster availability. Exercise caution when using the scripts. You can run the su - xxx command to switch users in the script.
  • MRS 3.x or later: Bootstrap action scripts must be executed as user omm. Improper use of the scripts may affect cluster availability. Exercise caution when using the scripts. You can run the su - xxx command to switch users in the script.

MRS determines the result based on the return code after the execution of the bootstrap action script. If the return code is 0, the script is executed. If the return code is not 0, the execution fails. If a bootstrap action script fails to be executed on a node, the corresponding boot script will fail to be executed. In this case, you can set Action upon Failure to choose whether to continue to execute the subsequent scripts.

  • Example 1: If you set Action upon Failure to Continue for all scripts during cluster creation, all the scripts will be executed regardless of whether they are successfully executed, and the startup process will be complete.
  • Example 2: If a script fails to be executed and Action upon Failure is set to Stop, subsequent scripts will not be executed and cluster creation or scale-out will fail.

You can add a maximum of 18 bootstrap actions, which will be executed before or after the cluster component is started in the order you specified. The bootstrap actions performed before or after the component startup must be completed within 60 minutes. Otherwise, the cluster creation or scale-out will fail.

For more information about bootstrap actions, see Node Bootstrap Actions.