Resetting Update Status Using Swagger
If you have inadvertently closed the browser during an upgrade, you will need to reset the status of the pending upgrade using apiserver in the Swagger UI in order to recover and be able resume the upgrade. Do the folllowing:
-
On the master node, run this command:
kubectl edit deployment cdf-apiserver -n core
-
Locate ENABLE_SWAGGER and change its value from
false
totrue
. Save the change. -
After the cdf-apiserver pod restarts automatically, log in as admin to the OMT Management Portal.
-
Launch a second window and open Swagger:
https://VIP_FQDN:5443/suiteInstaller/swagger-ui/
-
In the OMT Management Portal, on the Deployments page, press the F12 key.
-
Switch to the Network tab.
-
Refresh the page. Copy and paste each of the following to a text file:
-
From the preview section, the deployment ID: for example,
ff2dbb65-832a-4f22-97d8-dc959f85d894
-
From the headers section, the x-auth-token: for example,
eyJ0eXAiOiJKV1MiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIyYzkwODQ4NTdkN2E0NzM0MDE3ZDdhNDc0ODdhMDEwZSIsImlzcyI6IklkTSAxLjMyLjEtYnVpbGQuMjc5IiwiY29tLmhwZS5pZG06dHJ1c3RvciI6bnVsbCwiZXhwIjoxNjM4NDYyODE2LCJjb20uaHAuY2xvdWQ6dGVuYW50Ijp7ImlkIjoiMmM5MDg0ODU3ZDdhNDczNDAxN2Q3YTQ3NDcyYzAwYjciLCJuYW1lIjoiUHJvdmlkZXIiLCJlbmFibGVkIjp0cnVlfSwicHJuIjoiYWRtaW4iLCJpYXQiOjE2Mzg0NjEwMTYsImp0aSI6Ijc0MzhiZDYzLWNkNTYtNDRiNC05MWUyLTBkMTZlZGI4MmI0YyJ9.fd_qxCmeEsbIPc2m04phnQ07MGPFwLW56m127qIE5Tw
-
-
In Swagger, verify in the top right that you are in Public API section.
-
Select the csrf-token controller, and click the blue GET button.
-
In the resulting dropdown, click Try it out. Paste the x-auth-token you previously copied and execute.
-
Note the value of
csrfToken
from the Response body, for example:41d6355f-a0a5-4aa3-80d6-cf1bb09ae7ab
. -
Copy and paste this value to your text file.
-
-
In the top right, switch from the Public API section to Internal API section, and expand the
kube-upgrade-service-controller
section. -
On
/suiteInstaller/urest/v1.1/deployment/{deploymentUuid}/upgrade/cancel
(the second line in the Controller selections), click POST. -
Click Try it out and provide values for the x-auth-token, csrf-token, and deployment ID from your text file.
-
Click Execute to cancel the upgrade.
-
Return to the OMT Management Portal page and retry the installation or upgrade.
Note: It can take a few minutes for the previous upgrade process to terminate. Please be patient and allow the termination time to complete. -
Repeat the upgrade process again.
-
To disable swagger, repeat the commands in step 1 and 2. The cdf-apiserver will restart automatically. Swagger is disabled by default for security reasons, but is not accessible if no active login session to the management portal on port 5443 is found.