X Tutup
Skip to content

Commit 2df8cce

Browse files
committed
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>
1 parent efb34ca commit 2df8cce

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,8 @@ function stop_swift {
838838
for type in proxy object container account; do
839839
stop_process s-${type}
840840
done
841+
# Stop the container-sync daemon if it was started
842+
stop_process s-container-sync
841843
# Blast out any stragglers
842844
pkill -f swift- || true
843845
}

unstack.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ source $TOP_DIR/lib/neutron
7373
source $TOP_DIR/lib/ldap
7474
source $TOP_DIR/lib/dstat
7575
source $TOP_DIR/lib/atop
76+
source $TOP_DIR/lib/tcpdump
7677
source $TOP_DIR/lib/etcd3
7778

7879
# Extras Source
@@ -162,6 +163,11 @@ if [[ -n "$UNSTACK_ALL" ]]; then
162163
if is_service_enabled rabbit; then
163164
stop_service rabbitmq-server
164165
fi
166+
167+
# Stop LDAP server
168+
if is_service_enabled ldap; then
169+
stop_ldap
170+
fi
165171
fi
166172

167173
if is_service_enabled neutron; then
@@ -178,6 +184,10 @@ if is_service_enabled openstack-cli-server; then
178184
stop_service devstack@openstack-cli-server
179185
fi
180186

187+
if is_service_enabled tcpdump; then
188+
stop_tcpdump
189+
fi
190+
181191
stop_dstat
182192

183193
if is_service_enabled atop; then

0 commit comments

Comments
 (0)
X Tutup