On 08/11/2017 07:12 PM, Aaron Conole wrote: > Timothy Redaelli <tredae...@redhat.com> writes: > >> Use ovs-ctl --delete-transient-ports-on-boot to start ovsdb-server. >> >> This feature can be disabled by appending --no-delete-transient-ports-on-boot >> to OPTIONS in /etc/sysconfig/openvswitch >> >> Signed-off-by: Timothy Redaelli <tredae...@redhat.com> >> --- >> rhel/usr_lib_systemd_system_ovsdb-server.service | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service >> b/rhel/usr_lib_systemd_system_ovsdb-server.service >> index 7acd25f78..42473161e 100644 >> --- a/rhel/usr_lib_systemd_system_ovsdb-server.service >> +++ b/rhel/usr_lib_systemd_system_ovsdb-server.service >> @@ -10,14 +10,14 @@ Type=forking >> Restart=on-failure >> EnvironmentFile=/etc/openvswitch/default.conf >> EnvironmentFile=-/etc/sysconfig/openvswitch >> +ExecStartPre=/usr/bin/mkdir -p /var/run/openvswitch >> ExecStartPre=/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch >> ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ >> --no-ovs-vswitchd --no-monitor --system-id=random \ >> + --delete-transient-ports-on-boot \ >> --ovs-user=${OVS_USER_ID} \ >> start $OPTIONS >> ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop >> ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd \ >> --ovs-user=${OVS_USER_ID} \ >> --no-monitor restart $OPTIONS >> -RuntimeDirectory=openvswitch >> -RuntimeDirectoryMode=0755 > > I'm not sure about this change. One thing that's nice is the way > systemd will cleanup the runtime directories when this is done. I think > this can leave it around. > > I realize that under rhel (and fedora), the /run mountpoint is tmpfs. > > Is there another way we could accomodate this? Does a db flag make > sense?
I don't think we can use db since we need that flags to be reset on each reboot (that's the reason I use /run). In the previous patchset this run directory was created by using tmpfiles.d, but unlucky tmpfiles.d cannot use environment files, so you can't use ${OVS_USER_ID}. If cleanup is needed, but imho it should be done by ovs-ctl or ovs-vswitchd/ovsdb-server directly, we may do the cleanup on ExecStopPost. _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev