Martin Xu <martinxu9....@gmail.com> writes: > OVS init.d script calls ovs-ctl with $OVS_CTL_OPTS defined in the > config file. This variable is replaced by OPTIONS in systemd service > files. This patch addes $OVS_CTL_OPTS back to be passed along with $OPTIONS > for backward compatibility. > > VMware-BZ: #2036847 > > Signed-off-by: Martin Xu <martinxu9....@gmail.com> > CC: Aaron Conole <acon...@redhat.com> > ---
I'm not sure why there should be two variables in the sysconfig file for this. The following would preserve the old and not introduce a new variable (I think.. it's completely untested). I guess this is because the debian-distro openvswitch-switch.template file doesn't match the rhel-distro template file, and we want to make a common set of systemd scripts? Otherwise I don't see what the purpose is - what is the migration path that this is addressing? --- diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service index 09f946bb1..660ec75ef 100644 --- a/rhel/usr_lib_systemd_system_ovsdb-server.service +++ b/rhel/usr_lib_systemd_system_ovsdb-server.service @@ -12,6 +12,7 @@ EnvironmentFile=/etc/openvswitch/default.conf EnvironmentFile=-/etc/sysconfig/openvswitch ExecStartPre=/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi' +ExecStartPre=/bin/sh -c 'if [ "${OVS_CTL_OPTS}" != "" -a "${OPTIONS}" == "" ]; then /usr/bin/echo "OPTIONS=\"${OPTIONS} ${OVS_CTL_OPTS}\"" >> /run/openvswitch/useropts; fi' EnvironmentFile=-/run/openvswitch/useropts ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ --no-ovs-vswitchd --no-monitor --system-id=random \ --- _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev