Fix missing service stops in unstack.sh
Several services started by stack.sh were not properly stopped in unstack.sh, which could leave processes running and prevent clean restacking: - tcpdump: lib/tcpdump was not sourced, so stop_tcpdump was unavailable. Added source and stop call when tcpdump service is enabled. - s-container-sync: Swift's container-sync daemon was started via run_process but not explicitly stopped. Added stop_process call in stop_swift function. - ldap: The stop_ldap function existed but was never called. Added stop call in UNSTACK_ALL section, consistent with mysql/rabbit handling. These fixes ensure all services started by stack.sh are properly stopped by unstack.sh, allowing clean restacking. Generated-By: Cursor claude-opus-4.5 Change-Id: I8bcc6fe82264bb35a616dae39f4216ba6200b547 Signed-off-by: Sean Mooney <work@seanmooney.info>
This commit is contained in:
@@ -838,6 +838,8 @@ function stop_swift {
|
||||
for type in proxy object container account; do
|
||||
stop_process s-${type}
|
||||
done
|
||||
# Stop the container-sync daemon if it was started
|
||||
stop_process s-container-sync
|
||||
# Blast out any stragglers
|
||||
pkill -f swift- || true
|
||||
}
|
||||
|
||||
10
unstack.sh
10
unstack.sh
@@ -73,6 +73,7 @@ source $TOP_DIR/lib/neutron
|
||||
source $TOP_DIR/lib/ldap
|
||||
source $TOP_DIR/lib/dstat
|
||||
source $TOP_DIR/lib/atop
|
||||
source $TOP_DIR/lib/tcpdump
|
||||
source $TOP_DIR/lib/etcd3
|
||||
|
||||
# Extras Source
|
||||
@@ -162,6 +163,11 @@ if [[ -n "$UNSTACK_ALL" ]]; then
|
||||
if is_service_enabled rabbit; then
|
||||
stop_service rabbitmq-server
|
||||
fi
|
||||
|
||||
# Stop LDAP server
|
||||
if is_service_enabled ldap; then
|
||||
stop_ldap
|
||||
fi
|
||||
fi
|
||||
|
||||
if is_service_enabled neutron; then
|
||||
@@ -178,6 +184,10 @@ if is_service_enabled openstack-cli-server; then
|
||||
stop_service devstack@openstack-cli-server
|
||||
fi
|
||||
|
||||
if is_service_enabled tcpdump; then
|
||||
stop_tcpdump
|
||||
fi
|
||||
|
||||
stop_dstat
|
||||
|
||||
if is_service_enabled atop; then
|
||||
|
||||
Reference in New Issue
Block a user