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

Long term agreement on handling Leap 15.X image respins (QuaterlyUpdates) #71

Closed
lkocman opened this issue Mar 3, 2022 · 7 comments
Closed
Assignees

Comments

@lkocman
Copy link
Contributor

lkocman commented Mar 3, 2022

Hello team

regarding https://bugzilla.suse.com/show_bug.cgi?id=1196672

Fixed in 94b1127
and 51d19c8

In general the reason behind -N release suffix this is that image has always different checksum and we wanted to avoid referencing same downloadable with different checksum. Therefore Autobuild team recommended to have -N respin in the filename.

Regarding symlinks

We do have redundant symlinks -Media and -Current. In fact the -Current could be dropped and we could use just -Media as if we have to touch it it doesn't make any sense.

So the link could look as following:
openSUSE-Leap-15.3-N-{NET,DVD}-${ARCH}-Media.iso

I'd then always create a PR to sync the get-o-o with new symlinks. It's not an atomic operation as on one side we have to wait for cronjob to update get-o-o and on the other side we have to wait for TTM and OBS to finish the syncing of images, and once images are at ftp-stage, only then we can trigger following to sync data on prod by following:

./publish_distro publish_leap153.config --force

Thoughts? We will soon update the image again with -3 (for QuaterlyUpdate 2) so it would be nice to have the transaction discussed and organized. Thank you!

@cboltz
Copy link
Member

cboltz commented Mar 3, 2022

For -Current vs. -Media, I remember c531e6b ;-) (but in the meantime, it seems both exist again)

For -Current, I'd tend not to include the respin number. IMHO the idea behind -Current is that it always links to the latest version, and we even have https://download.opensuse.org/distribution/openSUSE-current/ that gets switched to the latest release since years. Therefore having and changing -Current (without -N) symlinks for the respins (like we already do during beta and final release) would make sense IMHO.

Obviously that would mean to remove the -2 when you release -3, but after that, you don't need to change anything on get.o.o for the respins.

FYI: get.o.o gets deployed hourly (cronjob starts at the full hour, actual deployment of all jekyll-based pages happens about 5 minutes later)

@hellcp
Copy link
Member

hellcp commented Mar 3, 2022

I'm thinking in context of #55 for example, I'm not sure is this is the right approach. I kind of wish that what is currently symlinks was handled as temporary redirects, so that images are downloaded with different filenames with new snapshots, and same for checksums, they should be temporary redirects to files with the filename (inside and outside) that matches the target of the redirect. Of course there is a drawback that redirects don't mirror at all, we could have symlinks set up for mirrors so they don't straight up fail on us, and we can't provide a single command for checking the checksum that fits all cases because the downloaded filename is ever changing. I'm sure there's more. Otherwise I would probably ask for the publish script to actually automatically create a branch that can be pr'd to this repo without having to rely on a person to update the file manually every time (since I know how prone to mistakes that is, since I'm also a human being)

@lkocman
Copy link
Contributor Author

lkocman commented Mar 7, 2022

I think the problem with the symlinks is that they're produced with the obs publisher. I somehow thought that the -Current is gone as well. Or at least @adrianschroeter was working on that part.

If we keep -Current then I'd also expect it's the version (as in has only 15.3 not the release part in it).

@lkocman
Copy link
Contributor Author

lkocman commented Mar 7, 2022

One of manual steps is currently to ping autobuild team to bump the respin number in the obs-publisher as well. Adrian would be a good contact for this task.

@lkocman
Copy link
Contributor Author

lkocman commented Mar 7, 2022

I've added this script that just points version less -Current symlink to thelatest -Media symlink with release in it.

mirror@pontifex2:~/bin> ls -la `pwd`/update_leap_current_symlink
-rwxr-xr-x 1 mirror stage 669 Mar  7 13:20 /home/mirror/bin/update_leap_current_symlink
commit c36b4421e67332442a8f6b91b8cb5eda0f4f783c (HEAD -> master)
Author: opensuse mirror <[email protected]>
Date:   Mon Mar 7 13:20:40 2022 +0000

    Add script to update current symlinks for QuarterlyUpdates

diff --git a/bin/update_leap_current_symlink b/bin/update_leap_current_symlink
new file mode 100755
index 0000000..3b4f86a
--- /dev/null
+++ b/bin/update_leap_current_symlink
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# This script manually updates version/release less -Current symlinks
+# Needed by get-o-o https://github.com/openSUSE/get-o-o/issues/71
+# 
+# Please note that you should contact autobuild to
+# update release/respin number e.g. 4 in 15.3-4 in the obs publisher for 
+# https://build.opensuse.org/project/show/openSUSE:Leap:15.3:Update:Respin
+target_dir="/srv/ftp-stage/pub/opensuse/distribution/openSUSE-current/iso"
+
+for file in $target_dir/*; do
+       if [ -L "$file" ] && [[ "$file" != *"Current"* ]]; then
+               target=`basename $file`
+               version=`echo $target | sed "s/openSUSE-Leap-//" | awk -F - '{ print $1 }'` # 15.3
+               release=`echo $target | sed "s/openSUSE-Leap-//" | awk -F - '{ print $2 }'` # 3
+               # use fullpath $file for link_name
+               link_name=`echo $file | sed "s/$version-$release/$version/" | sed "s/-Media/-Current/"`
+               ln -s $target $link_name
+       fi
+done

@lkocman
Copy link
Contributor Author

lkocman commented Mar 7, 2022

Oky, so the workflow is following https://en.opensuse.org/openSUSE:LeapQuarterlyUpdates_howto

@lkocman
Copy link
Contributor Author

lkocman commented Mar 7, 2022

I suggest to close issue now

@lkocman lkocman closed this as completed Mar 7, 2022
@lkocman lkocman self-assigned this Mar 7, 2022
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

No branches or pull requests

3 participants