scalectl operations command

You can cancel, delete, and get details of long-running operations (LRO).

Synopsis

scalectl operations cancel {operation id}
Or
scalectl operations delete {operation id}  
       
Or
scalectl operations get {operation id} [--all-domains] 
       
Or
scalectl operations list [--all-domains] [-n {MaxItemNumber}] [-x] [-p {PageSize}] [-t {PageToken}]    
       
Or
scalectl operations output {operation id} [--all-domains] [-b {ByteOffset}]   
       

Availability

Available on all IBM Storage Scale editions.

Description

Use the scalectl operations command to cancel, delete, and get details of LRO.

Parameters

cancel {operation_id}
Cancels an LRO. All operations attempt to stop the operation. However, if an operation is too far along in its execution, termination might not be possible. To run this command, you must have the RBAC permission for the post action on the /scalemgmt/v3/operations resource.
delete {operation_id}
Deletes an LRO. Only operations in the DONE state are deleted. You can use this command to delete the operation results that are no longer needed. To run this command, you must have the RBAC permission for the delete action on the /scalemgmt/v3/operations resource.
get {operation_id}
Retrieves details of an existing LRO. To run this command, you must have the RBAC permission for the get action on the /scalemgmt/v3/operations resource.
--all-domains
Runs the list request against all possible domains to which the user might have access.
list
Retrieves information of all LROs. The number of operations varies based on cluster administration activity and the age of completed jobs. Jobs older than a predetermined age are automatically removed, along with their metadata and related artifacts. Also, when the number of operations reaches a predefined limit, the oldest completed jobs (DONE state) are removed.

To control the number of operations displayed, specify a page size. The number of displayed operations won’t exceed the specified value. To retrieve the next page of operations, submit a page token with the next list request. The request returns the next set of operations, up to the specified page size. To run this command, you must have the RBAC permission for the list action on the /scalemgmt/v3/operations resource.

--all-domains
Specifies to run the list request against all possible domains to which the user might have access.
-n or --max-items {MaxItemNumber}
Specifies the maximum number of items to list at a time.
-x or --no-pagination
Disables pagination tokens on the client side.
-p or --page-size {PageSize}
Specifies the number of items to list per API request.
-t or --page-token {PageToken}
Specifies the page token that is received from previous file system list command. You can provide this page token to retrieve the next page.
output {operation_id}
Displays message output from an LRO. To run this command, you must have the RBAC permission for the get action on the /scalemgmt/v3/operations resource.
--all-domains
Runs the list request against all possible domains to which the user might have access.
-b or --byte-offset {ByteOffset}
Specifies the offset in bytes to start reading the console output.

Global flags

Use the following global flags with any scalectl command and subcommand:
--bearer
If true, reads the OIDC_TOKEN from the environment and sends it as the authorization bearer header for the request. Use this flag with the --url option.
--user-cert {Certificate}
Specifies the path to the client certificate file for authentication.
--user-cacert {CA_Certificate}
Specifies the path to the certificate authority (CA) trust chain to validate a server certificate.
--debug {Filepath[="stderr"]}
Enables the debug logging for the current request. Accepts an absolute file path to store logs by using --debug=<file>. If no file path is specified, logs are sent to stderr.
-h or --help
Lists the help for scalectl commands.
--domain {DomainName}
Sets the domain for the request. The default value is StorageScaleDomain.
--insecure-skip-tls-verify
If true, skips to verify the server certificate for validity. This option makes HTTPS connections insecure.
--json
Displays output in JSON format.
Note: When you use the --json flag with an endpoint method that is a long-running operation (LRO), the LRO is submitted to the LRO manager, which handles its lifecycle. The lifecycle includes accepting, running, and monitoring operations. Although the command request returns quickly, you must ensure that the submitted operation reaches a Done state. Review any metadata that is associated with the request to ensure that it completed successfully. This step is especially important for endpoint methods that have follow-on methods. These follow-on methods are valid only if the initial method completed successfully. For more information about LRO, see Long-running operations.
--user-key {PrivateKeyFile}
Specifies the path to the client certificate private key file for authentication.
--url {ip_address}
Sends the request over HTTPS to the specified endpoint <FQDN/IP>:<port>. For IPv6 address, use square brackets. For example, [IPv6]:<port>. If no port specified, 46443 is used by default.
--version
Specifies the scalectl build information. The --version flag is valid only with the top-level scalectl command.

Exit status

0
Successful completion.
nonzero
A failure occurred.

Security

You must have the specific role-based access control (RBAC) permission to run the command. For more information, see Role-based access control.

Examples

  1. To list all LROs, issue the following command:
    scalectl operations list
    A sample output is as follows:
    Job Id                                               | Operation                    | Status | Request Time         | Last Update Time     | Completion Time
    ================================================================================================================================================================
    MToxMDFhNjRiNy0zMDExLTRjYjktODcwNS02ZDUzYmVmMDE0MjA= | BatchCreateNSDsRequest       | Done   | 2024-10-24T21:23:57Z | 2024-10-24T21:24:00Z | 2024-10-24T21:24:00Z
    MTpiOWIzZjdhYS05MDJiLTQ5NWUtOWIxMC1iNGUzZjIzMTNiMTI= | BatchDeleteNSDsRequest       | Done   | 2024-10-24T21:27:16Z | 2024-10-24T21:27:19Z | 2024-10-24T21:27:19Z  
  2. To get details of an existing LRO, issue the following command:
    scalectl operations get MToxMDFhNjRiNy0zMDExLTRjYjktODcwNS02ZDUzYmVmMDE0MjA=
    A sample output is as follows:
    Job Id            MToxMDFhNjRiNy0zMDExLTRjYjktODcwNS02ZDUzYmVmMDE0MjA=
    Operation         BatchCreateNSDsRequest
    Status            Done
    Request Time      2024-10-24T21:23:57Z
    Last Update Time  2024-10-24T21:24:00Z
    Completion Time   2024-10-24T21:24:00Z
    
    NSD Name | Status
    =====================
    nsd_2    | created
    nsd_3    | created
    nsd_4    | created
    nsd_5    | created
    nsd_6    | created
    nsd_7    | created
    nsd_8    | created
  3. To view display message of an output, issue the following command:
    scalectl operations output MToxNjMyMDZmZS04NjJhLTRhM2QtYWJiOC0wMDI3MTJlZDViY2E=
    A sample output is as follows:
    Disks up to size 42.74 GB can be added to storage pool system.
    	Creating Inode File
    	  46 % complete on Thu Oct 24 23:58:25 2024
    	 100 % complete on Thu Oct 24 23:58:26 2024
    	Creating Allocation Maps
    	Creating Log Files
    	   3 % complete on Thu Oct 24 23:58:31 2024
    	   6 % complete on Thu Oct 24 23:58:39 2024
    	  43 % complete on Thu Oct 24 23:58:44 2024
    	 100 % complete on Thu Oct 24 23:58:46 2024
    	Clearing Inode Allocation Map
    	Clearing Block Allocation Map
    	Formatting Allocation Map for storage pool system                      
  4. To cancel an LRO, issue the following command:
    scalectl operations cancel MTphNzFlOThhMy1hZWU2LTRkZTktOGVhYy1jMDk4YTRhOTNmM2E=
    A sample output is as follows:
    Cancel request successfully submitted                      
  5. To delete an LRO, issue the following command:
    scalectl operations delete MTphZTMyMjI2Mi1hZGY5LTRmZTItOTZlZC0wNTg1NWQ0ODRmNjA=
    A sample output is as follows:
    Operation successfully deleted  

See also

Location

/usr/lpp/mmfs/bin