[ovs-dev] [ovs-git] Open vSwitch: xenserver: Make RPM install work again. (master)
Ian Campbell
Ian.Campbell at citrix.com
Mon Sep 14 09:23:57 UTC 2009
On Fri, 2009-09-11 at 22:49 +0100, dev at openvswitch.org wrote:
> commit ac9634f0af8d2cf8259a3cf7d7d6e19cc0d67457
> Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=ac9634f0af8d2cf8259a3cf7d7d6e19cc0d67457
> Author: Ben Pfaff <blp at nicira.com>
>
> xenserver: Make RPM install work again.
>
> The RPM install was generating a database cache in Python pickle format in
> /etc/ovs-vswitchd.conf, but interface-reconfigure was looking for it in
> XML format in /var/lib/openvswitch/dbcache. This fixes the problem, by
> adding an init-dbcache command to interface-reconfigure and then using that
> at RPM install time.
>
> This moves the database cache creation from %pre to %post. This is
> necessary so that interface-reconfigure is available from the install
> script.
FWIW the "rewrite-configuration" action for the management PIF should
have been sufficient for this. This is what
"/etc/init.d/management-interface stop" does in order to ensure that the
cache is correctly configured for use on next boot:
stop() {
[ -n "${INSTALLATION_UUID}" ] || return 0
echo -n
rm -f /var/lock/subsys/management-interface
PIF=$(xe pif-list host-uuid="${INSTALLATION_UUID}" management=true --minimal)
[ -n "${PIF}" ] || return 0
action $"Storing management interface configuration: " \
${INTERFACE_RECONFIGURE} --pif-uuid "${PIF}" --management rewrite-configuration
}
The vswitch version of interface reconfigure always writes a complete
cache covering all PIF objects so the actual interface used here isn't
really important anymore and as a cleanup in the future we may move to a
new action much like your new init-dbcache one.
Ian.
More information about the dev
mailing list