-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add testing support for OpenSUSE Tumbleweed #7143
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Initial review -- none of that is a veto of course, in the end this is "your" image, but let's at least discuss this a bit.
Can you please squash this? Like, put all the new dependencies into one commit, and squash the redis/valkey commits, and such.
# Setup user friendly names for multipath | ||
printf 'defaults {\nuser_friendly_names yes\n}\n' > /etc/multipath.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I leave this up to you, but this is a smell. It's better to test the OS at it is for real users, and deal with the fallout in our code and tests. If this is a workaround for a bug in TW, it's useful to add a reference to it in a comment and prefix it with # HACK:
. We use that a lot, then it remains greppable.
@@ -98,6 +98,8 @@ if [ "${IMAGE%-i386}" != "$IMAGE" ]; then | |||
fi | |||
|
|||
zypper dup -y | |||
|
|||
# Install default kernel for testing PLEASE REMOVE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, what's the condition to remove this? The comment below already gives the rationale.
# cloud-init setups the wheel group incorrectly so we need to recreate it | ||
groupdel wheel | ||
zypper install -y system-group-wheel | ||
sudo usermod -a -G wheel admin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also feels like working around the OS, and should get a bug reference. In what way is "wheel" wrong? I.e. in a few months time how can developers decide if this can be dropped?
images/scripts/lib/build-deps.sh
Outdated
@@ -37,7 +37,7 @@ echo "$spec" | rpmspec -D "$OS_VER_NO_VARIANT" -D 'version 0' -D 'enable_old_bri | |||
# - nodejs for starter-kit and other projects which rebuild webpack during RPM build | |||
case "$OS_VER" in | |||
*suse*) | |||
EXTRA_DEPS="appstream-glib rpmlint gettext-runtime desktop-file-utils nodejs-default" | |||
EXTRA_DEPS="appstream-glib rpmlint gettext-runtime desktop-file-utils nodejs-default system-group-wheel" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for configure.ac
to auto-detect --with-admin-group=
presumably?
# Setup redis | ||
sudo cp /etc/redis/default.conf.example /etc/redis/redis.conf | ||
sudo chown redis:redis /etc/redis/redis.conf | ||
|
||
mkdir -p /etc/systemd/system/redis.target.d | ||
cat > /etc/systemd/system/redis.target.d/70-redis-targets.conf <<EOF | ||
[Unit] | ||
[email protected] | ||
EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that documented in TW somehow? That's all stuff that should either happen by default (to get an useful experience out of the box) or in Cockpit's metrics page. It doesn't help users if tests go green with "it works against a hacked up image", but not against a default install.
[email protected] | ||
EOF | ||
|
||
systemctl enable --now redis.target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd advise against that. We don't enable it in Fedora/RHEL images by default, and even disable it in Debian. Most tests don't need it, and Cockpit's metrics page starts it if/when necessary.
# use unpredictable network interface names | ||
ln -s /dev/null /etc/systemd/network/99-default.link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is another case of "please test the real-world default OS, not some hack". We fixed our projects to get along without hardcoded ethernet names a while ago, this really shouldn't be necessary.
Hey @martinpitt thanks for the review! I'll get the history tidied up and I'll take another look into everything you've mentioned here and see what I can get handled properly. Thanks for your time on this! |
21daf9e
to
71ddf28
Compare
Morning! Sorry for the wait, so thanks for the push back, I get a little more the more correct ways of handling this. I've been a touch ruthless and pretty much dropped most of what you mentioned above that didn't break double figures of tests with the exception of switching over to kernel-default. This is the same kernel just with more kernel modules (specifically a few needed ones for testing), so it's a hack we'll have to bare for now In terms of redis/valkey handling, it doesn't get shipped with a default conf, I'm going to have some chats my side and get some further information/see what we can do about it, so I've dropped it for now. For all of the other points I agree with opinions on it, I'll drop it and see if I can find different fixes in the future none of these broke that many tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SludgeGirl! Sure, that works too! We can add more commits step by step.
# kernel-default has more kernel modules that are required for testing | ||
|
||
# HACK: There are a number of kernel modules needed for testing, for | ||
# instance scsi_debug which is needed for most if not all of the disk | ||
# based tests. Since the cloud image ships a slimmed down set of modules | ||
# We need to install the full set, this is still the same kernel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit says "images: Enable firewalld and precreate /media directory", but does neither of these things. Please change to "images: Document opensuse-tumbleweed kernel change" or similar.
@@ -21,11 +21,15 @@ printf 'dictcheck = 0\nminlen = 6\n' >> /etc/security/pwquality.conf | |||
COCKPIT_DEPS="\ | |||
criu \ | |||
libcriu2 \ | |||
crypto-policies-scripts \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add "... on openshift-tumbleweed" to the "fix missing dependencies" commit.
I did the above two suggested changes and build the image in #7170. Once that's done, I'll push it here. |
71ddf28
to
97c701b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works, and LGTM. @SludgeGirl please cross-check my changes, and if you 👍 I'll land.
@Nykseli Just saw that these are actually your commits, so if you want to cross-check, please do. Thanks! |
Let's not get this stale. I'll land it now, and of course we can do further adjustments at any time. But hopefully this already unblocks step 2 in cockpit-project/cockpit#21335 (review) ? |
Your changes look good! Sorry just hopped back on |
This pairs with cockpit-project/cockpit#21335
This is aimed to add most of the support for testing Tumbleweed, let me know if you need any extra changes made to it