Hello, everyone!
This case describes how to solve the problem that a VDC cannot be deleted and a message is displayed indicating that resources are occupied.
Symptom
The VDC fails to be deleted on the SC page, and a message is displayed indicating that resources are occupied. Or the project fails to be deleted, and a message is displayed indicating that resources are occupied.
Applicable Version
FusionCloud 6.3.X version
Cause
The possible causes are as follows:
1. Cloud service problems
2. The cloud service resources are manually deleted from the background.
3. Resources are deleted from the OM.
Fault Locating
Check cloud service information.
1. Collect the total quota usage of the target cloud service under the project under the cloud service page. (In case 2, only resources that are not created in the cloud service page or recycle bin need to be confirmed.)
2. Query the project ID of the project in the VDC on the operation side. (You can select project ID in the upper right corner of the project list on the project management page.) VDCID (You can query the VDC name on the page and run select * from vdcs where name=''; In the VDCS table in the database.)
3. Log in to the deployment plane, relational database, and query the IP address of the tenant master database node.
4. Log in to the server using the IP address. The user name and password are as follows: dbuser /Y7xohbheY!
After the login is successful, run the following command:
/opt/mysql/bin/mysql -udbuser -p 'Admin@123' -S /opt/mysql/data/tenantdbsvr*/*sock
Run the following command:
use movdcservicedb;
The VDC service database has been deployed.
Run the following command:
1) select * from vdc_quota_usages where vdc_id =' 'and project_id ='' and service_id =''; (vdc_id and project_id are queried in step 2. The service_id cloud host is ecs, the EVS disk is evs.
And the VPC is vpc. You can also use select * from vdc_quota_usages where vdc_id ='' and project_id =' '.) obtain the service_id) of the cloud service in the VDC.
Obtain the query result and check whether the sum of the positive and negative values of the used field in the same resource (quota) field is the same as that on the VDC page. (This step is performed to check the resource usage of the problem VDC and problem project. In addition, obtain the resource (quota) field value from the query result for future use.)
2) update vdc_quota_usages set used = where vdc_id =' 'and project_id ='' and service_id =' 'and resource ='' and..... (The and conditions can be added as required to locate the record to be modified. Exercise caution when performing this operation. Otherwise, many records may be modified .).
In case 1, run the SQL2 command to change the used value of one or more records to ensure that the value of used is the same as the quota of the cloud service.
In case 2, run the SQL2 command to change the used value of one or more records to 0.
You are advised to back up data before running the update statement.
After the execution is complete, refresh the page on the operation side to check whether the target is reached.
That's all, thanks!