Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.9.4 Restart OS

Description

This operation component restarts the operating system of servers.

Run OS restart request using the shutdown command.

Options

Basic Options

(1) hostname

Target host name or IP address where the operation component will be executed.

Multiple host names or IP addresses can be specified.

An argument error occurs if the host name or IP address is omitted.

An argument error will occur if a loopback interface host name or IP address, such as 'localhost', '127.0.0.1' or '::1' is specified.

The maximum allowable number of host names or IP addresses is 100. An argument error will occur if this limit is exceeded.

The specification is in CSV format. Refer to "3.17 Notes on Specifying Multiple Input Parameters" for examples of multiple specifications.

Advanced Options

(1) deferringtime

Deferring time (minutes) to begin the OS restart.

Values between 1 and 1,440 (1 day) can be specified for the deferring time.

Because of the specific of the shutdown command, there is a case that cannot defer for 1,440 minutes.

Confirm the specific of the each OS shutdown command for detail.

For example: When begin the OS restart after 10 minutes: 10

If deferring time is omitted, 1 minute is specified.

(2) ostype

OS type of the server that will restart the OS.

Specify Windows, Linux or Solaris. This option is not case sensitive.

If the OS type is omitted, the Configuration Management Database (CMDB) will be searched based on the specified host name or IP address, and Systemwalker Runbook Automation automatically sets the acquired OS type as the value.

Multiple operating system types can be specified. For the specification order, use the same order as for the host names or IP addresses specified for "hostname".

The maximum allowable number of operating system types is 100. An argument error will occur if this limit is exceeded.

The specification is in CSV format. Refer to "3.17 Notes on Specifying Multiple Input Parameters" for examples of multiple specifications.

(3) username

Name of the user connecting with SSH to the host executing the operation component.

If the connected user name and password required for connection are not specified, the Configuration Management Database (CMDB) is searched based on the specified host name or IP address and Systemwalker Runbook Automation automatically sets the acquired connected user name as the value.

Multiple connection user names can be specified. For the specification order, use the same order as for the host names or IP addresses specified for "hostname".

If the operation component connects with the file transfer infrastructure, the connected user name will be fixed at either of

  • If the Business Server is running on Windows: SYSTEM user

  • If the Business Server is running on Linux or Solaris: root

The maximum allowable number of connection user names is 100. An argument error will occur if this limit is exceeded.

The specification is in CSV format. Refer to "3.17 Notes on Specifying Multiple Input Parameters" for examples of multiple specifications.

(4) password

Password of the user connecting with SSH to the host executing the operation component.

If the connected user name and password required for connection are not specified, the Configuration Management Database (CMDB) is searched based on the specified host name or IP address and Systemwalker Runbook Automation automatically sets the acquired connected user password as the value.

Multiple passwords required for connections can be specified. For the specification order, use the same order as for the host names or IP addresses specified for "hostname".

If it connects with File Transfer Infrastructure, the connected user password is invalid.

The maximum allowable number of passwords required for connections is 100. An argument error will occur if this limit is exceeded.

The specification is in CSV format. Refer to "3.17 Notes on Specifying Multiple Input Parameters" for examples of multiple specifications.

(5) execusername

Name of the user executing the shutdown command on the target host where the operation component is to be executed. .

If the "execusername" and "execpassword" are not specified, the Configuration Management Database (CMDB) is searched based on the specified host name or IP address and Systemwalker Runbook Automation automatically sets the acquired administrator user as the value.

If not to register to CMDB, it is executed by name of the user connecting.

If the host specified in "hostname" is running on Windows and it connects with file transfer infrastructure, execute the command as a SYSTEM user. In this case, the connected user name is invalid.

Multiple executing user names can be specified. For the specification order, use the same order as for the host names or IP addresses specified for "hostname".

The maximum allowable number of execution user names is 100. An argument error will occur if this limit is exceeded.

The specification is in CSV format. Refer to "3.17 Notes on Specifying Multiple Input Parameters" for examples of multiple specifications.

(6) execpassword

This operation component does not use the value of execpassword. The value of execpassword will be ignored even if it is specified.

(7) multiplicity

Specify the execution multiplicity for restarting operating systems.

Values between 1 and 100 can be specified.

If a value greater than the number of host names or IP addresses specified for the "hostname" option is used, the operation component runs as though the "hostname" value has been specified for "multiplicity".

If this option is omitted, or a value higher than the range is specified, it will operate with "10" as the default.

(8) operationmode

Specify the component operation mode to be used when multiple host names/IP addresses are specified for the server to be started.

The valid values are:

continue : Execute to the end of the specified host.

abort : Suspend processing in the host where the error was discovered.

If omitted or some other value than the options listed above is specified, "continue" is used by default.

