Rectifying Undercloud uninstall failures

Symptom

Undercloud fails to uninstall.

Cause

Unknown

Action
  1. To verify that the Undercloud VM exists, run the following command from the Undercloud host as a root user:
    virsh list -–all
  2. If the Undercloud VM exists, perform the following operations:
    1. To delete the Undercloud VM, run the following command:
      virsh destroy undercloud
    2. To undefine the Undercloud VM, run the following command:
      virsh undefine undercloud
    3. Navigate to the /var/lib/libvirt/images directory, and delete the undercloud.qcow2 image, if present.
  3. Source the environment variables and download the uploaded topology.
    export API_IP=<NPS Toolkit VM OAM/Customer Network IP address>
    export NPSADMIN=<user name of admin mentioned in the nps_secret.yaml file>
    export NPSPASSWD=<password of admin user mentioned in the nps_secret.yaml file>
    export TOPOLOGY_NAME=<value of the field "topology_name" in the input.json file>
    export VIM_TYPE=<VIM platform type like RHOCP/RHOCP/VMWARE>
    
    nps download-json -f /root/update.json
    
  4. Update the value of the field "state" in the undercloud section of the downloaded json to "NA".

    In the downloaded json, the field "state" is present in computes > vim > undercloud.

  5. Upload the downloaded json after modification using the following command:

    nps update-json -f /root/update.json

  6. To verify the state update is successful, execute the following command:

    nps show --data vim --node undercloud