Describe the bug
Summary
After upgrading an OKD cluster from 4.14 to 4.20, some nodes may fail to start ovsdb-server.service.
The affected node has inconsistent openvswitch account information:
/etc/passwd resolves openvswitch to UID 977
- NSS
altfiles resolves openvswitch to UID 800
/etc/openvswitch is owned by UID 800
ovsdb-server resolves the openvswitch service account to UID 977
As a result, ovsdb-server cannot create /etc/openvswitch/conf.db or its lock file.
Environment
- OKD upgrade: 4.14 → 4.20
- Open vSwitch:
openvswitch3.5-3.5.0-6.el10s.x86_64
The issue was observed following the OKD 4.14 -> 4.20 upgrade.
Symptoms
ovsdb-server.service fails with:
/etc/openvswitch/conf.db does not exist
/etc/openvswitch/.conf.db.~lock~: failed to open lock file: Permission denied
ovsdb-tool: I/O error: /etc/openvswitch/conf.db: failed to lock lockfile (Resource temporarily unavailable)
Creating empty database /etc/openvswitch/conf.db ... failed!
The service also reports:
chown: cannot access '/run/openvswitch': No such file or directory
The missing /run/openvswitch directory does not appear to be the primary failure, because the working node also initially reports the directory as missing during startup and subsequently starts successfully.
Account mismatch
On the affected node:
$ cat /etc/passwd
root:x:0:0:Super User:/root:/bin/bash
core:x:1000:1000:CoreOS Admin:/var/home/core:/bin/bash
openvswitch:x:977:977:Open vSwitch Daemons:/:/usr/sbin/nologin
unbound:x:976:976:Unbound DNS resolver:/var/lib/unbound:/usr/sbin/nologin
However:
$ getent passwd 800
openvswitch:x:800:800::/:/sbin/nologin
The NSS configuration is:
$ grep '^passwd:' /etc/nsswitch.conf
passwd: files altfiles sss systemd
The UID 800 entry comes specifically from altfiles:
$ getent -s files passwd 800
$ getent -s altfiles passwd 800
openvswitch:x:800:800::/:/sbin/nologin
Meanwhile:
$ getent passwd openvswitch
openvswitch:x:977:977:Open vSwitch Daemons:/:/usr/sbin/nologin
Therefore the node effectively has two different openvswitch identities depending on the NSS lookup:
/etc/passwd:
openvswitch -> UID 977
NSS altfiles:
openvswitch -> UID 800
Filesystem ownership
/etc/openvswitch is owned by UID 800:
$ sudo stat -c '%n uid=%u gid=%g mode=%a type=%F' /etc/openvswitch
/etc/openvswitch uid=800 gid=800 mode=755 type=directory
$ sudo stat -c '%n uid=%u gid=%g mode=%a type=%F' /etc/openvswitch/default.conf
/etc/openvswitch/default.conf uid=800 gid=800 mode=644 type=regular file
But:
$ id openvswitch
uid=977(openvswitch) gid=977(openvswitch) groups=977(openvswitch),978(hugetlbfs),801(hugetlbfs)
Consequently:
$ sudo -u openvswitch touch /etc/openvswitch/testfile
touch: cannot touch '/etc/openvswitch/testfile': Permission denied
This prevents ovsdb-server from creating its database and lock file.
Working node comparison
A working node has the expected UID 800 identity:
$ id openvswitch
uid=800(openvswitch) gid=800(openvswitch) groups=800(openvswitch),801(hugetlbfs)
$ getent passwd openvswitch
openvswitch:x:800:800::/:/sbin/nologin
Both nodes have the same OVS package:
openvswitch3.5-3.5.0-6.el10s.x86_64
SELinux
SELinux is enforcing:
The OVS directory has the expected context:
$ matchpathcon /etc/openvswitch
/etc/openvswitch system_u:object_r:openvswitch_rw_t:s0
Running:
$ sudo restorecon -Rv /etc/openvswitch
does not resolve the problem.
No relevant OVS SELinux AVC denial was found.
OVS configuration
The service configuration specifies:
OVS_USER_ID="openvswitch:hugetlbfs"
The expected OVS configuration therefore assumes the openvswitch account resolves to the same UID that owns the OVS configuration/database directory.
Expected behavior
After upgrading from OKD 4.14 to 4.20, the openvswitch service account should remain consistent across:
/etc/passwd
- NSS
altfiles
- filesystem ownership
- OVS service configuration
The openvswitch daemon should be able to create:
/etc/openvswitch/conf.db
/etc/openvswitch/.conf.db.~lock~
Actual behavior
Following the 4.14 → 4.20 upgrade, the affected node has:
/etc/passwd -> openvswitch UID 977
NSS altfiles -> openvswitch UID 800
/etc/openvswitch -> UID 800
ovsdb-server -> UID 977
This results in:
ovsdb-server
|
| runs as UID 977
v
/etc/openvswitch
|
| owned by UID 800
X
Permission denied
Questions
- What changed between OKD 4.14 and 4.20 that can result in the
openvswitch account being assigned UID 977 while an altfiles entry still provides UID 800?
- Is there a known migration issue involving
libnss-altfiles, system users, or OVS package transitions during the 4.14 → 4.20 upgrade?
- Which component is responsible for the UID 800
openvswitch entry in altfiles?
- What is the supported remediation for nodes that already have this inconsistent state?
- Should the upgrade process reconcile the
openvswitch UID and existing /etc/openvswitch file ownership?
- Could this affect only nodes that had an older OVS/system-account configuration before the upgrade?
Reproduction / investigation
The key difference can be demonstrated with:
$ getent -s files passwd 800
$ getent -s altfiles passwd 800
openvswitch:x:800:800::/:/sbin/nologin
$ getent passwd openvswitch
openvswitch:x:977:977:Open vSwitch Daemons:/:/usr/sbin/nologin
This suggests that the upgrade leaves behind an openvswitch identity in altfiles with UID 800 while the current /etc/passwd definition uses UID 977.
Impact
Nodes affected by this condition cannot start ovsdb-server, which prevents the Open vSwitch stack from initializing correctly on those nodes.
The issue is particularly problematic because the error presented by ovsdb-tool appears as a lock/resource error:
failed to lock lockfile (Resource temporarily unavailable)
while the underlying cause is that the daemon cannot create the lock file due to the UID mismatch.
Version
4.20.0-okd-scos.17
Reproducibility
100% when following exact upgrade path
Log Bundle
No response
Describe the bug
Summary
After upgrading an OKD cluster from 4.14 to 4.20, some nodes may fail to start
ovsdb-server.service.The affected node has inconsistent
openvswitchaccount information:/etc/passwdresolvesopenvswitchto UID 977altfilesresolvesopenvswitchto UID 800/etc/openvswitchis owned by UID 800ovsdb-serverresolves theopenvswitchservice account to UID 977As a result,
ovsdb-servercannot create/etc/openvswitch/conf.dbor its lock file.Environment
openvswitch3.5-3.5.0-6.el10s.x86_64The issue was observed following the OKD 4.14 -> 4.20 upgrade.
Symptoms
ovsdb-server.servicefails with:The service also reports:
The missing
/run/openvswitchdirectory does not appear to be the primary failure, because the working node also initially reports the directory as missing during startup and subsequently starts successfully.Account mismatch
On the affected node:
However:
The NSS configuration is:
The UID 800 entry comes specifically from
altfiles:Meanwhile:
Therefore the node effectively has two different
openvswitchidentities depending on the NSS lookup:Filesystem ownership
/etc/openvswitchis owned by UID 800:But:
Consequently:
This prevents
ovsdb-serverfrom creating its database and lock file.Working node comparison
A working node has the expected UID 800 identity:
Both nodes have the same OVS package:
SELinux
SELinux is enforcing:
The OVS directory has the expected context:
Running:
$ sudo restorecon -Rv /etc/openvswitchdoes not resolve the problem.
No relevant OVS SELinux AVC denial was found.
OVS configuration
The service configuration specifies:
The expected OVS configuration therefore assumes the
openvswitchaccount resolves to the same UID that owns the OVS configuration/database directory.Expected behavior
After upgrading from OKD 4.14 to 4.20, the
openvswitchservice account should remain consistent across:/etc/passwdaltfilesThe
openvswitchdaemon should be able to create:Actual behavior
Following the 4.14 → 4.20 upgrade, the affected node has:
This results in:
Questions
openvswitchaccount being assigned UID 977 while analtfilesentry still provides UID 800?libnss-altfiles, system users, or OVS package transitions during the 4.14 → 4.20 upgrade?openvswitchentry inaltfiles?openvswitchUID and existing/etc/openvswitchfile ownership?Reproduction / investigation
The key difference can be demonstrated with:
This suggests that the upgrade leaves behind an
openvswitchidentity inaltfileswith UID 800 while the current/etc/passwddefinition uses UID 977.Impact
Nodes affected by this condition cannot start
ovsdb-server, which prevents the Open vSwitch stack from initializing correctly on those nodes.The issue is particularly problematic because the error presented by
ovsdb-toolappears as a lock/resource error:while the underlying cause is that the daemon cannot create the lock file due to the UID mismatch.
Version
4.20.0-okd-scos.17
Reproducibility
100% when following exact upgrade path
Log Bundle
No response