Those who are experienced with VCF might have seen this situation in past where a SDDC Bringup task fails because of an incorrect parameter in the json/xls file used for bringup.
Cloud Builder UI don’t provides a mechanism to go back and change the input file with correct values and retry bringup with modified file. Don’t loose heart if you are caught in this situation as it is possible to do this via API and in this post I will walk through steps of doing so.
By default cloud builder places the sddc-bringup json in /opt/vmware/sddc-support/cloud_admin_tools/Resources/vcf-ems/ directory by name vcf-ems.json.
Note: Even if you are using xls to feed cloud builder, it is internally converted in json file.
You can either modify this json directly and fix the incorrect value that was supplied in your xls/json file or you can generate a new json for bringup.
Step 1: Login to cloud builder vm via ssh and switch to root user.
Step 2: Upload your corrected xls file to /tmp via winscp or similar utility.
Step 3: Execute command: /opt/vmware/sddc-support/sos –jsongenerator –jsongenerator-design vcf-ems –jsongenerator-input <path-to-xls>
Example: /opt/vmware/sddc-support/sos –jsongenerator –jsongenerator-design vcf-ems –jsongenerator-input /tmp/vCF-4.0-v1.xlsx
You will be prompted to replace the default json file that cloud builder has created. Press Y to proceed.
1 2 3 |
2020-06-04T15:48:08.620Z [WARNING JsonGenerator.py::cleanup_folder::99::MainThread] Action to replace existing json files under folder /opt/vmware/sddc-support/cloud_admin_tools/Resources/vcf-ems Are you sure, you would like to replace? Y/N [N]: Y |
You will see following messages on your screen related to replacement operation.
1 2 3 4 5 6 7 8 9 10 |
Input JSON spec for management cluster deployment => /opt/vmware/sddc-support/cloud_admin_tools/Resources/vcf-ems/vcf-ems.json 2020-06-04T15:49:43.650Z [INFO JsonGenerator.py::render_automation_toolkit::223::MainThread] Input JSON spec for management cluster deployment => /opt/vmware/sddc-support/cloud_admin_tools/Resources/vcf-ems/vcf-ems.json 2020-06-04T15:49:43.650Z [INFO progressreporter.py::update_task_status::250::MainThread] Update JSONGENERATOR: Generating JSON File(s) with status : COMPLETED 2020-06-04T15:49:43.650Z [INFO progressreporter.py::update_task_status::329::MainThread] Overall status for JSONGENERATOR : COMPLETED_WITH_SUCCESS 2020-06-04T15:49:43.650Z [INFO progressreporter.py::update_task_status::363::MainThread] Current Status : {'JSONGENERATOR': {'subtasks': [{'name': 'Validating Config File', 'status': 'COMPLETED', 'message': ''}, {'name': 'Intermediate template file', 'status': 'COMPLETED', 'message': ''}, {'name': ' Generating JSON File(s)', 'status': 'COMPLETED', 'message': ''}], 'overall_status': 'COMPLETED_WITH_SUCCESS'}, 'operation-status': 'COMPLETED_WITH_SUCCESS'} 2020-06-04T15:49:43.650Z [INFO progressreporter.py::determine_progress::144::MainThread] All Tasks : {'JSONGENERATOR:Validating Config File': 'COMPLETED', 'JSONGENERATOR:Intermediate template file': 'COMPLETED', 'JSONGENERATOR: Generating JSON File(s)': 'COMPLETED'} |
Step 4: Obtain the UUID of the failed bringup task by checking latest vcf-bringup-debug.log located in directory /opt/vmware/bringup/logs/
Look for string “End of Orchestration with FAILURE for Execution ID <uuid>”
Make a note of this UUID.
Step 5: Execute the following command to retry the bringup with the modified spec (json) file.
# curl -X POST http://localhost:9080/bringup-app/bringup/sddcs/<uuid> -H “Content-Type: application/json” -d “@<path-to-json>”
Path to json is: /opt/vmware/sddc-support/cloud_admin_tools/Resources/vcf-ems/vcf-ems.json
And that’s it for this post. Hope you save yourself from pain of deploying cloud builder again just for a small mistake in configuration workbook.
I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing 🙂