Skip to content
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

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

SludgeGirl
Copy link

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

Copy link
Member

@martinpitt martinpitt left a 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.

Comment on lines 142 to 143
# Setup user friendly names for multipath
printf 'defaults {\nuser_friendly_names yes\n}\n' > /etc/multipath.conf
Copy link
Member

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
Copy link
Member

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.

Comment on lines 118 to 121
# 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
Copy link
Member

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?

@@ -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"
Copy link
Member

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?

Comment on lines 148 to 156
# 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
Copy link
Member

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
Copy link
Member

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.

Comment on lines 115 to 116
# use unpredictable network interface names
ln -s /dev/null /etc/systemd/network/99-default.link
Copy link
Member

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.

@SludgeGirl
Copy link
Author

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!

@SludgeGirl
Copy link
Author

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

Copy link
Member

@martinpitt martinpitt left a 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.

Comment on lines -101 to +127
# 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
Copy link
Member

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 \
Copy link
Member

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.

@martinpitt martinpitt mentioned this pull request Dec 2, 2024
1 task
@martinpitt
Copy link
Member

I did the above two suggested changes and build the image in #7170. Once that's done, I'll push it here.

@martinpitt martinpitt marked this pull request as ready for review December 2, 2024 13:55
Copy link
Member

@martinpitt martinpitt left a 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.

@martinpitt
Copy link
Member

@Nykseli Just saw that these are actually your commits, so if you want to cross-check, please do. Thanks!

@martinpitt
Copy link
Member

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) ?

@martinpitt martinpitt merged commit 6c29777 into cockpit-project:main Dec 3, 2024
7 checks passed
@SludgeGirl
Copy link
Author

Your changes look good! Sorry just hopped back on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants