Skip to content

Patch Cell's Tenant Model

Changes to a Cell’s TENANT_MODEL are applied through a JSON6902 patch. Patches are applied from inner rings to outer rings, starting with ring 0 and proceeding outward sequentially.

If a patch application fails at any ring, the entire process halts and requires manual intervention.

[!note] Patches are not applied to the quarantine ring (-1). To update the TENANT_MODEL of a Cell in the quarantine ring, open a Merge Request and update it directly.

The following patch operations are available using ringctl:

OperationDescriptionParameters
addAdd a new field to the TENANT_MODELTarget path, Value
replaceReplace a field’s valueTarget JSON path, Value
removeRemove a fieldJSON path
moveMove a field to a new locationSource path, Destination path
copyCopy a field to a new locationSource path, Destination path

Use the ringctl patch create subcommand with the desired operation.

Update a single value:

Terminal window
ringctl patch create replace /instrumentor_version v16.xxx.x -e <cellsdev|cellsprod> --related-to "<issue_url>"

Combine multiple operations in one patch:

Terminal window
ringctl patch create add /use_gar_for_prerelease_image true replace /instrumentor_version v16.xxx.x --related-to <issue_id> --priority <3> -e <cellsdev|cellsprod>

Add a complex JSON structure:

Terminal window
ringctl patch create add "/byod" '{"instance": "gitlab.com"}' --related-to <issue_id> --priority <3> -e <cellsdev|cellsprod>

The command will create a Merge Request in cells/tissue. Get it reviewed and merged into main. Note the patch_id for tracking.

View all patches and their statuses:

Terminal window
ringctl patch ls -e <cellsdev|cellsprod>

[!note] Only one patch can be “In Progress” for a particular ring at any time. Patches run sequentially according to their priority. For urgent patches, consider setting priority to 3.

Each applied patch triggers the Instrumentor Stages pipeline. Find the pipeline on tissue by searching for your patch_id.

Delete a patch that’s still in pending status:

Terminal window
ringctl patch delete <patch_id> -e <cellsdev|cellsprod>

[!warning] A patch in the “in rollout” state cannot be stopped, as the Instrumentor stages pipeline is already running.