Re-try an existing workflow by modifying the workflow spec file
search cancel

Re-try an existing workflow by modifying the workflow spec file

book

Article ID: 314620

calendar_today

Updated On:

Products

VMware Cloud Foundation VMware SDDC Manager

Issue/Introduction

The SDDC Manager workflow being attempted is failing due to incorrectly provided input configuration. There is no way to edit the configuration from the UI before restarting the task.

This article provides the steps to extract the workflow spec file, make the required changes to it, and re-inject it to the existing workflow so it can be retried with an updated value. 

Environment

VMware Cloud Foundation 5.x
VMware Cloud Foundation 9.x

Cause

The cause is likely due to incorrectly supplied input configuration either in the JSON input spec, or via the SDDC UI.

Resolution

 

      1. Take a snapshot of SDDC Manager VM

      2. Login the SDDC Manager UI, and click on the failed Task we need to edit and retry.

      3. Note the workflow ID, which is the subtasks URL

       

      4. SSH to the SDDC Manager with the 'vcf' user and then type 'su root'.

      5. Update the applications.properties file to all access via curl (5.x and 9.x only). 

    echo "vcf.vault.http-access=true" >> /etc/vmware/vcf/domainmanager/application.properties
    systemctl restart domainmanager

      6. Use the following GET API call to retrieve the spec file for the workflow

        curl -k -s http://localhost/domainmanager/internal/vault/<workflow_id_from_url> -X GET | json_pp > /tmp/workflow.json

      7. Edit the contents of the workflow.json as needed. Note: there may be several places that need to be updated in the json.  

         To edit the workflow.json via Winscp do the following: 

    • Copy the file to /home/vcf/ with command:
      • cp workflow.json /home/vcf/
    • Change the permissions on the file:
      • chmod 777 workflow.json
    • Via WinSCP, edit the file with the type Ctrl + H which runs a find and replace task to make editing the json easier.

      8. Use the following PUT API call to update the spec file for the workflow     

        curl -k -s http://localhost/domainmanager/internal/vault/<workflow_id_from_url> -X PUT -H "Content-type: text/plain" -d @/tmp/workflow.json

      9. From the SDDC Manager UI, Restart the Task

         

        The task will be attempted again using the new workflow spec file provided.

Additional Information

Depending on the workflow that is being attempted, modifying the workflow manually can have a significant impact to the environment. Please ensure that you have appropriate backups and snapshots of the components involved in the workflow.

If you need to obtain the account credentials for a service account, follow the steps in this article: Retrieve the service accounts credentials from SDDC Manager