[ovs-dev] [PATCH] Use 'RUNDIR' from make for rhel/ovn-controller.service

Russell Bryant russell at ovn.org
Fri Mar 4 19:25:13 UTC 2016


On Fri, Mar 4, 2016 at 1:49 PM, Flavio Leitner <fbl at sysclose.org> wrote:

> On Thu, 25 Feb 2016 12:15:10 +0530
> bschanmu at redhat.com wrote:
>
> > Perviously it was using the platform's runtime directory which can be
> > different from the runtime directory of ovsdb-server started by the
> > openvswitch service
> >
> > Signed-off-by: Babu Shanmugam <bschanmu at redhat.com>
> > ---
> >  rhel/.gitignore                                    |  1 +
> >  rhel/automake.mk                                   |  3 +++
> >  rhel/usr_lib_systemd_system_ovn-controller.service | 22
> ----------------------
> >  ...sr_lib_systemd_system_ovn-controller.service.in | 22
> ++++++++++++++++++++++
> >  4 files changed, 26 insertions(+), 22 deletions(-)
> >  delete mode 100644 rhel/usr_lib_systemd_system_ovn-controller.service
> >  create mode 100644 rhel/
> usr_lib_systemd_system_ovn-controller.service.in
> >
> > diff --git a/rhel/.gitignore b/rhel/.gitignore
> > index 164bb66..02b79b9 100644
> > --- a/rhel/.gitignore
> > +++ b/rhel/.gitignore
> > @@ -4,3 +4,4 @@ openvswitch-kmod-rhel6.spec
> >  openvswitch-kmod-fedora.spec
> >  openvswitch.spec
> >  openvswitch-fedora.spec
> > +usr_lib_systemd_system_ovn-controller.service
> > diff --git a/rhel/automake.mk b/rhel/automake.mk
> > index e484a93..90ce0b4 100644
> > --- a/rhel/automake.mk
> > +++ b/rhel/automake.mk
> > @@ -28,6 +28,7 @@ EXTRA_DIST += \
> >       rhel/usr_lib_systemd_system_openvswitch.service \
> >       rhel/usr_lib_systemd_system_openvswitch-nonetwork.service \
> >       rhel/usr_lib_systemd_system_ovn-controller.service \
> > +     rhel/usr_lib_systemd_system_ovn-controller.service.in \
> >       rhel/usr_lib_systemd_system_ovn-controller-vtep.service \
> >       rhel/usr_lib_systemd_system_ovn-northd.service
> >
> > @@ -50,3 +51,5 @@ $(srcdir)/rhel/openvswitch.spec: rhel/
> openvswitch.spec.in $(top_builddir)/config
> >
> >  $(srcdir)/rhel/openvswitch-fedora.spec: rhel/openvswitch-fedora.spec.in
> $(top_builddir)/config.status
> >       $(update_rhel_spec)
> > +
> > +$(srcdir)/rhel/usr_lib_systemd_system_ovn-controller.service: rhel/
> usr_lib_systemd_system_ovn-controller.service.in
> $(top_builddir)/config.status
> > diff --git a/rhel/usr_lib_systemd_system_ovn-controller.service
> b/rhel/usr_lib_systemd_system_ovn-controller.service
> > deleted file mode 100644
> > index 6b53ced..0000000
> > --- a/rhel/usr_lib_systemd_system_ovn-controller.service
> > +++ /dev/null
> > @@ -1,22 +0,0 @@
> > -#
> > -# You may override the following variables to customize ovn-controller
> behavior:
> > -#
> > -#   OVS_DB - Set this variable to the location of the ovsdb server that
> is
> > -#            serving the Open_vSwitch database for the local
> ovs-vswitchd.
> > -#            See the manpage for ovn-controller for more details on the
> > -#            format for the db location.
> > -#
> > -
> > -[Unit]
> > -Description=OVN controller daemon
> > -After=syslog.target
> > -Requires=openvswitch.service
> > -After=openvswitch.service
> > -
> > -[Service]
> > -Type=simple
> > -Environment=OVS_RUNDIR=%t/openvswitch
> > -Environment=OVS_DB=unix:%t/openvswitch/db.sock
> > -ExecStart=/usr/bin/ovn-controller -vconsole:emer -vsyslog:err
> -vfile:info \
> > -          --log-file=/var/log/openvswitch/ovn-controller.log \
> > -          --no-chdir --pidfile=${OVS_RUNDIR}/ovn-controller.pid
> ${OVS_DB}
> > diff --git a/rhel/usr_lib_systemd_system_ovn-controller.service.in
> b/rhel/usr_lib_systemd_system_ovn-controller.service.in
> > new file mode 100644
> > index 0000000..8373eb2
> > --- /dev/null
> > +++ b/rhel/usr_lib_systemd_system_ovn-controller.service.in
> > @@ -0,0 +1,22 @@
> > +#
> > +# You may override the following variables to customize ovn-controller
> behavior:
> > +#
> > +#   OVS_DB - Set this variable to the location of the ovsdb server that
> is
> > +#            serving the Open_vSwitch database for the local
> ovs-vswitchd.
> > +#            See the manpage for ovn-controller for more details on the
> > +#            format for the db location.
> > +#
> > +
> > +[Unit]
> > +Description=OVN controller daemon
> > +After=syslog.target
> > +Requires=openvswitch.service
> > +After=openvswitch.service
> > +
> > +[Service]
> > +Type=simple
> > +Environment=OVS_RUNDIR=@RUNDIR@
> > +Environment=OVS_DB=unix:@RUNDIR@/db.sock
> > +ExecStart=/usr/bin/ovn-controller -vconsole:emer -vsyslog:err
> -vfile:info \
> > +          --log-file=/var/log/openvswitch/ovn-controller.log \
> > +          --no-chdir --pidfile=${OVS_RUNDIR}/ovn-controller.pid
> ${OVS_DB}
>
> LGTM
>
> Acked-by: Flavio Leitner <fbl at sysclose.org>
>

Thanks, Flavio!

I'm failing to apply this, though.

$ wget https://patchwork.ozlabs.org/patch/587935/mbox/ -O - | git am
...
Applying: Use 'RUNDIR' from make for rhel/ovn-controller.service
error: patch failed: rhel/automake.mk:50
error: rhel/automake.mk: patch does not apply
Patch failed at 0001 Use 'RUNDIR' from make for rhel/ovn-controller.service
The copy of the patch that failed is found in:
   /home/rbryant/src/ovs/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


Babu, can you take a look?  Did you send this with "git send-email"?  If
not, can you try that?

Thanks,

-- 
Russell Bryant



More information about the dev mailing list