How to revert changes in Tanzu OpsManager UI and CLI
search cancel

How to revert changes in Tanzu OpsManager UI and CLI

book

Article ID: 449854

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated Edition

Issue/Introduction

When you made a change in the OpsMan UI or using API to any of the tiles in the environment. Using "Revert" button in the UI or an API call, the changes can be reverted. 

Since OpsMan v3.3.x the revert functionality allows reverting a single tile using the endpoint /api/v0/staged/products/<product-guid>/revert 

Previous versions of OpsMan allow to revert all changes for all tiles only, the endpoint is /api/v0/staged/revert 

 

More information and relevant endpoints can be found in the api doc here https://developer.broadcom.com/xapis/tanzu-operations-manager-api/latest/

 

Environment

OpsMan/ Bosh director

Resolution

There is a "Revert" button in the UI which allows to revert any changes made. 

 

To revert changes for versions prior to Opsman v3.3.x using cli, you can use either OM command or a curl to the api, examples are shown below:

curl -sk -X DELETE -H "Authorization: Bearer ${token}"  https://opsman-fqdn/api/v0/staged

or if you use om command

om -e env.yml revert-staged-changes

 

To confirm the changes have been reverted check the Pending changes for a tile in the UI or cli with command: 

curl -sk -X GET   -H "Authorization: Bearer $token" https://opsman-fqdn/api/v0/staged/pending_changes 

 

In case where the error like below is shown open a ticket with Broadcom Support to resolve the issue. 

$ curl -sk -X DELETE -H "Authorization: Bearer ${token}"  https://opsman-fqdn/api/v0/staged | jq

{ "errors": {"base": [

      "Please upgrade the BOSH Director prior to reverting pending changes"] }}