Commit 45951b41 authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis

Run snf-network-dnshook only in primary node

Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
parent 934ea5b7
......@@ -77,6 +77,9 @@ update_dns () {
# Main starts here
host=$(hostname)
domain=$(hostname -d)
INSTANCE=$GANETI_INSTANCE_NAME
# Exit if we do not have instance name.
......@@ -85,6 +88,11 @@ if [ -z "$INSTANCE" ]; then
exit 0
fi
# Run only in primary node of instance
if [ "$GANETI_INSTANCE_PRIMARY" != "$host.$domain" ]; then
exit 0
fi
# This runs only for instance modification
if [ "x$GANETI_OP_CODE" = "xOP_INSTANCE_SET_PARAMS" ]; then
query_dns
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment