summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2015-04-11 16:52:23 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2015-04-16 09:27:05 +0000
commit019743fde767b09c1ed823b4a2418eb71e27ee4c (patch)
tree0b7f065e377d37a0b579a67ae7b2047975c8d131
parent53c38ebe7a45d8c4cfd50ef73564783d53205a79 (diff)
downloaddefinitions-019743fde767b09c1ed823b4a2418eb71e27ee4c.tar.gz
Add ntp client sync config to swift storage nodes
Change-Id: Idd5ea038831e60a0a0ccc5620d81075ab421fbad
-rw-r--r--swift-storage.configure2
-rw-r--r--swift/etc/ntp.conf1
-rw-r--r--swift/manifest1
3 files changed, 4 insertions, 0 deletions
diff --git a/swift-storage.configure b/swift-storage.configure
index 182e0329..391b392a 100644
--- a/swift-storage.configure
+++ b/swift-storage.configure
@@ -49,6 +49,7 @@ MANDATORY_OPTIONS="SWIFT_HASH_PATH_PREFIX \
SWIFT_REPLICAS \
SWIFT_MIN_PART_HOURS \
SWIFT_STORAGE_DEVICES \
+ CONTROLLER_HOST_ADDRESS \
MANAGEMENT_INTERFACE_IP_ADDRESS"
for option in $MANDATORY_OPTIONS
@@ -75,6 +76,7 @@ validate_number "SWIFT_MIN_PART_HOURS" "$SWIFT_MIN_PART_HOURS"
validate_non_empty "SWIFT_HASH_PATH_PREFIX" "$SWIFT_HASH_PATH_PREFIX"
validate_non_empty "SWIFT_HASH_PATH_SUFFIX" "$SWIFT_HASH_PATH_SUFFIX"
validate_non_empty "SWIFT_REBALANCE_SEED" "$SWIFT_REBALANCE_SEED"
+validate_non_empty "CONTROLLER_HOST_ADDRESS" "$CONTROLLER_HOST_ADDRESS"
validate_non_empty "MANAGEMENT_INTERFACE_IP_ADDRESS" "$MANAGEMENT_INTERFACE_IP_ADDRESS"
mkdir -p "$ROOT/usr/lib/systemd/system/multi-user.target.wants" # ensure this exists before we make symlinks
diff --git a/swift/etc/ntp.conf b/swift/etc/ntp.conf
new file mode 100644
index 00000000..617a41c9
--- /dev/null
+++ b/swift/etc/ntp.conf
@@ -0,0 +1 @@
+server {{ CONTROLLER_HOST_ADDRESS }} iburst
diff --git a/swift/manifest b/swift/manifest
index 6c1e2383..171b04fc 100644
--- a/swift/manifest
+++ b/swift/manifest
@@ -11,3 +11,4 @@
0100644 0 0 /usr/share/swift/etc/rsyncd.j2
0100644 0 0 /usr/lib/systemd/system/swift-storage-setup.service
0100644 0 0 /usr/lib/systemd/system/swift-storage.service
+template 0100644 0 0 /etc/ntp.conf