Completely remove openstack from system after installation from devstack script
Asked Answered
H

3

6

I am installing OpenStack on my local machine via this link. But I am having trouble in completely removing installed components from my local machine. I ran following command:-

$ sudo ./unstack.sh
tgtadm: can't send the request to the tgt daemon, Transport endpoint is not connected
tgtd seems to be in a bad state, restarting...
stop: Unknown instance: 
tgt start/running, process 14629
tgt stop/waiting
Volume group "stack-volumes" not found
Skipping volume group stack-volumes

And file are still present in /opt/stack and /usr/local/bin/. But manually removing these file will not be a good option.

Harelip answered 27/3, 2013 at 12:35 Comment(0)
C
26

The unstack.sh script only stops the services without removing them. Devstack's folder contains a clean.sh script that removes openstack and dependencies so you can run something like this:

cd path/to/devstack

# There's no need to call unstack.sh explicitly
# clean.sh invokes that script itself.
./clean.sh
Crimpy answered 4/12, 2013 at 15:11 Comment(0)
A
7

Follow the following 3 steps:

  1. ./clean.sh
  2. rm -rf /opt/stack
  3. rm -rf /usr/local/bin (careful, this will remove everything installed to your local bin folder, which might include previously installed applications).

For more info of all the impacted files and directories this link.

Airedale answered 6/11, 2015 at 7:39 Comment(2)
Careful, there might be other things in /usr/local/bin prior to devstack.Panegyric
Highly recommend using rm -f /usr/local/bin/openstack* in place of step 3 as listed in this post. This command will forcefully remove the scripts openstack and openstack-inventory and any others that begin with "openstack" from your /usr/local/bin/ folder.Kyongkyoto
S
3

unstack doesn't clean out /opt/stack. or purge all dependency packages. or clean all eggs out of python.

I recommend running devstack in a VM. It's easy enough to simply remove the VM and rebuild from scratch.

Example shell script for creating a devstack VM for kvm:

#!/bin/sh

/usr/bin/vmbuilder kvm ubuntu -v --suite=oneiric --libvirt=qemu:///system --flavour=server --arch=amd64 --cpus=2 --mem=4096 --swapsize=2048 --rootsize=30480 --ip=192.168.122.236 --hostname=devstack --user=stack --name=stack --pass=stack --addpkg=git --addpkg=screen --addpkg=vim --addpkg=strace --addpkg=lsof --addpkg=nmap --addpkg=subversion --addpkg=acpid --addpkg=tcpdump --addpkg=python-pip --addpkg=wget --addpkg=htop --mirror=http://us.archive.ubuntu.com/ubuntu --components='main,universe' --addpkg=openssh-server --dns=8.8.8.8 --dest=/virts/devstack
Scholarship answered 27/3, 2013 at 18:12 Comment(1)
clean.sh may give you better mileage, unstack.sh does not for all reasons I raised.Scholarship

© 2022 - 2024 — McMap. All rights reserved.