update

dpsctl resource-group update Usage Guide

Update policies of a resource group (RG).

Usage

dpsctl resource-group update

Flags

Includes global dpsctl options.

   --resource-group string         resource group name
   --policy string                 resource group policy (optional)
   --remove-policy                 remove resource group policy (optional, true/false) (default: false)
   --remove-entity-policy string   remove entity policies (comma-separated list of entities) (optional)
   --strict-policy                 if requested power policy is not possible, fail instead of switching to a lower policy (only useful if the resource group is already active) (default: false)
   --workload-profile-ids string   workload power profile Redfish IDs (comma separated list of profile IDs) (optional)
   --remove-all-workload-profiles  remove workload power profiles (optional, true/false) (default: false)
   --sync                          synchronous update. Wait until resource group update is complete (default: false)
   --async                         asynchronous update (default). Return immediately after validating the resource group, but update continues asynchronously (default: false)
   --async-n-hosts int             asynchronous update, but wait until at least this many hosts are configured before returning (default: 0)
   --async-percent-hosts int       asynchronous update, but wait until at least this percent of hosts are configured before returning (default: 0)
   --async-wait duration           asynchronous update, but wait this much before returning (default: 0s)
   --at-least-n-hosts int          at least this number of hosts must be updated for the resource group update to succeed. Remaining hosts may fail to be configured, but they remain part of the resource group (default: 0)
   --at-least-percent-hosts int    at least this percent of hosts must be updated for the resource group update to succeed. Remaining hosts may fail to be configured, but they remain part of the resource group (default: 0)
   --partial-timeout duration      wait at most this much for the resource group update to come to an acceptable level. If the resource group cannot be updated for the given failure tolerance levels within this duration, update fails. (default: 0s)
   --help, -h                      show help

Examples

Updating Default Resource Group Policy (Inactive RG)

To update a resource group default policy, simply use the --policy flag.

$ dpsctl resource-group update --resource-group example1 --policy Node-Med
{
  "status": {
    "ok": true,
    "diag_msg": "Success"
  }
}

Removing Default Resource Group Policy (Inactive RG)

The default resource group policy can be removed using --remove-policy.

$ dpsctl resource-group update --resource-group example1 --remove-policy=true
{
  "status": {
    "ok": true,
    "diag_msg": "Success"
  }
}

Updating Resource Group Entity Policies (Inactive RG)

In addition to updating the default resource group policy, the entity-specific policies may be updated independently.

In this example, a previously created, inactive resource group example1 contains 3 nodes: node001, node002, and node003, with a default resource group policy of Node-High. However, we want node001 and node002 to use the Node-Low and Node-Med policies, respectively.

To make this update, we will make use of the --entity-policy flag. We can use this flag multiple times during the same command to specify multiple updates.

$ dpsctl resource-group update --resource-group example1 --entity-policy Node-Low=node001 --entity-policy Node-Med=node002
{
  "status": {
    "ok": true,
    "diag_msg": "Success"
  }
}

Removing Resource Group Entity Policies (Inactive RG)

In the example above, we updated the inactive resource group example1 so that node001 is using the Node-Low policy and node002 is using the Node-Med policy.

In this example, we want to return node001 to the default resource group policy, Node-High. Instead of setting this policy using the --entity-policy flag, we can simply remove the policy for node001. We’ll do this using the --remove-entity-policy flag.

$ dpsctl resource-group update --resource-group example1 --remove-entity-policy node001
{
  "status": {
    "ok": true,
    "diag_msg": "Success"
  }
}

Updating an Active Resource Group with Strict Policy Application

For more information on Strict vs Auto-Switching policy activation, see dpsctl resource-group activate.

$ dpsctl resource-group update --resource-group example1 --policy Node-High --strict-policy
{
  "node_statuses": {
    "eos0205": {
      "policy": {
        "Name": "Node-High",
        "capabilities": {
          "min": 5600,
          "max": 10200
        },
        "components": [
          {
            "id": "COMP_CPU",
            "limit": 1530
          },
          {
            "id": "COMP_GPU",
            "limit": 7650
          },
          {
            "id": "COMP_MEMORY",
            "limit": 1020
          }
        ]
      },
      "status": {
        "ok": true,
        "diag_msg": "Success"
      }
    }
  },
  "status": {
    "ok": true,
    "diag_msg": "Success"
  }
}

If the policy has already been applied, a simple success message will be provided without node_statuses.

$ dpsctl resource-group update --resource-group example1 --policy Node-High --strict-policy
{
  "status": {
    "ok": true,
    "diag_msg": "Success"
  }
}