Failure during add subcloud prevents subcloud from being added again
with the same name as the subcloud details are not cleaned up
properly. Fixes have been added for proper cleanup of dcorch database
tables, ansible subcloud inventory files, keystone endpoints, keystone
region, and addn_hosts_dc file when failure is encountered.
Test cases:
1. Add subcloud
2. Add subcloud with "--deploy-playbook"
3. Delete subcloud
4. Raise explicit exception in dcorch/objects/subcloud.py
5. Raise explicit exception in dcmanager/manager/subcloud_manager.py
Reviewed: https:/ /review. opendev. org/712574 /git.openstack. org/cgit/ starlingx/ distcloud/ commit/ ?id=3a1bf60cadd fa2e807d4f5996f f94fea7dde5477
Committed: https:/
Submitter: Zuul
Branch: master
commit 3a1bf60caddfa2e 807d4f5996ff94f ea7dde5477
Author: Jessica Castelino <email address hidden>
Date: Wed Mar 11 16:23:21 2020 -0400
Cleanup subcloud details when subcloud add fails
Failure during add subcloud prevents subcloud from being added again
with the same name as the subcloud details are not cleaned up
properly. Fixes have been added for proper cleanup of dcorch database
tables, ansible subcloud inventory files, keystone endpoints, keystone
region, and addn_hosts_dc file when failure is encountered.
Test cases: objects/ subcloud. py manager/ subcloud_ manager. py
1. Add subcloud
2. Add subcloud with "--deploy-playbook"
3. Delete subcloud
4. Raise explicit exception in dcorch/
5. Raise explicit exception in dcmanager/
Change-Id: Iedf172c3e9c3c4 bdb9b9482dc5d46 f072b3ccf61
Closes-Bug: 1862774
Signed-off-by: Jessica Castelino <email address hidden>