xenserver: reload sends SIGHUP to monitor-external-ids
authorEthan Jackson <ethan@nicira.com>
Fri, 17 Sep 2010 23:05:04 +0000 (16:05 -0700)
committerEthan Jackson <ethan@nicira.com>
Tue, 21 Sep 2010 20:37:03 +0000 (13:37 -0700)
When the init script's reload function is called it will send a
SIGHUP to monitor-external-ids.  This will cause
monitor-external-ids to re-generate everything.

Feature #3668.

xenserver/etc_init.d_openvswitch

index 68079fcf524d1f20409d8d058002a0c36247882d..2827653238b43ab4c3dd4f4a68127b73bb010764 100755 (executable)
@@ -117,6 +117,12 @@ else
     monitor_opt=
 fi
 
+function hup_monitor_external_ids {
+    if [ -e /var/run/openvswitch/monitor-external-ids.pid ]; then
+        action "Configuring Open vSwitch external IDs" kill -HUP `cat /var/run/openvswitch/monitor-external-ids.pid`
+    fi
+}
+
 function dp_list {
     "$dpctl" show | grep '^dp[0-9]\+:' | cut -d':' -f 1
 }
@@ -380,8 +386,10 @@ case "$1" in
         restart
         ;;
     reload|force-reload)
-       # Nothing to do--ovs-vswitchd and ovsdb-server keep their configuration
-       # up-to-date all the time.
+        # Nothing to do to ovs-vswitchd and ovsdb-server as they keep their
+        # configuration up-to-date all the time.  HUP monitor-external-ids so it
+        # re-runs.
+        hup_monitor_external_ids
        ;;
     strace-vswitchd)
         shift