From ae788d6bc5eb2625632d80c5eae3a8fd319b2bb5 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Fri, 10 Apr 2015 11:26:06 +0100 Subject: Don't start swift storage services on controller --- swift-storage.configure | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'swift-storage.configure') diff --git a/swift-storage.configure b/swift-storage.configure index 9305c195..a7f264d0 100644 --- a/swift-storage.configure +++ b/swift-storage.configure @@ -79,12 +79,18 @@ validate_non_empty "MANAGEMENT_INTERFACE_IP_ADDRESS" "$MANAGEMENT_INTERFACE_IP_A mkdir -p "$ROOT/usr/lib/systemd/system/multi-user.target.wants" # ensure this exists before we make symlinks -ln -s "/usr/lib/systemd/system/rsync.service" \ - "$ROOT/usr/lib/systemd/system/multi-user.target.wants/rsync.service" -ln -s "/usr/lib/systemd/system/swift-storage.service" \ - "$ROOT/usr/lib/systemd/system/multi-user.target.wants/swift-storage.service" +# A swift controller needs some of the storage config +# but does not want any of the storage services enabled ln -s "/usr/lib/systemd/system/swift-storage-setup.service" \ - "$ROOT/usr/lib/systemd/system/multi-user.target.wants/swift-storage-setup.service" + "$ROOT/usr/lib/systemd/system/multi-user.target.wants/swift-storage-setup.service" + +if [[ $SWIFT_CONTROLLER = None ]] +then + ln -s "/usr/lib/systemd/system/rsync.service" \ + "$ROOT/usr/lib/systemd/system/multi-user.target.wants/rsync.service" + ln -s "/usr/lib/systemd/system/swift-storage.service" \ + "$ROOT/usr/lib/systemd/system/multi-user.target.wants/swift-storage.service" +fi # Build swift data structures (the rings) /usr/bin/ansible-playbook -i hosts swift-build-rings.yml -- cgit v1.2.1