Bug 2004543
| Summary: | ownership of /var/log/openvswitch is changed after the openvswitch package is updated | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux Fast Datapath | Reporter: | Takashi Kajinami <tkajinam> | |
| Component: | openvswitch2.16 | Assignee: | Timothy Redaelli <tredaelli> | |
| Status: | CLOSED ERRATA | QA Contact: | Rick Alongi <ralongi> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | FDP 21.A | CC: | ctrautma, jhsiao, kfida, ralongi, tredaelli | |
| Target Milestone: | --- | |||
| Target Release: | FDP 21.I | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | openvswitch2.16-2.16.0-10.el8fdp | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2007290 (view as bug list) | Environment: | ||
| Last Closed: | 2021-12-09 15:37:03 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 2007290, 2007292 | |||
|
Description
Takashi Kajinami
2021-09-15 14:26:48 UTC
I'll paste the console log to explain what I tested in RHEL8.2 machine.
openvswitch2.13-2.13.0-39.el8fdp.x86_64 was initially installed
~~~
[root@node-0 ~]# dnf install openvswitch2.13-2.13.0-39.el8fdp.x86_64
...
~~~
The log directory was created and owned by openvswitch:openvswitch.
~~~
[root@node-0 ~]# ls -lah /var/log/openvswitch
total 4.0K
drwxr-x---. 2 openvswitch openvswitch 6 Jun 26 2020 .
drwxr-xr-x. 12 root root 4.0K Sep 15 09:43 ..
~~~
At this point openvswitch service is not started.
~~~
[root@node-0 ~]# sudo systemctl status openvswitch
● openvswitch.service - Open vSwitch
Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; disabled; vendor preset: disabled)
Active: inactive (dead)
~~~
OVS_USER_ID was set to openvswitch:hugetlbfs, which is the default defined in the package.
~~~
[root@node-0 ~]# cat /etc/sysconfig/openvswitch
### Configuration options for openvswitch
#
# Enable core files.
# This option should be set to "yes" or "no". The default is "yes".
# --force-corefiles=yes
#
# Set "nice" priority at which to run ovsdb-server:
# --ovsdb-server-priority=-10
#
# Set "nice" priority at which to run ovsdb-vswitchd:
# --ovs-vswitchd-priority=-10
#
# Pass or not --mlockall option to ovs-vswitchd.
# This option should be set to "yes" or "no". The default is "yes".
# Enabling this option can avoid networking interruptions due to
# system memory pressure in extraordinary situations, such as multiple
# concurrent VM import operations.
# --mlockall=yes
#
# Use valgrind:
# --ovs-vswitchd-wrapper=valgrind
# --ovsdb-server-wrapper=valgrind
#
# Specify additional options, for example to start with debug logs:
# --ovs-vswitchd-options='-vconsole:dbg -vfile:dbg'
# --ovsdb-server-options='-vconsole:dbg -vfile:dbg'
#
OPTIONS=""
# Uncomment and set the OVS User/Group value
OVS_USER_ID="openvswitch:hugetlbfs"
~~~
Then the openvswitch service was started.
~~~
[root@node-0 ~]# systemctl start openvswitch
[root@node-0 ~]#
[root@node-0 ~]# systemctl status openvswitch
● openvswitch.service - Open vSwitch
Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; disabled; vendor preset: disabled)
Active: active (exited) since Wed 2021-09-15 09:48:49 EDT; 5s ago
Process: 15766 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 15766 (code=exited, status=0/SUCCESS)
Sep 15 09:48:49 node-0.ovstest.lab.pnq2.cee.redhat.com systemd[1]: Starting Open vSwitch...
Sep 15 09:48:49 node-0.ovstest.lab.pnq2.cee.redhat.com systemd[1]: Started Open vSwitch.
~~~
The log directory was chowned.
~~~
[root@node-0 ~]# sudo ls -la /var/log/openvswitch
total 12
drwxr-x---. 2 openvswitch hugetlbfs 54 Sep 15 09:48 .
drwxr-xr-x. 12 root root 4096 Sep 15 09:43 ..
-rw-r-----. 1 openvswitch hugetlbfs 346 Sep 15 09:48 ovsdb-server.log
-rw-r-----. 1 openvswitch hugetlbfs 621 Sep 15 09:48 ovs-vswitchd.log
[root@node-0 ~]#
~~~
The openvswitch2.13 package was updated to the current latest.
~~~
[root@node-0 ~]# sudo dnf update -y openvswitch2.13
Last metadata expiration check: 0:23:00 ago on Wed 15 Sep 2021 09:30:35 AM EDT.
Dependencies resolved.
==============================================================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================================================
Upgrading:
openvswitch2.13 x86_64 2.13.0-120.el8fdp rhosp-rhel-8.2-fdp 13 M
Transaction Summary
==============================================================================================================================================================================================================================================
Upgrade 1 Package
Total download size: 13 M
Downloading Packages:
openvswitch2.13-2.13.0-120.el8fdp.x86_64.rpm 759 kB/s | 13 MB 00:17
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 759 kB/s | 13 MB 00:17
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: openvswitch2.13-2.13.0-120.el8fdp.x86_64 1/1
Running scriptlet: openvswitch2.13-2.13.0-120.el8fdp.x86_64 1/2
Upgrading : openvswitch2.13-2.13.0-120.el8fdp.x86_64 1/2
Running scriptlet: openvswitch2.13-2.13.0-120.el8fdp.x86_64 1/2
Running scriptlet: openvswitch2.13-2.13.0-39.el8fdp.x86_64 2/2
Cleanup : openvswitch2.13-2.13.0-39.el8fdp.x86_64 2/2
Running scriptlet: openvswitch2.13-2.13.0-39.el8fdp.x86_64 2/2
Verifying : openvswitch2.13-2.13.0-120.el8fdp.x86_64 1/2
Verifying : openvswitch2.13-2.13.0-39.el8fdp.x86_64 2/2
Upgraded:
openvswitch2.13-2.13.0-120.el8fdp.x86_64
Complete!
[root@node-0 ~]#
~~~
Owner of the log directory was reverted back to openvswitch:openvswitch.
~~~
[root@node-0 ~]# sudo ls -la /var/log/openvswitch/
total 12
drwxr-x---. 2 openvswitch openvswitch 54 Aug 2 18:17 .
drwxr-xr-x. 12 root root 4096 Sep 15 09:43 ..
-rw-r-----. 1 openvswitch hugetlbfs 346 Sep 15 09:48 ovsdb-server.log
-rw-r-----. 1 openvswitch hugetlbfs 621 Sep 15 09:48 ovs-vswitchd.log
[root@node-0 ~]# sudo systemctl status openvswitch
● openvswitch.service - Open vSwitch
Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; disabled; vendor preset: disabled)
Active: active (exited) since Wed 2021-09-15 09:48:49 EDT; 5min ago
Main PID: 15766 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 23976)
Memory: 0B
CGroup: /system.slice/openvswitch.service
Sep 15 09:48:49 node-0.ovstest.lab.pnq2.cee.redhat.com systemd[1]: Starting Open vSwitch...
Sep 15 09:48:49 node-0.ovstest.lab.pnq2.cee.redhat.com systemd[1]: Started Open vSwitch.
~~~
Then the openvswitch service was restarted.
~~~
[root@node-0 ~]# sudo systemctl restart openvswitch
[root@node-0 ~]# sudo systemctl status openvswitch
● openvswitch.service - Open vSwitch
Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; disabled; vendor preset: disabled)
Active: active (exited) since Wed 2021-09-15 09:55:07 EDT; 5s ago
Process: 16289 ExecStop=/bin/true (code=exited, status=0/SUCCESS)
Process: 16469 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 16469 (code=exited, status=0/SUCCESS)
Sep 15 09:55:07 node-0.ovstest.lab.pnq2.cee.redhat.com systemd[1]: Starting Open vSwitch...
Sep 15 09:55:07 node-0.ovstest.lab.pnq2.cee.redhat.com systemd[1]: Started Open vSwitch.
~~~
Owner of the log directroy was set to openvswitch:hugetlbfs again.
~~~
[root@node-0 ~]# sudo ls -la /var/log/openvswitch/
total 12
drwxr-x---. 2 openvswitch hugetlbfs 54 Aug 2 18:17 .
drwxr-xr-x. 12 root root 4096 Sep 15 09:43 ..
-rw-r-----. 1 openvswitch hugetlbfs 525 Sep 15 09:55 ovsdb-server.log
-rw-r-----. 1 openvswitch hugetlbfs 1337 Sep 15 09:55 ovs-vswitchd.log
~~~
Reproduced issue using earlier OVS package. Verified that fix is in place using openvswitch2.16-2.16.0-16.el8fdp. OVS_USER_ID="openvswitch:hugetlbfs" (per /etc/sysconfig/openvswitch file) USER:GROUP settings for /var/log/openvswitch: Initial installation of openvswitch package before starting openvswitch.service: openvswitch:openvswitch After start of openvswitch.service: openvswitch:hugetlbfs After update of openvswitch package, before openvswitch.service restart: openvswitch:hugetlbfs After openvswitch.service reload: openvswitch:hugetlbfs After openvswitch.service restart: openvswitch:hugetlbfs Test cases added to upgrade testing. Results file here: https://url.corp.redhat.com/f031f70 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (openvswitch2.16 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:5056 |