Bug 1434180 - [RFE] [Undercloud] Delete undercloud without reinstalling
Summary: [RFE] [Undercloud] Delete undercloud without reinstalling
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: rhosp-director
Version: 11.0 (Ocata)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Angus Thomas
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-20 22:33 UTC by jliberma@redhat.com
Modified: 2022-08-16 13:06 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-18 18:01:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-4612 0 None None None 2022-08-16 13:06:45 UTC

Description jliberma@redhat.com 2017-03-20 22:33:42 UTC
Description of problem:

There are several scenarios where an operator may need to completely uninstall the undercloud without reinstalling the host or vm where it runs.

Currently there is a KB article: https://access.redhat.com/solutions/2210421

AFAIK this process is not QA or tracked across releases, so it can get out of date. Also, I am not aware that anyone in engineering has signed off on this process. 

We need: 
1. a openstack undercloud command that deletes the undercloud completely from a host (RFE)
2. documentation for manually deleting an undercloud (DOC)

Additional info:

Here is a quick and dirty script I distilled for the Kbase and my own field experience.

The networking section has not been tested extensively.

#!/usr/env bash
# from: https://access.redhat.com/solutions/2210421

# services
declare -a services=(
neutron-dhcp-agent.service
neutron-openvswitch-agent.service
neutron-ovs-cleanup.service
neutron-server.service
openstack-ironic-inspector-dnsmasq.service
openstack-nova-compute.service
openstack-nova-conductor.service
openstack-nova-scheduler.service
openstack-swift-account-reaper.service
openstack-swift-account.service
openstack-swift-container-updater.service
openstack-swift-container.service
openstack-swift-object-updater.service
openstack-swift-object.service
openstack-swift-proxy.service
openstack-zaqar.service
openstack-zaqar
keepalived
)

# files
declare -a files=(
/home/stack/.instack
/home/stack/stackrc
/home/stack/undercloud-passwords.conf
/root/stackrc
/root/tripleo-undercloud-passwords
/var/lib/ironic-inspector
/var/lib/mysql
/var/lib/rabbitmq
/var/opt/undercloud-stack
)

# directories
declare -a dirs=(
/etc/ceilometer
/etc/heat
/etc/glance 
/etc/horizon 
/etc/ironic
/etc/ironic-inspector
/etc/keystone
/etc/neutron 
/etc/nova 
/etc/swift 
/etc/haproxy
)

# packages
declare -a pkgs=(
rabbitmq-server 
mariadb
haproxy
openvswitch
keepalived 
$(rpm -qa | grep openstack)
$(rpm -qa | grep neutron)
$(rpm -qa | grep swift)
)

source stackrc
env | grep OS_

# delete swift containers
for i in $(swift list); do swift delete $i; done

# stop openstack services
for i in ${services[*]}; do sudo systemctl stop $i; done
for i in ${services[*]}; do sudo systemctl status $i; done

# remove files and directories
for i in ${files[*]}; do sudo rm -rf $i; done
for i in ${dirs[*]}; do sudo rm -rf $i; done

# remove pkgs
for i in ${pkgs[*]}; do sudo yum remove -y $i; done

# restore networking
mv  /etc/os-net-config/config.json  /etc/os-net-config/config.json.orig
mv /etc/sysconfig/network-scripts/ifcfg-br-ctlplane /etc/sysconfig/network-scripts/orig.ifcfg-br-ctlplane

##EOF

Comment 2 Kevin Carter 2020-11-18 18:01:44 UTC
With the introduction of the containerized undercloud, this is now possible without running through all of the mentioned steps. This RFE is being closed.


Note You need to log in before you can comment on or make changes to this bug.