Univention Bugzilla – Bug 54476
Linux kernel API change: EISDIR -> EEXIST
Last modified: 2022-02-23 16:29:35 CET
univention.config_registry.backend contains code to atomically create the base*.conf files: <https://git.knut.univention.de/univention/ucs/-/blob/5.0-1/base/univention-config-registry/python/univention/config_registry/backend.py#L637-641> > try: > reg_file = os.open(self.file, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o644) … > except EnvironmentError as ex: > if ex.errno != errno.EEXIST: Do to an API change in the Linux Kernel v5.7-rc1~128 <https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.16.10&id=b94e0b32c899914f045ddf05949517d64fd32499> this is now broken: - Up to Linux 5.6 returned EEXIST even for directories - Since Linux 5.7 returns EISDIR for directories This is tested by <https://git.knut.univention.de/univention/ucs/-/blob/5.0-1/base/univention-config-registry/tests/test_backend.py#L81-83>, which now fails if the maggLinux Kernel of the build environment is new enough: Currently Debian-11-Bullseye and backports using Linux 5.10 are already affected. This both affects building on the host or in pbuilder or in Docker. Our new GitLab runners are affected because their kernel is newer. This currently blocks all build pipelines.
[5.0-1] b5962db4d3 fix[ucr]: Linux API change open(O_EXCL): EISDIR→EEXIST base/univention-config-registry/debian/changelog | 6 ++++++ base/univention-config-registry/python/univention/config_registry/backend.py | 9 +++++---- base/univention-config-registry/tests/test_backend.py | 5 +++-- doc/errata/staging/univention-config-registry.yaml | 11 +++++++++++ 4 files changed, 25 insertions(+), 6 deletions(-) [5.0-1] 6b66b7052d Bug #54476: univention-config-registry 15.0.7-18A~5.0.0.202202220928 base/univention-config-registry/tests/test_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Package: univention-config-registry Version: 15.0.7-18A~5.0.0.202202220928 Branch: ucs_5.0-0 Scope: errata5.0-1 [5.0-1] fd5813c737 Bug #54476: univention-config-registry 15.0.7-18A~5.0.0.202202220928 doc/errata/staging/univention-config-registry.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) QA: ucslint <https://git.knut.univention.de/univention/ucs/-/jobs/373623> QA: build <https://git.knut.univention.de/univention/ucs/-/jobs/373624#L1872> FYI: No backport to 4.4-8 needed as their this is not tested, but the error is there too.
OK: Unittest on new kernel OK: Unittest on old kernel OK: Code review OK: yaml Verified
<https://errata.software-univention.de/#/?erratum=5.0x227>