Similar to [1] and there were already fixes related to it [2]. I did not track the cause of this specific bit but could be just the same thing.
[1] https://github.com/systemd/systemd/issues/12713 [2] https://github.com/openvswitch/ovs/commit/7a65e5a9252ac06df62707a571931f501747ecfc -----Original Message----- From: Aaron Conole <[email protected]> To: Gregory Rose <[email protected]> Cc: Jaime Caamaño Ruiz <[email protected]>, [email protected], Aaron Conole <[email protected]>, Flavio Leitner <[email protected]> Subject: Re: [ovs-dev] [PATCH] rhel: Fix reload of OVS_USER_ID on startup Date: Wed, 13 May 2020 13:57:21 -0400 Gregory Rose <[email protected]> writes: > On 5/12/2020 9:38 AM, Jaime Caamaño Ruiz wrote: > > OVS_USER_ID was being picked up from a previously existing > > openvswitch.useropts rendering innefective any configuration change > > through sysconfig. > > > > There is no ordering between Exec* and Environment* stanzas of > > systemd, > > full Enviroment* is always loaded before each Exec*. We make > > sure that openvswitch.useropts is removed in a first Exec so that a > > fresh OVS_USER_ID can be picked up from config in successive Exec*. > > > > Fixes: 94e1e8b ("rhel: run ovn with the same user as ovs") > > Signed-off-by: Jaime Caamaño Ruiz <[email protected]> > > --- > > rhel/usr_lib_systemd_system_ovsdb-server.service | 10 ++++++++-- > > 1 file changed, 8 insertions(+), 2 deletions(-) > > > > diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service > > b/rhel/usr_lib_systemd_system_ovsdb-server.service > > index 4c170c09b..98338b9df 100644 > > --- a/rhel/usr_lib_systemd_system_ovsdb-server.service > > +++ b/rhel/usr_lib_systemd_system_ovsdb-server.service > > @@ -11,10 +11,16 @@ PIDFile=/var/run/openvswitch/ovsdb-server.pid > > Restart=on-failure > > EnvironmentFile=/etc/openvswitch/default.conf > > EnvironmentFile=-/etc/sysconfig/openvswitch > > +EnvironmentFile=-/run/openvswitch.useropts > > + > > +# Environment is reloaded for each Exec*, make sure to > > +# remove openvswitch.useropts first to reload a fresh > > +# OVS_USER_ID from default.conf or sysconfig. > > +ExecStartPre=/usr/bin/rm -f /run/openvswitch.useropts > > + > > ExecStartPre=-/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch > > /var/log/openvswitch > > -ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch.useropts; > > /usr/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > > > /run/openvswitch.useropts' > > +ExecStartPre=/bin/sh -c '/usr/bin/echo > > "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts' > > ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; > > then /usr/bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> > > /run/openvswitch.useropts; fi' > > -EnvironmentFile=-/run/openvswitch.useropts > > ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ > > --no-ovs-vswitchd --no-monitor --system-id=random \ > > ${OVS_USER_OPT} \ > > > > Hi Jaime, > > This patch looks fine to me but I'm going to CC Aaron and Flavio at > Red Hat to see if they have any comments. If they have no further > comments then: > > Acked-by: Greg Rose <[email protected]> Hrrm... some behavior change in systemd, I guess? Acked-by: Aaron Conole <[email protected]> _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
