9 Cluster Management Commands

You can use the Cluster Management commands to create a cluster, to manage a node in the cluster and to monitor the status of the node in the cluster.

9.1 okv cluster node create Command

The okv cluster node create command creates the first node of the cluster.

Purpose

okv cluster node create the first node under cluster. following information is required:

  • cluster name
  • cluster node name
  • subgroup name in a cluster

Syntax

okv cluster node create --generate-json-input

JSON Input File Template

{
  "service" : {
   "category" : "cluster,
   "resource" : "node",
   "action" : "create",
   "options" : {
     "nodeName" : "#VALUE",
      "clusterName" : "#VALUE",
      "clusterSubgroup" : "#VALUE"
     } 
   }
}

Parameters

Parameter/Template Parameter Required? Description
--cluster-name Required

Name of the cluster.

--cluster-subgroup

Required

Name of the cluster subgroup.

--node-name Required Name of the cluster node.

CLI Command

okv cluster node create --options <argument>

Usage Notes

Once you submit the add or create command to view the status, perform the following steps:
  1. You can get requestID. Using this requestID, you can check the request status, using the command:
    okv cluster node status --pairing-request-id
  2. Following this, you can check the node current status using the command:
    okv cluster node status

JSON Examples

  1. Generate JSON input for the okv cluster node create command.
    okv cluster node create

    The generated input appears as follows:

    {
      "service" : {
       "category" : "cluster,
       "resource" : "node",
       "action" : "create",
       "options" : {
         "nodeName" : "node1",
          "clusterName" : "NorthAmerica",
          "clusterSubgroup" : "NewYork"
         }
       }
    }
  2. Save the generated input to a file, for example, node-create.json.
    Output similar to the following appears:
     { "result" : "Success"
     }

9.2 okv cluster node status Command

The okv cluster node status command provides the information for the cluster node pairing process or the status of a cluster node.

Required Authorization

System Administrator role

Syntax

okv cluster node status

JSON Input File Template

{   
  "service" : {
   "category" : "cluster,
   "resource" : "node",
   "action" : "status",
   "options" : {
     "node-name" : "#VALUE",
     "pairingRequestId" : "#VALUE",
     "pairingSteps" : "#TRUE|FALSE",
     "candidateNodeIpAddress" : "#VALUE",
     "candidateNodeUser : "#VALUE",
     "candidateNodePassword : "#VALUE"
    }    
  }
}

Parameters

Parameter/Template Parameter Required Description
--candidate-node-ip-address

Optional

IP address of the candidate node.

--candidate-node-password

Optional

Password of the user from the candidate node.

--candidate-node-user

Optional

Name of a user from the candidate node.

--node-name

Optional

Name of the cluster node.

--pairing-request-id

Optional

Request ID for a long running command.

--pairing-steps

Optional

Display detailed pairing steps - TRUE or FALSE.

CLI Command

1. okv cluster node status
2. okv cluster node status --node-name
3. okv cluster uster node status --pairing-request-id
4. okv cluster node status --pairing-steps
5. okv cluster node status --pairing-steps --candidate-node-ip-address --candidate-node-user --candidate-node-password 

Note:

You need to follow the multiple mode in the provided sequence:
  1. We can use okv cluster node status command for candidate node or controller node that belongs to manage cluster commands. It will check the status of controller node.
  2. We can use okv cluster node status --pairing-request-id for commands that returns requestId. It will check the status of the given node.
  3. We can use okv cluster node status --pairing-steps to check pairing step in controller node for an "add" command. It will check the status of the job by a request ID. The request ID is available from "create", "add", and "abort-paring) command. It will check the status of pairing steps in controller node.
  4. We can use okv cluster node status --pairing-steps --candidate-node-ip-address --candidate-node-user --candidate-node-password to check pairing steps in candidate node for an "add" command. It will check the status of pairing steps in controller node.

Usage Notes

Once you submit the add or create command to view the status, perform the following steps:
  1. You can get requestID. Using this requestID, you can check the request status, using the command:
    okv cluster node status --pairing-request-id
  2. Following this, you can check the node current status using the command:
    okv cluster node status

