Merge "Make sure to cleanup swift on unstack/relaunch."
This commit is contained in:
commit
e029b500e5
@ -108,15 +108,16 @@ function configure_swift() {
|
|||||||
if [[ -e ${SWIFT_DATA_DIR}/drives/images/swift.img ]]; then
|
if [[ -e ${SWIFT_DATA_DIR}/drives/images/swift.img ]]; then
|
||||||
if egrep -q ${SWIFT_DATA_DIR}/drives/sdb1 /proc/mounts; then
|
if egrep -q ${SWIFT_DATA_DIR}/drives/sdb1 /proc/mounts; then
|
||||||
sudo umount ${SWIFT_DATA_DIR}/drives/sdb1
|
sudo umount ${SWIFT_DATA_DIR}/drives/sdb1
|
||||||
|
sudo rm -f ${SWIFT_DATA_DIR}/drives/images/swift.img
|
||||||
fi
|
fi
|
||||||
else
|
fi
|
||||||
|
|
||||||
mkdir -p ${SWIFT_DATA_DIR}/drives/images
|
mkdir -p ${SWIFT_DATA_DIR}/drives/images
|
||||||
sudo touch ${SWIFT_DATA_DIR}/drives/images/swift.img
|
sudo touch ${SWIFT_DATA_DIR}/drives/images/swift.img
|
||||||
sudo chown $USER: ${SWIFT_DATA_DIR}/drives/images/swift.img
|
sudo chown $USER: ${SWIFT_DATA_DIR}/drives/images/swift.img
|
||||||
|
|
||||||
dd if=/dev/zero of=${SWIFT_DATA_DIR}/drives/images/swift.img \
|
dd if=/dev/zero of=${SWIFT_DATA_DIR}/drives/images/swift.img \
|
||||||
bs=1024 count=0 seek=${SWIFT_LOOPBACK_DISK_SIZE}
|
bs=1024 count=0 seek=${SWIFT_LOOPBACK_DISK_SIZE}
|
||||||
fi
|
|
||||||
|
|
||||||
# Make a fresh XFS filesystem
|
# Make a fresh XFS filesystem
|
||||||
mkfs.xfs -f -i size=1024 ${SWIFT_DATA_DIR}/drives/images/swift.img
|
mkfs.xfs -f -i size=1024 ${SWIFT_DATA_DIR}/drives/images/swift.img
|
||||||
|
@ -65,6 +65,7 @@ fi
|
|||||||
# Swift runs daemons
|
# Swift runs daemons
|
||||||
if is_service_enabled swift; then
|
if is_service_enabled swift; then
|
||||||
stop_swift
|
stop_swift
|
||||||
|
cleanup_swift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Apache has the WSGI processes
|
# Apache has the WSGI processes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user