Skip to content

Commit fd02bc7

Browse files
committed
move /etc/localtime symlinking to be el9 only
We added the symlinking for https://issues.redhat.com/browse/LOG-3117 because something changed between rhel8 and rhel9 to not generate this by default but we had containers that expected it to exist to be mounted. Let's continue to include this in RHEL9 but since the containers were fixed in [1] let's not include it in RHEL 10 based CoreOS. [1] openshift/cluster-logging-operator#1675
1 parent 4058699 commit fd02bc7

File tree

3 files changed

+27
-16
lines changed

3 files changed

+27
-16
lines changed

common.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,6 @@ postprocess:
181181
echo '# RHCOS-only: we follow the Fedora/upstream default' >> /usr/lib/systemd/system/basic.target
182182
echo 'Wants=tmp.mount' >> /usr/lib/systemd/system/basic.target
183183
184-
- |
185-
#!/usr/bin/env bash
186-
set -xeo pipefail
187-
# See https://issues.redhat.com/browse/LOG-3117
188-
# Something changed between rhel8 and rhel9 to not generate this by default
189-
# but we have containers that expect it to be mounted so for now let's continue
190-
# generating it.
191-
ln -sr /usr/share/zoneinfo/UTC /etc/localtime
192-
193184
# sudo prefers its config files to be mode 440, and some security scanners
194185
# complain if /etc/sudoers.d files are world-readable.
195186
# https://bugzilla.redhat.com/show_bug.cgi?id=1981979

manifest-el9-shared.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,22 @@ packages:
1313
ostree-layers:
1414
- overlay/25rhcos-azure-udev
1515

16-
# zram-generator-0.3.2 (shipped in centOS 9) provides a default zram-generator
17-
# config, we want to disable it. We don't need this in el10 because the config
18-
# was split in a subpackage we don't pull in.
1916
postprocess:
17+
# zram-generator-0.3.2 (shipped in centOS 9) provides a default zram-generator
18+
# config, we want to disable it. We don't need this in el10 because the config
19+
# was split in a subpackage we don't pull in.
2020
- |
2121
#!/usr/bin/bash
2222
set -xeuo pipefail
2323
rm /usr/lib/systemd/zram-generator.conf
24+
25+
# We added this for https://issues.redhat.com/browse/LOG-3117
26+
# because something changed between rhel8 and rhel9 to not
27+
# generate this by default but we had containers that expected it
28+
# to exist to be mounted. We include it in RHEL 9, but the
29+
# containers were fixed in [1] so we won't include it in RHEL 10.
30+
# [1] https://github.com/openshift/cluster-logging-operator/pull/1675
31+
- |
32+
#!/usr/bin/env bash
33+
set -xeo pipefail
34+
ln -sr /usr/share/zoneinfo/UTC /etc/localtime

tests/kola/files/localtime

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
#!/bin/bash
22
## kola:
33
## exclusive: false
4-
## description: Verify /etc/localtime link exists.
5-
## https://github.com/openshift/os/pull/1021
6-
## https://issues.redhat.com/browse/LOG-3117
4+
## description: Verify /etc/localtime state.
5+
## Symlink was added in el9 for
6+
## https://github.com/openshift/os/pull/1021
7+
## https://issues.redhat.com/browse/LOG-3117
8+
## Symlink was removed in el10+
9+
## https://github.com/coreos/rhel-coreos-config/pull/103
710

811
set -xeuo pipefail
912

1013
. $KOLA_EXT_DATA/commonlib.sh
1114

12-
test -L /etc/localtime
15+
if match_maj_ver "9"; then
16+
test -L /etc/localtime
17+
ok "/etc/localtime symlink exists"
18+
else
19+
test ! -e /etc/localtime
20+
ok "/etc/localtime does not exist"
21+
fi

0 commit comments

Comments
 (0)