JSON Examples

  1. Generate JSON input for the okv cluster node status command.
    okv cluster node status --generate-json-input

    The generated input appears as follows:

    {   
      "service" : {
       "category" : "cluster,
       "resource" : "node",
       "action" : "status",
       "options" : {
         "node-name" : "#VALUE",
         "pairingRequestId" : "#VALUE",
         "pairingSteps" : "#TRUE|FALSE",
         "candidateNodeIpAddress" : "#VALUE",
         "candidateNodeUser : "#VALUE",
         "candidateNodePassword : "#VALUE"
        }    
      }
    }
  2. Save the generated input to a file, for example, node_status.json.
  3. Run the okv cluster node status command using the generated JSON file. For example:

    Output similar to the following appears:

    okv cluster node status:
    
    {
      "result" : "Success",
      "value" : {
       "status" : "CONFIGURED"
    }
    
    okv cluster node status --node-name node1
    
    {
      "result" : "Success",
      "value" : {
       "status" : "ENABLING"
       }
      } 
    okv cluster node status --pairing-request-id 18374: 
     {
       "result" : "Failure",
       "message" : "Server is already a node or is already configured as node."
      }
     {
       "result" : "Success" 
     }
    okv cluster node status  --pairing-steps TRUE
     {
      "result" : "Success",
      "value" : {
        "stages" : [ {
          "step1" : "Open transport channel with the candidate node",
          "status" : "COMPLETED"
                 }, {
          "step2" : "Verify the candidate node details",
          "status" : "COMPLETED"
        }, {
          "step3" : "Enable data replication to the candidate node",
          "status" : "COMPLETED"
        }, {
          "step4" : "Generate the controller node details",
          "status" : "COMPLETED"
        }, {
          "step5" : "Generate backup of the controller node for cloning",
          "status" : "COMPLETED"
        }, {
          "step6" : "Send clone bundle to the candidate node",
          "status" : "COMPLETED"
        }, {
          "step8" : "Enable data replication to other cluster nodes",
          "status" : ""
        }, {
          "step9" : "The candidate node successfully joins the cluster",
          "status" : ""
        } ]
      }
    }
    okv cluster node status --pairing-steps TRUE --candidate-node-ip-address100.70.126.53 --candidate-node-user okvadmin --candidate-node-password Welcome_1  
    {
      "result" : "Success",
      "value" : {
        "stages" : [ {
          "step1" : "Generate the candidate node details",
          "status" : "COMPLETED"
        }, {
          "step2" : "Open transport channel with the controller node",
          "status" : "COMPLETED"
        }, {
          "step3" : "Send node details to the controller node",
          "status" : "COMPLETED"
        }, {
          "step4" : "Receive clone bundle from the controller node",
          "status" : "COMPLETED"
        }, {
          "step5" : "Restore backup on the candidate node",
          "status" : "COMPLETED"
        }, {
          "step6" : "Update credentials of the candidate node",
          "status" : "COMPLETED"
        }, {
          "step7" : "Tune the database on the candidate node",
          "status" : "COMPLETED"
        }, {
          "step8" : "Setup network configuration on the candidate node",
          "status" : "COMPLETED"
        }
      }
    }

9.3 okv cluster node add Command

The okv cluster node add command adds a node to the cluster.

Syntax

okv cluster node add

JSON Input File Template

{
 "service" : {
  "category" : "cluster,
  "resource" : "node",
  "action" : "add",
  "options" : {
    "recoveryPassphrase" : "#VALUE",
    "candidateNodeIpAddress" : "#VALUE",
    "mode" : "#VALUE",
    "nodeId" : "#VALUE",
    "nodeName" : "#VALUE",
    "clusterSubgroup" : "#VALUE",
    "hsmCredential : "#VALUE",
    "candidateNodeUser : "#VALUE",
    "candidateNodePassword : "#VALUE"
     }
   }
 }

Parameters

Parameter/Template Parameter Required? Description
--candidate-node-ip-address

Required

IP address of the candidate node.

--candidate-node-password

Required

Password of the user from the candidate node.

Note:

The user is not required to provide the password in command line or JSON. The user will be prompted for password during runtime.
--candidate-node-user

Required

Name of a user from the candidate node.
--cluster-subgroup

Required

Name of the cluster subgroup.
--mode

Required

Pairing mode - READ-ONLY or READ-WRITE.

--node-id

Required

ID of the cluster node. The id can be between 1 to 16 and the ID should be unique and not the duplicated ID with other node.

--node-name

Required

Name of the cluster node.

--recovery-passphrase

Required

Recovery pass phrase of the cluster.

Note:

The user is not required to provide the password in command line or JSON. The user will be prompted for password during runtime.
--hsm-credential

Optional

HSM credential.

CLI Command

okv cluster node add --options <argument>

JSON Example

  1. Generate JSON input for the okv cluster node add command.
    okv cluster node add --generate-json-input

    The generated input appears as follows:

    {
     "service" : {
      "category" : "cluster,
      "resource" : "node",
      "action" : "add",
      "options" : {
        "recoveryPassphrase" : "#VALUE",
        "candidateNodeIpAddress" : "#VALUE",
        "mode" : "#VALUE",
        "nodeId" : "#VALUE",
        "nodeName" : "#VALUE",
        "clusterSubgroup" : "#VALUE",
        "hsmCredential : "#VALUE",
        "candidateNodeUser : "#VALUE",
        "candidateNodePassword : "#VALUE"
        }
      }
    }
  2. Save the generated input to a file, for example, node-add.json.
  3. Run the okv cluster node add command using the generated JSON file. For example:
    okv cluster node add--from-json-node-add.json
    Output similar to the following appears:
    {
      "result" : "Success",
       "value" : {
        "requestId" : "78219"
        }
     }

Note:

See, section okv cluster node status Command for requestId output.

9.4 okv cluster node abort-pairing

The okv cluster node abort-pairing command aborts the node pairing process in the cluster.

Required Authorization

System Administrator role

Syntax

okv cluster node abort-pairing --generate-json-input

JSON Input File Template

Parameters

{
 "service" : {
  "category" : "cluster,
  "resource" : "node",
  "action" : "abort-pairing",
  "options" : {
    "candidateNodeIpAddress" : "#VALUE",
    "candidateNodeUser : "#VALUE",
    "candidateNodePassword : "#VALUE"
    }     
  }
}
Parameter/Template Parameter Required Description
--candidate-node-ip-address

Optional

IP address of the candidate node.

--candidate-node-password

Optional

Password of the user from the candidate node. If --candidate-node-password is not provided, the process wait for the input.

--candidate-node-user

Optional

Name of a user from the candidate node.

Note:

If you do not provide information in the --candidate-node-ip-address, the command gets aborted in the controller node. If you want to abort the --candidate-node-ip-address, you have to provide information for all three parameters.

CLI Command

okv cluster node abort-pairing --options <argument>

Usage Notes

Once you submit the add or create command to view the status, perform the following steps:
  1. You can get requestID. Using this requestID, you can check the request status, using the command:
    okv cluster node status --pairing-request-id
  2. Following this, you can check the node current status using the command:
    okv cluster node status

JSON Examples

  1. Generate JSON input for the okv cluster node abort-pairing command.
    okv cluster node abort-pairing.
    The generated input is as follows:
    {
     "service" : {
      "category" : "cluster,
      "resource" : "node",
      "action" : "abort-pairing",
      "options" : {
        "candidateNodeIpAddress" : "#VALUE",
        "candidateNodeUser : "#VALUE",
        "candidateNodePassword : "#VALUE"
        }     
      }
    }
  2. Save the generated input to a file, for example, abort_pairing.json.
  3. Run the okv cluster node delete command using the generated JSON file. For example:
    okv cluster node abort-pairing --from-json abort_pairing.json
    Output similar to the following appears:
    { 
     "result" : "Success",  
     "value" : {   
      "requestId" : "78223"  
      }
    }

Note:

See, section okv cluster node status Command for requestId output.

9.5 okv cluster node delete Command

The okv cluster node delete command deletes a cluster node.

Required Authorization

System Administrator role

okv cluster node delete command displays the following:
  • The command result, whether it is Success or failure.

Syntax

okv cluster node delete

JSON Input File Template

Parameters

{
 "service" : {
  "category" : "cluster,
  "resource" : "node",
  "action" : "delete",
  "options" : {
   "nodeName" : "#VALUE",
   "force" : "#TRUE|FALSE",
   "originNodeName" : "#VALUE"
   }
  }
 }
Parameter Required Description
--node-name

Required

Name of the cluster node.

--origin-node-name

Required

Name of an origin node to initiate deletion of a node.
--force

Optional

Use force option to delete a node - TRUE or FALSE.

CLI Command

okv cluster node delete --options <argument>

JSON Examples

  1. Generate JSON input for the okv cluster node delete command.
    okv cluster node delete --generate-json-input

    The generated input appears as follows:

    {
     "service" : {
      "category" : "cluster,
      "resource" : "node",
      "action" : "delete",
      "options" : {
       "nodeName" : "#VALUE",
       "force" : "#TRUE|FALSE",
       "originNodeName" : "#VALUE"
       }
      }
     }
  2. Save the generated input to a file, for example, node_delete.json.
  3. Run the okv cluster node delete command using the generated JSON file. For example:
    okv cluster node delete --from-json node_delete.json

    Output similar to the following appears:

    {
     "result" : "Success"
    }

Note:

See, section okv cluster node status Command for requestId output.

9.6 okv cluster node enable Command

The okv cluster node enable command enables a cluster node.

Required Authorization

System Administrator role

okv cluster node enable command displays the following:
  • The command result, whether it is Success or failure.

Syntax

okv cluster node enable

JSON Input File Template

{
 "service" : {
  "category" : "cluster,
  "resource" : "node",
  "action" : "enable",
  "options" : {
   "nodeName" : "#VALUE"
   }
  }
}

Parameters

Parameter Required Description
--node-name

Required

Name of the cluster node.

JSON Example

  1. Generate JSON input for the okv cluster node enable command.
    okv cluster node enable --generate-json-input

    The generated input appears as follows:

    {
     "service" : {
      "category" : "cluster,
      "resource" : "node",
      "action" : "enable",
      "options" : {
       "nodeName" : "#VALUE"
       }
      }
    }
  2. Save the generated input to a file, for example, node_enable.json.
  3. Run the okv cluster node enable command using the generated JSON file. For example:
    okv cluster node enable --from-json node_enable.json

    Output similar to the following appears:

    {  
     "result" : "Success"
    }

9.7 okv cluster node disable Command

The okv cluster node disable command disables a cluster node.

Required Authorization

System Administrator role

Syntax

okv cluster node disable

JSON Input File Template

{
 "service" : {
  "category" : "cluster,
  "resource" : "node",
  "action" : "disable",
  "options" : {
   "nodeName" : "#VALUE",
   "originNodeName" : "#VALUE"
   }
  }
}

Parameters

Parameter Required? Description
--node-name

Required

Name of the cluster node.

--origin-node-name Optional Name of an origin node to initiate disabling of a node.

JSON Examples

  1. Generate JSON input for the okv cluster node disable command.
    okv cluster node disable --generate-json-input

    The generated input appears as follows:

    {
     "service" : {
      "category" : "cluster,
      "resource" : "node",
      "action" : "disable",
      "options" : {
       "nodeName" : "#VALUE",
       "originNodeName" : "#VALUE"
       }
      }
    }
  2. Save the generated input to a file, for example, node_disable.json.
  3. Run the okv cluster node disable command using the generated JSON file. For example:
    okv cluster node disable --from-json node_disable.json

    Output similar to the following appears:

    {
     "result" :"Success"
    }

9.8 okv cluster node cancel-disable Command

The okv cluster node cancel-disable command cancels disabling of a cluster node.

Required Authorization

System Administrator role

okv cluster node cancel-disable command displays the following:
  • The command result, whether it is Success or failure.

Syntax

okv cluster node cancel-disable

JSON Input File Template

{
 "service" : {
 "category" : "cluster,
 "resource" : "node",
 "action" : "cancel-disable",
 "options" : {
  "nodeName" : "#VALUE"
  }    
 }
}

Parameters

Parameter Required? Description
--node-name

Required

Name of the cluster node.

JSON Examples

  1. Generate JSON input for the okv cluster node cancel-disable command.
    okv cluster node cancel-disable --generate-json-input

    The generated input appears as follows:

    {
     "service" : {
     "category" : "cluster,
     "resource" : "node",
     "action" : "cancel-disable",
     "options" : {
      "nodeName" : "#VALUE"
      }    
     }
    }
  2. Save the generated input to a file, for example, cancel_disable.json.
  3. Run the okv cluster node cancel-disable command using the generated JSON file. For example:
    okv cluster node cancel-disable --from-json cancel_disable.json

    Output similar to the following appears:

    {
     "result" : "Success"
    }

9.9 okv cluster node update Command

The okv cluster node update command modifies the cluster subgroup of a cluster node.

Required Authorization

System Administrator role

Syntax

okv cluster node update --generate-json-input

JSON Input File Template

{
 "service" : {
  "category" : "cluster,
  "resource" : "node",
  "action" : "update",
  "options" : {
   "nodeName" : "#VALUE",
   "clusterSubgroup" : "#VALUE"
  }
 }
}

Parameters

Parameter Required Description
--cluster-subgroup

Required

Name of the cluster subgroup.

--node-name

Required

Name of the cluster node.

JSON Examples

  1. Generate JSON input for the okv cluster node update command.
    okv cluster node update

    The generated input appears as follows:

    {
     "service" : {
      "category" : "cluster,
      "resource" : "node",
      "action" : "update",
      "options" : {
       "nodeName" : "#VALUE",
       "clusterSubgroup" : "#VALUE"
      }
     }
    }
  2. Save the generated input to a file, for example, node_update.json.
  3. Run the okv cluster node delete command using the generated JSON file. For example:
    okv cluster node update --from-json node_update.json

    Output similar to the following appears:

    {
     "result" : "Success"
    }