Rubrik : Getting CDM Upgrade History




Background

During our ISO audit last quarter, I've been asked to provide a list of the various date of our CDM upgrades. This way they could match with our internal Jira tickets to confirm we are following the process. It was not easy and I had to raise ticket with Rubrik to get support accessing that information. Could it be easier ? I believe so ;)

How to retrieve upgrade history ?

Rubrik Support can help with this. Indeed, there is a ssh command that can provide upgrade history. This command is only available for the support team with their super power. But, if you are lucky enough, and have rksupport access to your cluster (which I do not recommend in production), you can give it a try by yourself. The command is node-status-history. It provides information about the status of the node, the various upgrades and their results :

node-status-history
2021-02-08 05:38:50|1|Node revived from BAD state
2021-02-12 05:57:34|2|Stale status timestamp
2021-02-12 06:05:42|1|Node revived from BAD state
2021-02-12 23:12:19|2|Stale status timestamp
2021-02-12 23:20:23|1|Node revived from BAD state
2021-02-13 06:35:33|2|Stale status timestamp
2021-02-13 06:43:34|1|Node revived from BAD state
2021-02-13 23:10:09|2|Stale status timestamp
2021-02-13 23:18:36|1|Node revived from BAD state
2021-02-25 12:02:10|6|Setting status to UPGRADE before upgrade process started. Old version is 5.3.0-p2-18423
2021-02-25 12:28:37|1|Setting status to OK after upgrade process ended. New version is 5.3.0-p3-18540
2021-02-25 22:48:03|2|Status stale on startup
2021-02-25 23:06:52|1|Node revived from BAD state
2021-03-04 08:08:17|2|Stale status timestamp
2021-03-04 08:16:34|1|Node revived from BAD state
2021-03-05 00:01:33|2|Stale status timestamp
2021-03-05 00:10:02|1|Node revived from BAD state
2021-03-12 01:51:06|2|Stale status timestamp
2021-03-12 01:59:08|1|Node revived from BAD state
2021-03-13 09:38:20|2|Stale status timestamp
2021-03-13 09:46:34|1|Node revived from BAD state
2021-03-14 00:01:26|2|Stale status timestamp
2021-03-14 00:09:40|1|Node revived from BAD state
2021-03-14 01:40:51|2|Stale status timestamp
2021-03-14 01:49:04|1|Node revived from BAD state
2021-03-16 09:56:22|2|Stale status timestamp
2021-03-16 10:04:31|1|Node revived from BAD state
2021-03-16 18:40:16|6|Setting status to UPGRADE before upgrade process started. Old version is 5.3.0-p3-18540
2021-03-16 19:09:23|1|Setting status to OK after upgrade process ended. New version is 5.3.1-18634
2021-03-19 23:36:15|2|Stale status timestamp

But as I said, this is only accessible if you have rksupport credentials for your cluster.

Could it be Obtained from API ?

As I used to say, API is always the solution and indeed it is ! There is a v1 API that definitely provides that information. Big thanks to Cor van 't Hoff for the guidance. 

It is located here : 

/api/v1/config/history/list_updates?source=Upgrade

But, there is an entry for each Rubrik component, of course, we don't need that, we need a summary. So I chose to get all upgrade date/time for a single component (in this case local_atlas). When you have this, you just need to browse the JSON-like object to get all relevant details.

   {
      "nodeId": "node:::VRVW42XXXF64F",
      "namespace": "local_atlas",
      "name": "tlkv_global_max_capacity",
      "oldValue": "None",
      "newValue": "2048",
      "apiUser": "",
      "modifiedDateTime": "2021-03-16T19:01:01.831Z",
      "source": "UPGRADE",
      "configChangeMetadata": "{\"old_state\": \"DEFAULT\", \"tarball_version\": \"5.3.1-18634\"}"
    } 

In the above example, we see "modifiedDateTime" and "configChangeMetadata" are the two fields we need to extract the data from.

I have created a function in my Php Framework that return the different upgrade campaign date/time and the version that have been installed.

$upgrade=rkGetUpgradeHistory($clusterConnect);

The $upgrade variable contains data similar to this : 

array(7) {
  [0]=>
  string(43) "Fri Jul 23 09:08:00 UTC 2021|6.0.0-p1-12566"
  [1]=>
  string(44) "Wed Jun 30 15:06:00 UTC 2021|6.0.0-DA1-12469"
  [2]=>
  string(44) "Wed May 26 11:15:00 UTC 2021|6.0.0-EA2-12277"
  [3]=>
  string(44) "Sat May 08 08:40:00 UTC 2021|6.0.0-EA1-12070"
  [4]=>
  string(40) "Wed Mar 24 16:22:00 UTC 2021|5.3.1-18634"
  [5]=>
  string(44) "Wed Dec 02 16:38:00 UTC 2020|5.3.0-DA1-18174"
  [6]=>
  string(44) "Mon Oct 26 11:46:00 UTC 2020|5.3.0-EA2-10548"
}

A quick cleanup to separate the two fields and here is the magic :


If you want to give the script a try, feel free, it is here !

Next audit will be flawless!

I hope it helps ! ;-)

Comments

What's hot ?

Raspberry Pi : WiFi Hotspot for the Garden!

ShredOS : HDD degaussing with style

Wallbox : Get The Most Of It (with API)