Site icon Default Reasoning

How to Restart Failed Tasks on SDDC Manager

VCF Icon

To restart a failed task on SDDC Manager, you simply click the ‘Retry Task‘ button on the Task pane. Sometimes, however, you’ll need to change the input for this task, as in my case, where I had a typo in the BGP Neighbor IP address. My task was failing with the error message ‘Failed to validate BGP Neighbor Peering Status.’ The issue here was an incorrect IP address for the BGP neighbor (it should be .253, not .254 for both uplink networks).

IMPORTANT NOTE: Create a snapshot and/or backup of the SDDC Manager before making any changes!

Enabling the HTTP API

Due to security reasons, HTTP access to SDDC Manager using the API has been disabled in VCF 5.0. You must enable it to be able to run the curl command.

  1. Log in to the SDDC Manager with the ‘vcf‘ account and switch to ‘root‘ using the su - command.
  2. Open the ‘application-prod.conf‘ file located in the /etc/vmware/vcf/domainmanager/ directory.
  3. Add the following line at the end of the file: vcf.vault.http-access=true
  4. Save the file.
  5. Restart the domain manager service with the following command: # systemctl restart domainmanager and wait for a couple of minutes.

Restart Failed Task on SDDC Manager

  1. Log in to the SDDC Manager UI, navigate to the failed task, and copy the task ID from the URL. See the screenshot below for an example. Make sure you don’t copy the bracket at the end of the URL.
  2. Next, log in to the SDDC Manager via SSH and switch to the ‘root‘ user using su – command.
  3. To change the task input parameters, you need to retrieve the task specification by running the following command: # curl -s http://localhost/domainmanager/internal/vault/<TASK_ID> | json_pp > /tmp/<FILENAME>.json
    • For ‘TASK_ID,’ use the ID from Step 1.
    • For ‘FILENAME,’ choose a filename for the JSON specifications file.
  4. Open the JSON file in the ‘tmp’ folder, make the necessary adjustments, and save it.
  5. Restart the task with the modified JSON file using the following command: # curl -H 'Content-Type:text/plain' -X PUT http://localhost/domainmanager/internal/vault/<TASK_ID> -d @/tmp/<MODIFIED_JSON_FILE>.json
    • For ‘TASK_ID,’ use the ID from step 1.
    • For ‘MODIFIED_JSON_FILE,’ use the file name from step 3.
  6. Return to the SDDC Manager UI and restart the failed task by clicking the ‘Restart Task‘ button.
  7. The task should now restart with the new values.

NOTE: Remember to change the properties of the ‘application-prod.conf‘ file back to its original state by removing the vcf.vault.http-access=true entry and restarting the ‘domainmanager‘ service on SDDC Manager.

Cheers!

– Marek.Z

Exit mobile version