activate

dpsctl resource-group activate Usage Guide

Activate a resource group. You must first create a resource group before it can be activated.

Usage

dpsctl resource-group activate

Flags

Includes global dpsctl options.

  --resource-group string       resource group name
  --strict-policy               if requested power policy is not possible, fail instead of switching to a lower policy (default: false)
  --sync                        synchronous activation. Wait until resource group activation is complete (default: false)
  --async                       asynchronous activation (default). Return immediately after validating the resource group, but activation continues asynchronously (default: false)
  --async-n-hosts int           asynchronous activation, but wait until at least this many hosts are configured before returning (default: 0)
  --async-percent-hosts int     asynchronous activation, but wait until at least this percent of hosts are configured before returning (default: 0)
  --async-wait duration         asynchronous activation, but wait this much before returning (default: 0s)
  --at-least-n-hosts int        at least this number of hosts must be activated for the resource group activation 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 activated for the resource group activation 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 activation to come to an acceptable level. If the resource group cannot be activated for the given failure tolerance levels within this duration, activation fails. (default: 0s)
  --allow-reprovision           allow power policy reprovisioning of other resource groups in order to activate the resource group if there is not enough power to activate the resource group (default: true)
  --help, -h                    show help

Examples

Activation with Automatic Policy Switching

In this example, DPS will attempt to apply the specified resource group policy (Node-High) so long as the node has sufficient power available. If less node power is available than specified by the resource group, DPS will attempt to apply the next highest node policy from the topology (Node-Med, followed by Node-Low). If DPS cannot switch to any pre-configured policy, it will fail.

In the example below, a resource group with a default Node-High policy was created & activated. We can see that upon activation, DPS has selected the Node-Low policy for one of the nodes in the resource group, and Node-Med for another.

DPS may also apply different policies to nodes depending on the resource group policy configuration. See dpsctl resource-group create, dpsctl resource-group add and dpsctl resource-group update for more info on configuring resource groups.

$ dpsctl resource-group activate --resource-group test-2
{
  "node_statuses": {
    "node001": {
       "policy": {
        "Name": "Node-Low",
        "capabilities": {
          "min": 4000,
          "max": 5250
        },
        "components": [
          {
            "id": "COMP_CPU",
            "limit": 720
          },
          {
            "id": "COMP_GPU",
            "limit": 2800
          },
          {
            "id": "COMP_MEMORY",
            "limit": 480
          }
        ]
      },
      "status": {
        "ok": true,
        "diag_msg": "Success"
      }
    },
    "node002": {
      "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"
      }
    },
    "node003": {
      "policy": {
        "Name": "Node-Med",
        "capabilities": {
          "min": 5000,
          "max": 7140
        },
        "components": [
          {
            "id": "COMP_CPU",
            "limit": 1071
          },
          {
            "id": "COMP_GPU",
            "limit": 5355
          },
          {
            "id": "COMP_MEMORY",
            "limit": 714
          }
        ]
      },
      "status": {
        "ok": true,
        "diag_msg": "Success"
      }
    }
  },
  "status": {
    "ok": true,
    "diag_msg": "Success"
  }
}

Activation with Strict Policy Application

Below, the policy specified in the resource group (Node-High) will be applied as-is or fail if sufficient power is not available.

$ dpsctl resource-group activate --resource-group test-2 --strict-policy
{
  "node_statuses": {
    "node001": {
      "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"
      }
    },
    "node002": {
      "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"
      }
    },
    "node003": {
      "policy": {
        "Name": "Node-Med",
        "capabilities": {
          "min": 5000,
          "max": 7140
        },
        "components": [
          {
            "id": "COMP_CPU",
            "limit": 1071
          },
          {
            "id": "COMP_GPU",
            "limit": 5355
          },
          {
            "id": "COMP_MEMORY",
            "limit": 714
          }
        ]
      },
      "status": {
        "ok": true,
        "diag_msg": "Success"
      }
    }
  },
  "status": {
    "ok": true,
    "diag_msg": "Success"
  }
}