Monitoring environment restoration

Restoring the CDW environment is an unvaried process; no configuration update or settings change are applied to existing Virtual Warehouses or Data Visualization applications.

After restoration, a Virtual Warehouse has exactly the same settings as the original Virtual Warehouse according to the following principles.

  • Configurations are not copied as is; rather a new configuration is created. All the changes made to the Virtual Warehouse configuration throughout its lifecycle are applied on top of the new configuration.
  • Values that were undefined or not present in earlier versions are set to the default.
  • Configurations are mapped 1-to-1 during restoration.

Track the progress of the cluster restoration using the operationID from the cluster-restore response. Due to the unvaried nature of the restore process, if any Virtual Warehouse is missing because you deleted it accidentally, or it failed to come up, you can choose to try again.

Steps

  1. Check that there are no errors after running the cluster-restore command.
    Example: A cluster-restore command response free of errors looks like this:
    {
      "clusterId": "env-npk886",
      "operationId": "acbe40f4-560b-485c-833c-451a64bb76c4",
      # truncated output
    }
  2. Use the CDP CLI dw list-events commands in conjunction of the operation-id (obtained in the first step) to see the restoration progress.
    cdp \
       --profile ${CDP_PROFILE} \
       dw list-events \
       --operation-id acbe40f4-560b-485c-833c-451a64bb76c4

    The command returns the most recent events. You can use --asc switch to flip the ordering and see the first event. You can limit the output with the --limit switch.

    You might experience a slight delay before the event appears in the audit app.

The output looks something like this:
{
  "events": [
  {
    "operationId": "acbe40f4-560b-485c-833c-451a64bb76c4",
    "event": "RestoreCluster",
    "message": "{\"type\":\"info\",\"message\":\"restore cluster operation for env-m6mcfd has finished\",\"error\":null}",
    "timestamp": "2023-08-28T12:12:53+00:00"
  },
  {
    "operationId": "acbe40f4-560b-485c-833c-451a64bb76c4",
     "serviceId": "compute-1693224718-abcd",
     "event": "Completed",
     "message": "Started hive Virtual Warehouse",
     "timestamp": "2023-08-28T12:12:50+00:00"
  }
  ]
}

Steps with Auditing Events

  1. Check that there are no errors after running the cluster-restore command.
    Example: A cluster-restore command response free of errors looks like this:
    {
      "clusterId": "env-npk886",
      "operationId": "acbe40f4-560b-485c-833c-451a64bb76c4",
      # truncated output
    }
  2. Navigate to the CDP Management Console > Audit.
  3. Click Expand to see information about progress of, or possibly about errors in, the request to restore the cluster.
  4. Alternatively, to see information about progress of, or possibly about errors, in the request to restore the cluster use the CDP CLI.
    Using list-events in the audit command section can return the restore operation events. Passing the operationId to the requestId filter parameter returns the output shown below. For example:
    cdp \
      --profile ${CDP_PROFILE} \
      audit list-events \
      --from-timestamp $(TZ=UTC date -v -1d '+%FT%T') \
      --to-timestamp $(TZ=UTC date -v -0M '+%FT%T') \
      --request-id acbe40f4-560b-485c-833c-451a64bb76c4
    Example output (truncated):
    {
      "auditEvents": [
      {
        "version": "1.1.0",
        "id": "238e6d6e-196f-4c76-b75b-c97b3dd3d4d5",
        "eventSource": "dw",
        "eventName": "RestoreCluster",
        "timestamp": 1678446458555,
        "actorIdentity": {
        "actorCrn": "crn:..."
       },
       "accountId": "9d74eee4-...",
       "requestId": "acbe40f4-560b-485c-833c-451a64bb76c4",
       "apiRequestEvent": {
       "requestParameters": "{\"message\":\"restore cluster operation for env-jhnwzk has finished\",\"type\":\"info\"}",
       "mutating": true
       }
    },