Describe the bug
Openstack compute node was deleted and redeployed with same hostname using shipyard redeploy server command. VM creation on the compute host failed. This issues didn't occur for all the computes redeployed but 1 out of 3.
Steps To Reproduce
Redeploy a server (openstack compute) using shipyard redeploy server and try to bring up a VM on the compute.
Expected behavior
Server should be redeployed and should be able to host VMs
Environment
Treasuremap version: v1.8
Treasuremp site type: stl1
Airshipctl version:
Operating system: Ubuntu18
Kernel version: 4.15.0-117-generic
Kubernetes version: "v1.17.2"
Go version:
Hypervisor level 0 (if applicable):
Hardware specs (e.g. 4 vCPUs, 16GB RAM, bare metal vs VM): 88 vCPUS, 376GB
Actual Behavior
While creating a VM the compute "No valid host was found" error, nova scheduler failed to find the hostname due to improper DB cleanup in msql old data are not removed and updated with new resources provider id.
Work Around
Login to Maria DB server:
mysql -u root -p
use nova;
select id,created_at,deleted_at,uuid,host from compute_nodes; # find the duplicate id,uuid which is deleted compute
select * from pci_devices where id=10;
delete from pci_devices where id=10
delete from compute_nodes where uuid='2bef4b2d-2056-4209-b355-844620d9a457'
use nova_api;
select * from resource_provider;
Note: update the "set uuid" from the nova compute_nodes table for newly created compute node UUID, "where name and uuid" check and update from nova_api resource_provider table.
update resource_providers set uuid='f34dfde2-bb5d-41a5-9467-96fac00e5f22' where name='ngxpr002c003.att-ngxp.bete.ericy.com' and uuid='ce55a771-ef3b-4b3e-8169-da19a849b3c8';
Describe the bug Openstack compute node was deleted and redeployed with same hostname using shipyard redeploy server command. VM creation on the compute host failed. This issues didn't occur for all the computes redeployed but 1 out of 3.
Steps To Reproduce Redeploy a server (openstack compute) using shipyard redeploy server and try to bring up a VM on the compute.
Expected behavior Server should be redeployed and should be able to host VMs
Environment
Actual Behavior While creating a VM the compute "No valid host was found" error, nova scheduler failed to find the hostname due to improper DB cleanup in msql old data are not removed and updated with new resources provider id.
Work Around Login to Maria DB server: