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
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
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
}
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
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
}
;;
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
;;
$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 \
/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
# 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
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)
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)