Hello, dear!
Good day to you!
This topic describes how to deal with the problem that failing to update the IVS module.
Symptom
If this workaround is not performed, the template fails to be updated in the first step of the IVS C10SPC110 upgrade.
Version: CSP C11SPC601
Identification
After the IVS is upgraded to C10SPC100, use the SSH tool to log in to the node where the CSPOM is located as the cspexpert user. After the login is successful, switch to the root user. Run the following command:
cid=$(docker ps | grep cspgauss | grep -v grep | awk -F " " '{print $1}') ;umask 022;docker exec -u dbuser ${cid} bash -c "source /home/dbuser/.bashrc;gsql -d cspaoddb -U AODDBUSER -p 22080 -W Cspdbg@2017 -c'select NAME, STATUS from TBL_AOS_SERVICE; '"
If the status in the STATUS column is Pending, perform the workaround.
Problem Workaround
CSP single-node system:
Use SSH to log in to the node where the CSPOM is deployed as user cspexpert. After the login is successful, switch to user root. Run the following command:
cid=$(docker ps | grep cspgauss | grep -v grep | awk -F " " '{print $1}') ;docker exec -it -u root ${cid} su - dbuser -c "gsql -d cspaoddb -p 22080 -U AODDBUSER -W Cspdbg@2017"
update TBL_AOS_SERVICE set STATUS='Running' where STATUS='Pending';
CSP cluster environment:
1. Log in to the active GaussDB node. The GaussDB is deployed on both the csp01 and csp02 nodes. To identify the active database, log in to the node where csp01 is located using SSH and use cspexpert to log in to the node.
After the login is successful, switch to user root. Run the following command.
cid=$(docker ps | grep cspgauss | grep -v grep | awk -F " " '{print $1}') ;docker exec -it -u root ${cid} su - dbuser -c "gs_ctl query -P CSP@gaussdb@2017"|grep LOCAL_ROLE
If the value of LOCAL_ROLE is Primary, the node is the active node. If the value of LOCAL_ROLE is Standby, the node is the standby node.
cid=$(docker ps | grep cspgauss | grep -v grep | awk -F " " '{print $1}') ;docker exec -it -u root ${cid} su - dbuser -c "gsql -d cspaoddb -p 22080 -U AODDBUSER -W Cspdbg@2017"
update TBL_AOS_SERVICE set STATUS='Running' where STATUS='Pending';
Verify that no data in the Pending state is being upgraded to IVS C10SPC110.
Hope it can help you!