[ovs-dev] [PATCH] redhat: fix upgrades where group doesn't exist
Aaron Conole
aconole at redhat.com
Mon Aug 14 20:18:14 UTC 2017
The upgrade from older Open vSwitch versions on RHEL will try, as much as
possible, to preserve the system. This means no new users or groups are
created. As an effect, it's possible for the chown to fail, because the
hugetlbfs group may not exist. While it did on my systems, it was not
there on others.
This change allows the ExecStartPre commands to fail. In the case that the
user doesn't use DPDK, it won't matter anyway.
Fixes: e3e738a3d058 ('redhat: allow dpdk to also run as non-root user')
Signed-off-by: Aaron Conole <aconole at redhat.com>
Reported-by: Jean-Tsung Hsiao <jhsiao at redhat.com>
Tested-by: Jean-Tsung Hsiao <jhsiao at redhat.com>
---
rhel/usr_lib_systemd_system_ovs-vswitchd.service.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
index bf0f058..c6d9aa1 100644
--- a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
+++ b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
@@ -14,8 +14,8 @@ Environment=HOME=/var/run/openvswitch
EnvironmentFile=/etc/openvswitch/default.conf
EnvironmentFile=-/etc/sysconfig/openvswitch
@begin_dpdk@
-ExecStartPre=/usr/bin/chown :hugetlbfs /dev/hugepages
-ExecStartPre=/usr/bin/chmod 0775 /dev/hugepages
+ExecStartPre=-/usr/bin/chown :hugetlbfs /dev/hugepages
+ExecStartPre=-/usr/bin/chmod 0775 /dev/hugepages
@end_dpdk@
ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
--no-ovsdb-server --no-monitor --system-id=random \
--
2.9.4
More information about the dev
mailing list