On Thu, Jul 24, 2014 at 2:14 PM, Andrew James <andrew.ja...@hp.com> wrote: > This adds the upstart job configuration file written by James Page from > Ubuntu's openvswitch-2.0.1+git20140120 package plus the changes proposed in > https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1314888 > > Signed-off-by: Andrew James <andrew.ja...@hp.com>
I have a few comments. * Applying this patch fails compilation. You need an entry in debian/automake.mk * Creating a debian package with your patch and installing on Ubuntu12.04 ended up replacing /etc/init.d/openvswitch-switch and linking it to /lib/init/upstart-job. Have you tested this? * Loosing /etc/init.d/openvswitch-switch creates a couple of problems. - It has the functionality of 'force-reload-kmod' that we need and the upstart job does not have it. - There are a couple of places in this repo that calls "/etc/init.d/openvswitch-switch" and those calls will fail. I also presume that there are third-party packages that use /etc/init.d/openvswitch-switch directly. * This upstart job does not have a dependency on $remote_fs $syslog. I think they are needed. You can read 'Notes on dependencies' in "debian/openvswitch-switch.README.Debian" of the master branch for more context. Thanks, Guru > --- > debian/openvswitch-switch.upstart | 47 > +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) > create mode 100644 debian/openvswitch-switch.upstart > > diff --git a/debian/openvswitch-switch.upstart > b/debian/openvswitch-switch.upstart > new file mode 100644 > index 0000000..d7a8978 > --- /dev/null > +++ b/debian/openvswitch-switch.upstart > @@ -0,0 +1,47 @@ > +# vim: set ft=upstart ts=2 et: > +description "Open vSwitch switch" > +author "James Page <james.p...@ubuntu.com>" > + > +emits ovs-up > +emits ovs-pre-down > + > +start on (local-filesystems and net-device-up IFACE=lo) > +stop on runlevel [!2345] > + > +pre-start script > + (test -x /usr/sbin/ovs-vswitchd && test -x /usr/sbin/ovsdb-server) || > exit 0 > + > + . /usr/share/openvswitch/scripts/ovs-lib > + test -e /etc/default/openvswitch-switch && . > /etc/default/openvswitch-switch > + > + if ovs_ctl load-kmod; then > + : > + else > + echo "Module has probably not been built for this kernel." > + if ! test -d /usr/share/doc/openvswitch-datapath-dkms; then > + echo "Install the openvswitch-datapath-dkms package." > + fi > + > + if test X"$OVS_MISSING_KMOD_OK" = Xyes; then > + # We're being invoked by the package postinst. Do not > + # fail package installation just because the kernel module > + # is not available. > + exit 0 > + fi > + fi > + set ovs_ctl start --system-id=random > + if test X"$FORCE_COREFILES" != X; then > + set "$@" --force-corefiles="$FORCE_COREFILES" > + fi > + set "$@" $OVS_CTL_OPTS > + "$@" || exit $? > + initctl emit ovs-up > +end script > + > +post-stop script > + . /usr/share/openvswitch/scripts/ovs-lib > + test -e /etc/default/openvswitch-switch && . > /etc/default/openvswitch-switch > + > + initctl emit ovs-pre-down > + ovs_ctl stop > +end script > -- > 2.0.1 > > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev