[VMC on AWS] Pre-update fix for the vCenter Cloud Gateway (VCGA) before the SDDC is upgraded to 1.12
search cancel

[VMC on AWS] Pre-update fix for the vCenter Cloud Gateway (VCGA) before the SDDC is upgraded to 1.12

book

Article ID: 314086

calendar_today

Updated On:

Products

VMware Cloud on AWS

Issue/Introduction

To provide the steps to apply the pre-update fix to the VCGA before the SDDC 1.12 upgrade begins.

Symptoms:
The VCGA is still the 1.10 version and the SDDC is still 1.10. 
This does not apply to any incremental updates, such as 1.10v2 or above. 
The SDDC is scheduled to be upgraded to version 1.12 from 1.10 and has not started.

Resolution

If the root password has expired or is about to expire, follow these steps before working through the pre-update process:
1. To verify if the root password has expired or is about to expire, SSH into the VCGA and run the following command: chage -l | grep -i "Password expires"
2. If the password is expired or is about to expire, reset the password: passwd root
3. The user will be prompted to enter a new password twice. 
4. Once completed, the pre-update steps can be completed. 

To complete the pre-update fix, follow the below process:
1. Verify the VCGA is version 1.10. This can be done by logging into the VCGA VAMI and verifying the version in the "Summary" section. 
2. Verify the SDDC has not started the upgrade to 1.12 or newer. 
3. SSH into the VCGA as root and navigate to the update folder: cd /usr/lib/applmgmt/update/py/vmware/appliance/update/
Note: After this step, all command examples assume the user is still in the above folder. If not, the full location must be used when running the below commands. 
4. Create a backup of the "update_constants.py" file: cp update_constants.py update_constants.bak
5. Create a file named "update_post_patching_command": vi update_post_patching_command
6. Update the file with the below text to create the required pre-update script:
#!/bin/bash

# Update post patching command
sed -i 's/\"install \[scriptlet|program\]/\"install scriptlet|program/g' /usr/lib/applmgmt/update/py/vmware/appliance/update/update_constants.py

if [ $? -ne 0 ] ; then
echo "Failed to update the patching command."
else
echo "Successfully updated the patching command."
fi
Note: The line starting with "sed -i" and ending with "/update_constants.py" is one line in the script.
7. Exit the editor and save the file: Press ESC > :wq > Press ENTER
8. Set the permissions of "update_post_patching_command" to allow the script to executable: chmod 755 update_post_patching_command
9. Set the permissions of "update_constants.py" to allow the file to be written to: chmod 666 update_constants.py
10. Run the newly created script to apply the pre-update fix: ./update_post_patching_command
11. If successful, set the permissions back to be read-only on the "update_constants.py" file: chmod 444 update_constants.py
12. Restart the "applmgmt" service: service-control --restart applmgmt
13. Test the VCGA by logging in and verifying the user can see the expected inventories after the "applmgmt" restarts. 
14. If the script was unsuccessful, verify the script was created correctly, permissions set properly, and that the VCGA is the correct version. Also verify the SDDC has not started the 1.12 upgrade. 
15. Request support from the VMC on AWS team if the pre-update script is unsuccessful after verifying step 14. 


Additional Information

Impact/Risks:
The VCGA will need to have services restarted. This will not affect any workload as the VCGA is only a management interface.