This option is not case sensitive.

If "abort" is specified and a multiplicity of 2 or higher is specified, the component will not be interrupted until the server processing that is executing at the time the error is detected completes.

The specification for this option will be ignored when there is only one host name or IP address for the server for which the operating system is to be restarted.

(9) timeout

This is the completion timeout (seconds) for the execution of operation components.

Values between 300 and 86400 (1 day) can be specified.

For example: When timeout is to occur every 10 minutes: 600

When the execution of the operation components is not completed even if the specified time passes, the processing of the operation components is interrupted in return value 201.

(10) retry

This is the retry count for the execution of operation components.

When the operation components end in return value 161, the retry count is specified. Values between 0 and 5 can be specified.

As a result of retrying, if the operation components ended by the return values other than 161, the execution of the operation components ends even if it doesn't reach the specified retry count. The return values of the operation components become the value executed at the end.

For example: When retries are to be performed twice: 2

If multiple host names or IP addresses have been specified for the server for which the operating system is to be restarted, retries will not be performed.

(11) retry_interval

This is the retry interval (seconds) for operation components.

When the operation components end in return value 161, the retry interval is specified. Values between 1 and 14400 can be specified.

For example: When retrying in 300 seconds: 300


If the specification of the timeout, retry and retry_interval is omitted, and a value beyond the limits of the above-mentioned is input, the value specified with the operation components definition file becomes effective. Refer to "2.5 Definition File for Operation Components" for details.

Return Values

Icon

Name

Return value

Description

Success

0

Running the OS restart request was successful.

Failure

161

Failed to run the OS restart request. Retried if a retry count has been specified. If multiple host names have been specified, retries will not be performed.

180

Multiple operations failed. For the return values for the operations on each host, check the "Return_code" column in Output Data: os_reboot_result

187

Authentication failed when an attempt was made to connect to the Business Server over the network (using SSH).

Alternatively, an error occurred during the processing of communications with the Business Server (file transfer infrastructure). In this case, the error code for the file transfer infrastructure is output to the execution results. Refer to "3.21 Detailed Code of File Transfer Infrastructure" for information on error codes.

188

When the operation component was performing an operation on a Business Server where an RBA Agent has not been installed, an SSH network connection to the Business Server has been disrupted.

189

An attempt to connect to the Business Server over the network (using SSH) failed.

Alternatively, an error occurred during the processing of communications with the Business Server (file transfer infrastructure). In this case, the error code for the file transfer infrastructure is output to the execution results. Refer to "3.21 Detailed Code of File Transfer Infrastructure" for information on error codes.

197

There is an error in the option content, or there is a problem in the registered information in the Configuration Management Database (CMDB).

200

Restart of OS terminated abnormally.

-

-

201

Execution of operation component timed out.

202

The operation component was not executed. There is a problem in the setting to execute operation components.

203

Failed to execute the operation component. There is a problem in the Operation Automation Server environment.

205

The operation component was not executed. There is a problem with the input information specification of the operation component.

206

The operation component was not executed normally. There is a problem with the output information specification of the operation component.

207

The operation components were not executed. There is a possibility that the operation components are not registered in the Management Server.

208

The Automated Operation Process has been canceled because the Automated Operation Process was recovered while the operation component was executing.

Output information

Variable

Description

message

  • If only one host name or IP address has been specified for "hostname":

    This variable will be set to the following message if the operating system restart request is successful.

    The operation component was successful.

    If the operating system restart request fails, the content of the error will be set as a string.

  • If multiple host names or IP addresses have been specified for "hostname":

    This variable will be set to the following message if all of the operating system restart requests are successful.

    The operation component was successful.

    If some or all of the operating system restart requests fail, information for the operating system restart requests that failed will be output using the same format as the "os_reboot_result" variable.

os_reboot_result

This variable is set to the result of executing the restart request on the specified server.

os_reboot_list

This variable is set to a list of servers for which the restart request was successful. This specification is in the CSV format.

os_reboot_fault_list

This variable is set to a list of servers for which the restart request was unsuccessful. This specification is in the CSV format.

returnCode

This variable is set to the return value.

The output format for the "os_reboot_result" variable is as follows:

[hostname],[return value],[output data],[message]


For [output data], nothing will be output.

For [message], one of the following will be output:

<Example>

If "host1,host2,host3" has been specified for the "hostname" option, and a request to restart the operating system for host3 has failed

"hostname",Return_code,"Output","Message"
"host1",0,"","Success"
"host2",0,"","Success"
"host3",161,"","-bash: shutdown: command not found"


In the example above, the following will be output to the "message" variable.

<Example>

"hostname",Return_code,"Output","Message"
"host3",161,"","-bash: shutdown: command not found"

Notes