Even if you validate each of your commands individually before adding them to your script, errors can still occur when you execute the script. If your scripting environment handles XML parsing, consider using the global XML output option ({–outputformat | -o} xml) to address these errors programmatically.
The Oracle FS CLI returns errors under the following conditions: command execution errors, command errors, and fatal errors. The Oracle FS CLI returns XML output for command execution errors only.
The following code sample displays the general format of an XML command execution error message:
<?xml version="1.0"?> <CLIResponse> <ResponseHeader> <ClientData>FSCLI</ClientData> </ResponseHeader> <ErrorList> <ErrorInformation> <ErrorCode>error-code-name</ErrorCode> <ErrorMessage>customer facing error message</ErrorMessage> </ErrorInformation> </ErrorList> <Status>failed</Status> </CLIResponse>
<?xml version="1.0"?> Error: Unrecognizable Command: "bad-command-name"! Issue "fscli help" for command list. Command Failed
network connectivity issues (for example, a communication issue between the Oracle FS CLI client and the Pilot)
communication between the Oracle FS CLI client and the Oracle FS System disconnects abruptly during data transmission, causing corruption in the response received
infrastructure errors (for example, file permission issues)
An unexpected error occurred on the OracleFS System. Command Failed.
An exit code is a one-character code that the Oracle FS System returns when there is an error either in the request sent by your script or in the response sent by the Oracle FS System.
Exit code | Description | Returns an XML response? |
---|---|---|
0 | Command succeeded. | Yes, if specified. |
1 | Unexpected or fatal errors. | No. |
2 | Command errors, for example, incorrect or misspelled options or incorrect Oracle FS System IP addresses or DNS names. | Yes‑For example, if you mistype an option name, the Oracle FS System returns XML. |
  |   | No‑For example, if you fail to connect to the Oracle FS System because of a bad IP address in the command line, the Oracle FS System does not return XML. |
3 | Command execution errors, for example, trying to modify a LUN that does not exist. | Yes. |
For -list type subcommands used with other options, the command fails unless all subcommands and options execute.
Command | Description |
---|---|
-list type commands (for example system -list) |
If you specify the -system command using the -list subcommand with any other options, the command fails unless all subcommands and options execute. You can avoid this situation if, instead of using the command system -list or the command system -list -details, use the system -list -status. |
Some FSCLI requests issue multiple commands on the Pilot. For example, when adding a LUN and mapping the LUN to a host, the first request, creating a LUN, might succeed but the second request, mapping the LUN to a host, might fail. In this example, FSCLI returns a successful exit code zero (0) because the LUN was created but also an <ErrorList> tag (in the XML-formatted output) and a message explaining that the mapping request failed. Therefore, you must check for an <ErrorList> tag even if the overall status is exit code zero (0) to ensure that the entire command succeeded.
In this scenario, you should not retry the command as it will fail, because you are trying to recreate an object that already exists. You can avoid this situation by, instead of creating a LUN with the mapping in one command, first create a LUN, and then if the create a LUN command succeeds, then map the LUN using the LUN modify command.
Command | Description |
---|---|
clone_lun -add | If you include mapping options in your request to create a Clone LUN, FSCLI creates the Clone LUN first and then attempts the mapping. If the creation succeeds, the FSCLI reports successful execution of the command even if the subsequent mapping attempt fails. |
clone_lun -copy | If you include mapping options in your request to create a copy of a Clone LUN, FSCLI creates the copy first and then attempts the mapping. If the creation succeeds, the FSCLI reports successful execution of the command even if the subsequent mapping attempt fails. |
lun -add | If you include mapping options in your request to create a LUN, FSCLI creates the LUN first and then attempts the mapping. If the creation succeeds, the FSCLI reports successful execution of the command even if the subsequent mapping attempt fails. |
lun -copy | If you include mapping options in your request to create a LUN copy, FSCLI creates the copy first and then attempts the mapping. If the creation succeeds, the FSCLI reports successful execution of the command even if the subsequent mapping attempt fails. |
nfs_export -add | If you create an nfs_export using any of the options to set access, permissions or squash values, then FSCLI creates the export first, followed by the creation of an NFS host entry to configure the client access. If the creation attempt succeeds, the FSCLI reports successful execution of the command, even if the subsequent attempt to configure client access fails. |
san_host -add san_host -modify |
If you specify the -associateGroup option with a request to add a SAN host or modify an existing SAN host, FSCLI creates or modifies the SAN host first, followed by the request to associate that SAN host to a group. If the creation or modification succeeds, then the FSCLI reports successful execution of the command, even if the subsequent association fails. |