Skip to content

2.27.0.0-b560

@kv83821-yb kv83821-yb tagged this 12 Sep 07:44
Summary:
The changes in this PR introduce the immutable YBC flow in Kuberentes universes.
Related changes:
- Helm chart changes: D45517
- k8s_parent.py changes: D45516
- Image packaging changes: D44951

The universe primary cluster user intent now has a field `useYbdbInbuiltYbc` which
controls the following helm override value:
```
ybc:
    useYBDBImage: true
```
This field be set during universe creation in the **Create Universe** API:
https://api-docs.yugabyte.com/docs/yugabyte-platform/4548b5e5061a8-create-universe-clusters

It can also be enabled on existing universes using a dedicated API introduced in this PR:
`POST    /customers/:cUUID/universes/:uniUUID/upgrade/k8s_immutable_ybc`

Setting immutable YBC enabled on existing universe:
```
curl 'http://34.82.229.4/api/v1/customers/bd1199b6-3054-46c2-9dd1-1aa27050f8fa/universes/4c3b2af5-060c-4a35-b216-de62c6556c9b/upgrade/k8s_immutable_ybc' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en-US,en;q=0.9' \
  -H 'Connection: keep-alive' \
  -H 'X-AUTH-TOKEN: <TOKEN>' \
  -d '{"useYbdbInbuiltYbc": true}' \
  --insecure
```

Disabling immutable YBC on existing universe:
```
curl 'http://34.82.229.4/api/v1/customers/bd1199b6-3054-46c2-9dd1-1aa27050f8fa/universes/4c3b2af5-060c-4a35-b216-de62c6556c9b/upgrade/k8s_immutable_ybc' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en-US,en;q=0.9' \
  -H 'Connection: keep-alive' \
  -H 'X-AUTH-TOKEN: <TOKEN>' \
  -d '{"useYbdbInbuiltYbc": false}' \
  --insecure
```

When the `useYbdbInbuiltYbc` field is set on a universe, the YBC upgrade schedule and pre-backup/restore
unavailable YBC servers healing is skipped.

Another set of changes includes modification of the existing `UpgradeYbcGFlags` flow to include
both immutable/non-immutable YBC gflags upgrade for K8s universes.

```
curl -X PUT 'http://34.82.229.4/api/v1/customers/bd1199b6-3054-46c2-9dd1-1aa27050f8fa/universes/4c3b2af5-060c-4a35-b216-de62c6556c9b/ybc/upgrade/gflags' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en-US,en;q=0.9' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'X-AUTH-TOKEN: <TOKEN>' \
  -d '{"rw_num_threads": 9,"maxConcurrentUploads":3,"perUploadNumObjects":2,"maxConcurrentDownloads":1,"perDownloadNumObjects":1}' \
  --insecure
```

**YBC throttle parameter setting changes to support immutable YBC**

The PR also adds changes to support modifying throttle parameters for immutable YBC on K8s universes.
It deprecates the existing sync API to modify the throttle params and instead adds a new async
API. This is done to support throttle param changes for immutable YBC as in that case the throttle param
changes require a helm upgrade to take effect.

The throttle params changes are done in a non-restart upgrade flow.

API: `POST    /customers/:cUUID/universes/:uniUUID/ybc_throttle_params_async`

```
curl 'http://34.82.229.4/api/v1/customers/bd1199b6-3054-46c2-9dd1-1aa27050f8fa/universes/d69d5b3b-c70b-4edf-badd-03e5b5dbb6b9/ybc_throttle_params_async' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en-US,en;q=0.9' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'X-AUTH-TOKEN: <TOKEN>' \
  -d '{"maxConcurrentUploads":3,"perUploadNumObjects":2,"maxConcurrentDownloads":1,"perDownloadNumObjects":1}' \
  --insecure
```

Test Plan:
- Verified creating universe with Immutable YBC.
- Verified modifying universe with Immutable YBC - Edit universe, software upgrade etc
- Verified enabling immutable ybc on existing universe.
- Verified disabling immutable ybc on existing universe.
- Verified YBC upgrade schedule is stopped for universes having immutable YBC.

Reviewers: anijhawan, nsingh, dshubin

Reviewed By: dshubin

Differential Revision: https://phorge.dev.yugabyte.com/D46061
Assets 2
Loading