Introduction to Bootstrap Actions
Bootstrap actions indicate that you can run your scripts on a specified cluster node before or after starting big data components. You can run bootstrap actions to install additional third-party software, modify the cluster running environment, and perform other customizations.
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 auto scaling is enabled in a cluster, you can add an automation script in addition to configuring a resource plan. Then the automation script executes the corresponding script on the nodes that are scaled out or in to implement custom operations.
For versions earlier than MRS 3.x, your scripts are executed as user root. You can run the su - XXX command in a script to switch to another user.
For MRS 3.x or later, your scripts are executed as user omm. You can run the su - XXX command in a script to switch to another user.
Versions earlier than MRS 3.x: Bootstrap action scripts must be executed as user root. Otherwise, your cluster may become unavailable.
MRS 3.x or later: Bootstrap action scripts must be executed as user omm. Otherwise, your cluster may become unavailable.
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 successfully. 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot