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:

  1. On the master node, run this command:

    kubectl edit deployment cdf-apiserver -n core
  2. Locate ENABLE_SWAGGER and change its value from false to true. Save the change.

  3. After the cdf-apiserver pod restarts automatically, log in as admin to the OMT Management Portal.

  4. Launch a second window and open Swagger: https://VIP_FQDN:5443/suiteInstaller/swagger-ui/

  5. In the OMT Management Portal, on the Deployments page, press the F12 key.

  6. Switch to the Network tab.

  7. 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

  8. In Swagger, verify in the top right that you are in Public API section.

    1. Select the csrf-token controller, and click the blue GET button.

    2. In the resulting dropdown, click Try it out. Paste the x-auth-token you previously copied and execute.

    3. Note the value of csrfToken from the Response body, for example: 41d6355f-a0a5-4aa3-80d6-cf1bb09ae7ab.

    4. Copy and paste this value to your text file.

  9. In the top right, switch from the Public API section to Internal API section, and expand the kube-upgrade-service-controller section.

  10. On /suiteInstaller/urest/v1.1/deployment/{deploymentUuid}/upgrade/cancel (the second line in the Controller selections), click POST.

  11. Click Try it out and provide values for the x-auth-token, csrf-token, and deployment ID from your text file.

  12. Click Execute to cancel the upgrade.

  13. 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.
  14. Repeat the upgrade process again.

  15. 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.