summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2011-02-11 12:35:37 -0800
committerAndrew Evans <aevans@nicira.com>2011-02-11 13:14:39 -0800
commita49fe70cdeeac9e5d451c5def84a8db69970bb0f (patch)
tree07af2852935230177fbd53e9da96fe01168720b4
parent34edeccfd8d4273844d12c85fe38ec47002c47cd (diff)
downloadopenvswitch-a49fe70cdeeac9e5d451c5def84a8db69970bb0f.tar.gz
xenserver: Rename ovs-external-ids to ovs-xapi-sync.
With commit 5692e3 (xenserver: Set fail_mode on internal bridges.), the responsibilities of ovs-external-ids got expanded beyond just monitoring external-ids. This commit renames the script to more accurately describe its job. Signed-off-by: Justin Pettit <jpettit@nicira.com>
-rw-r--r--xenserver/README5
-rw-r--r--xenserver/automake.mk2
-rwxr-xr-xxenserver/etc_init.d_openvswitch12
-rw-r--r--xenserver/openvswitch-xen.spec6
-rwxr-xr-xxenserver/usr_share_openvswitch_scripts_ovs-xapi-sync (renamed from xenserver/usr_share_openvswitch_scripts_ovs-external-ids)15
5 files changed, 23 insertions, 17 deletions
diff --git a/xenserver/README b/xenserver/README
index 7dee41a45..5023de25b 100644
--- a/xenserver/README
+++ b/xenserver/README
@@ -46,10 +46,11 @@ files are:
Open vSwitch-aware replacement for Citrix script of the same name.
- usr_share_openvswitch_scripts_ovs-external-ids
+ usr_share_openvswitch_scripts_ovs-xapi-sync
Daemon to monitor the external_ids columns of the Bridge and
- Interface OVSDB tables.
+ Interface OVSDB tables for changes that require interrogating
+ XAPI.
usr_share_openvswitch_scripts_sysconfig.template
diff --git a/xenserver/automake.mk b/xenserver/automake.mk
index aa5e7f5f2..6c0268d8c 100644
--- a/xenserver/automake.mk
+++ b/xenserver/automake.mk
@@ -23,6 +23,6 @@ EXTRA_DIST += \
xenserver/opt_xensource_libexec_interface-reconfigure \
xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \
xenserver/usr_sbin_xen-bugtool \
- xenserver/usr_share_openvswitch_scripts_ovs-external-ids \
+ xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync \
xenserver/usr_share_openvswitch_scripts_sysconfig.template \
xenserver/uuid.py
diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch
index 8df0ed8d3..34fbc9735 100755
--- a/xenserver/etc_init.d_openvswitch
+++ b/xenserver/etc_init.d_openvswitch
@@ -125,8 +125,8 @@ else
fi
function hup_monitor_external_ids {
- if [ -e /var/run/openvswitch/ovs-external-ids.pid ]; then
- action "Configuring Open vSwitch external IDs" kill -HUP `cat /var/run/openvswitch/ovs-external-ids.pid`
+ if [ -e /var/run/openvswitch/ovs-xapi-sync.pid ]; then
+ action "Configuring Open vSwitch external IDs" kill -HUP `cat /var/run/openvswitch/ovs-xapi-sync.pid`
fi
}
@@ -364,7 +364,7 @@ function start {
if [ -f /etc/xensource-inventory ]; then
# Start daemon to monitor external ids
PYTHONPATH=/usr/share/openvswitch/python \
- /usr/share/openvswitch/scripts/ovs-external-ids \
+ /usr/share/openvswitch/scripts/ovs-xapi-sync \
--pidfile --detach $monitor_opt "$VSWITCHD_OVSDB_SERVER"
fi
@@ -374,8 +374,8 @@ function start {
function stop {
stop_daemon VSWITCHD "$vswitchd"
stop_daemon OVSDB_SERVER "$ovsdb_server"
- if [ -e /var/run/openvswitch/ovs-external-ids.pid ]; then
- kill `cat /var/run/openvswitch/ovs-external-ids.pid`
+ if [ -e /var/run/openvswitch/ovs-xapi-sync.pid ]; then
+ kill `cat /var/run/openvswitch/ovs-xapi-sync.pid`
fi
rm -f /var/lock/subsys/openvswitch
}
@@ -444,7 +444,7 @@ case "$1" in
;;
reload|force-reload)
# Nothing to do to ovs-vswitchd and ovsdb-server as they keep their
- # configuration up-to-date all the time. HUP ovs-external-ids so it
+ # configuration up-to-date all the time. HUP ovs-xapi-sync so it
# re-runs.
hup_monitor_external_ids
;;
diff --git a/xenserver/openvswitch-xen.spec b/xenserver/openvswitch-xen.spec
index 9a533a838..1df6dff56 100644
--- a/xenserver/openvswitch-xen.spec
+++ b/xenserver/openvswitch-xen.spec
@@ -73,8 +73,8 @@ install -m 644 xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py \
$RPM_BUILD_ROOT/usr/share/openvswitch/scripts/InterfaceReconfigureVswitch.py
install -m 755 xenserver/etc_xensource_scripts_vif \
$RPM_BUILD_ROOT/usr/share/openvswitch/scripts/vif
-install -m 755 xenserver/usr_share_openvswitch_scripts_ovs-external-ids \
- $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovs-external-ids
+install -m 755 xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync \
+ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovs-xapi-sync
install -m 755 xenserver/usr_sbin_xen-bugtool \
$RPM_BUILD_ROOT/usr/share/openvswitch/scripts/xen-bugtool
install -m 755 xenserver/usr_share_openvswitch_scripts_sysconfig.template \
@@ -305,7 +305,7 @@ fi
/usr/share/openvswitch/python/ovs/timeval.py
/usr/share/openvswitch/python/ovs/util.py
/usr/share/openvswitch/python/uuid.py
-/usr/share/openvswitch/scripts/ovs-external-ids
+/usr/share/openvswitch/scripts/ovs-xapi-sync
/usr/share/openvswitch/scripts/interface-reconfigure
/usr/share/openvswitch/scripts/InterfaceReconfigure.py
/usr/share/openvswitch/scripts/InterfaceReconfigureBridge.py
diff --git a/xenserver/usr_share_openvswitch_scripts_ovs-external-ids b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync
index 77283fe91..4d030fd05 100755
--- a/xenserver/usr_share_openvswitch_scripts_ovs-external-ids
+++ b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync
@@ -15,9 +15,12 @@
# A daemon to monitor the external_ids columns of the Bridge and
-# Interface OVSDB tables. Its primary responsibility is to set the
-# "bridge-id" and "iface-id" keys in the Bridge and Interface tables,
-# respectively.
+# Interface OVSDB tables for changes that require interrogating XAPI.
+# Its responsibilities include:
+#
+# - Set the "bridge-id" key in the Bridge table.
+# - Set the "iface-id" key in the Interface table.
+# - Set the fail-mode on internal bridges.
import getopt
import logging, logging.handlers
@@ -35,9 +38,9 @@ import ovs.util
import ovs.daemon
import ovs.db.idl
-s_log = logging.getLogger("ovs-external-ids")
+s_log = logging.getLogger("ovs-xapi-sync")
l_handler = logging.handlers.RotatingFileHandler(
- "/var/log/openvswitch/ovs-external-ids.log")
+ "/var/log/openvswitch/ovs-xapi-sync.log")
l_formatter = logging.Formatter('%(filename)s: %(levelname)s: %(message)s')
l_handler.setFormatter(l_formatter)
s_log.addHandler(l_handler)
@@ -124,6 +127,8 @@ def set_external_id(table, record, key, value):
col = 'external-ids:"' + key + '"="' + value + '"'
call_vsctl(["set", table, record, col])
+# XenServer does not call interface-reconfigure on internal networks,
+# which is where the fail-mode would normally be set.
def update_fail_mode(name):
rec = get_network_by_bridge(name)