[opensuse-factory] Tumbleweed snapshot repositories
A proposal for review and discussion: In the same way that TW is released in snapshots the repo itself would benefit from being presented by snapshot. Currently, if one wants to install a new package or perhaps *-debuginfo packages problems can occur especially on TW (and I have run into these both personally and with folks I support). A new package brings in a bunch of new dependencies that are compiled against newer versions of already installed dependencies and one ends up with an unusable package or worse. Alternatively, dependency checks may only be resolvable with a full system update anyway. The end result is that a TW install can be unmodifiable in a short period of time without updating to a newer snapshot first. This is compounded when rolling back via snapper due to an issue that the user is waiting to be resolved. By providing separate repos per TW snapshot these issues can be alleviated since new package installs will have been built using the same deps and build environment the user is currently running. The separate repos could be easily handled with either a modification to zypper or a wrapper, but having it built into zypper would seem preferable. When the user wants to perform the equivalent of `zypper ref && zypper dup` the following would occur: - zypper replaces any snapshotted repos with the newest version (or a specific one) - zypper ref - zypper dup The first step is the only part that could use some helper functions and could be implemented in a variety of manors. Publishing a text file containing the latest/current snapshot in each repo should make it easy for zypper to know what is the latest, completed snapshot. The repos could also be prefixed at a variety of levels. Just to provide an example: http://download.opensuse.org/tumbleweed/repo/oss/ could become: http://download.opensuse.org/tumbleweed/20161013/repo/oss/ depending on the level at which it is implemented on the repo side. Since everything else remains the same the amount of work required should be rather minimal. On the storage side, either entire copies could be used for simplicity or a symlink structure setup where unchanged packages are symlinked to previous snapshot and only the changed packages are present as a non-symlink. Given there is concern for mirror requirements the symlink approach will most likely be preferred. Snapshot repos could be kept for some predefined length of time and then discarded. This would automatically work with snapper since the repo URLs would be stored in zypp configuration and thus captured by btrfs snapshots. Additionally, non-btrfs filesystems could still benefit from being able to rollback by switching to older TW snapshot repos or remain on their current snapshot when they are aware of an issue in newer TW snapshots that affects them. Devel project on OBS or third-party repositories using OBS should be able to utilize the same mechanism for providing snapshotted repos if desired. I would imagine a new parameter in the .repo file or similar to explicitly indicate that the repo is snapshotted rather than attempting to detect based on URL. Additionally, providing snapshots could resolve the issue of not being able to tell when a snapshot is ready to be downloaded. Currently, there is a delay between the time a snapshot is released and has been replicated to the mirrors. As such one can update in the middle of this process with varying results. Obviously, Factory has a snapshot point already defined, but doing so for third-party or devel project may be a bit more tricky. It would be rather nice to have zypper be able to quickly tell if all repos are updated for the latest snapshot rather than having the manually try and assess the situation. Probably the simplest and most consistent approach would be to snapshot devel repos building against openSUSE:Factory/snapshot at the same point the snapshot was created (or perhaps released). If packages fail to build against the new snapshot they can be updated and will be included with the next TW snapshot. Building against openSUSE:Factory will provide early warning. Tying devel project to Factory/snapshot is probably the only reasonable approach since otherwise each repo will have its own snapshot point/process and it will become rather complex. If a package breaks on a new snapshot it probably makes sense to not publish the old version, in the new snapshot repo, that way users should see a vendor change. Blocking the whole project from publishing could be a configuration option as well, but probably more than required. Since devel/third-party projects should build against openSUSE:Factory/ snapshot they have to start after Factory is done building and can potentially not be completed by the time Factory/snapshot has published. Having all this in place would make it clear when everything is ready for update. - new TW snapshot repo available - devel projects repo available for new snapshot Snapshot repos have the side effect of providing repo "locking" which should make updates with extra repos more reproducible and safe. Obviously, the non- snapshotted repos that currently exist can remain along side and folks could be free to choose. All in all virtually everything needed to set this up is already in place and would just require: - a consensus on where to place snapshot in repo path (probably influenced heavily by the technical aspects of OBS) - light zypper addition to handle automatically switching repo URLs - decide on snapshot point in devel/third-party repos I look forward to your thoughts. -- Jimmy
On Tuesday 2016-10-25 22:05, Jimmy Berry wrote:
That is not necessarily true. A new zypper often requires a new libzypp for building, therefore the new zypper is almost *never* built with the deps the user has. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tuesday, October 25, 2016 11:42:02 PM CDT Jan Engelhardt wrote:
The comment was in regards to installing new packages when sitting on an older snapshot. Like installing *-debuginfo packages which can be for a newer version of the package that is installed. This would indeed be solved by providing snapshot repos. The build process in general will remain unchanged. -- Jimmy
On 2016-10-25 22:05, Jimmy Berry wrote:
Or, zypper be improved to know about and support release number by command option, and then use only one repo. Having several repos has the problem that the user has to specify which repo to use every week. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On Wednesday, October 26, 2016 2:46:28 PM CDT Carlos E. R. wrote:
All the rpms for previous snapshots need to be there and the relationship to eachother known. The release number is already available in openSUSE-release. Having zypper hide the repos with the wrapper as described means users will not even notice if they do not want to. Whenever you zypper dup, a check for newer snapshot will auto switch repos (one way it could work). You need everything a proper repo provides and trying to nest it inside a repo is far more complicated than it is worth considering how easily zypper could just switch the repos out automatically. -- Jimmy -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wed, Oct 26, 2016 at 8:46 AM, Carlos E. R. <robin.listas@telefonica.net> wrote:
Could the server create a symlink from some default repository directory names to whatever the current correct directory is? -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hello, Am Dienstag, 25. Oktober 2016, 15:05:58 CEST schrieb Jimmy Berry:
In the same way that TW is released in snapshots the repo itself would benefit from being presented by snapshot.
I see what you want, but I doubt the way you want is a good idea ;-) Having to switch the snapshot repo every two days sounds annoying, so the better solution is probably - keep the rolling repo (as we have it today) - this is what Tumbleweed users will use in 99% of the cases - add a way to switch to a previous repo snapshot (in case someone needs a previous package version) - this could mean running a "zypper ar" command or (more development work) adding some code in zypper to switch to a specific snapshot Publishing full snapshot repos is probably a nightmare for the mirrors because they would need $snapshot_count * $repo_size of space, which sums up to "a lot" ;-) AFAIK old packages are already kept in the repo for some days (to avoid breaking it for people in the middle of an upate), but those old packages are not included in the repodata. Actually it even seems the repodata (filelist etc.) for some previous snapshots is kept, but no longer referenced in repomd.xml. To implement snapshot repos, it should be possible to provide _snapshot repodata_ only, and link to the packages in the rolling repo. Ideally this would mean to only have suse/repodata/ (and possibly some more metatada I overlooked) specific to each snapshot, and all the other directories symlinked to the rolling repo. This way would have some advantages: - probably easy to implement - not too painful for the mirrors (only some hundred MB of additional metadata) - no changes in zypper needed because the rolling repo could stay the default (if you want a previous snapshot, you'll need to "zypper ar" it and disable the rolling repo) - but I won't object if someone wants to implement a command to switch to a specific snapshot Feedback from someone who knows about how the repo is created and published would be nice - I'm especially interested if it's really as easy as a think/hope ;-) Regards, Christian Boltz -- Linux - und dein PC macht nie wieder blau. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Op donderdag 27 oktober 2016 19:11:39 CEST schreef Christian Boltz:
Just saying: If we agree on having such functionality, IMHO this is the way to go. -- Gertjan Lettink, a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Thursday, October 27, 2016 7:11:39 PM CDT Christian Boltz wrote:
Seems people keep missing the part about zypper automatically handling the repo switch (rather simple). It is not just for previous versions of packages as I explained about installing new software after an updated snapshot updates related packages. Please read the whole proposal. The whole idea is that if I am aware of this feature I will probably be someone who will just branch a package and maintain that against current TW until it is resolved (as I and others do regularly). That of course still does not resolve the other issues handled by this. This needs to be automatic so that it works without the user having to know about it. The reason for prefixing the repos is that is works without reworking all of zypper.
This ignores the symlinks to unchanged packages and if several versions of previous packages are already being kept then the mirrors already have $snapshot_count * $repo_size where $snapshot_count is number of old versions kept. Even if we kept the same number of old snapshots this would be a much improved state. People that will know exactly what packages to switch to older ones and how to do that will likely branch and maintain anyway.
Plus all the older packages that have to be stored either way (largest part). The only difference then is the symlinks and the directory itself which I would expect to be marginal and does not require any updating to metadata/ versioning. From what I understand this still does not accomplish the goal since the user would have to explicitly switch to older packages and such. I would imagine it would also require download of such meta data for all previous releases since all of them would be in one repo which seems less than ideal especially considering there are already complaints about the size.
Addressed above, this forces the user to do something in order to use the snapshot repos which partially defeats the point.
-- Jimmy
On Tuesday 2016-10-25 22:05, Jimmy Berry wrote:
That is not necessarily true. A new zypper often requires a new libzypp for building, therefore the new zypper is almost *never* built with the deps the user has. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tuesday, October 25, 2016 11:42:02 PM CDT Jan Engelhardt wrote:
The comment was in regards to installing new packages when sitting on an older snapshot. Like installing *-debuginfo packages which can be for a newer version of the package that is installed. This would indeed be solved by providing snapshot repos. The build process in general will remain unchanged. -- Jimmy
On 2016-10-25 22:05, Jimmy Berry wrote:
Or, zypper be improved to know about and support release number by command option, and then use only one repo. Having several repos has the problem that the user has to specify which repo to use every week. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On Wednesday, October 26, 2016 2:46:28 PM CDT Carlos E. R. wrote:
All the rpms for previous snapshots need to be there and the relationship to eachother known. The release number is already available in openSUSE-release. Having zypper hide the repos with the wrapper as described means users will not even notice if they do not want to. Whenever you zypper dup, a check for newer snapshot will auto switch repos (one way it could work). You need everything a proper repo provides and trying to nest it inside a repo is far more complicated than it is worth considering how easily zypper could just switch the repos out automatically. -- Jimmy -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wed, Oct 26, 2016 at 8:46 AM, Carlos E. R. <robin.listas@telefonica.net> wrote:
Could the server create a symlink from some default repository directory names to whatever the current correct directory is? -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hello, Am Dienstag, 25. Oktober 2016, 15:05:58 CEST schrieb Jimmy Berry:
In the same way that TW is released in snapshots the repo itself would benefit from being presented by snapshot.
I see what you want, but I doubt the way you want is a good idea ;-) Having to switch the snapshot repo every two days sounds annoying, so the better solution is probably - keep the rolling repo (as we have it today) - this is what Tumbleweed users will use in 99% of the cases - add a way to switch to a previous repo snapshot (in case someone needs a previous package version) - this could mean running a "zypper ar" command or (more development work) adding some code in zypper to switch to a specific snapshot Publishing full snapshot repos is probably a nightmare for the mirrors because they would need $snapshot_count * $repo_size of space, which sums up to "a lot" ;-) AFAIK old packages are already kept in the repo for some days (to avoid breaking it for people in the middle of an upate), but those old packages are not included in the repodata. Actually it even seems the repodata (filelist etc.) for some previous snapshots is kept, but no longer referenced in repomd.xml. To implement snapshot repos, it should be possible to provide _snapshot repodata_ only, and link to the packages in the rolling repo. Ideally this would mean to only have suse/repodata/ (and possibly some more metatada I overlooked) specific to each snapshot, and all the other directories symlinked to the rolling repo. This way would have some advantages: - probably easy to implement - not too painful for the mirrors (only some hundred MB of additional metadata) - no changes in zypper needed because the rolling repo could stay the default (if you want a previous snapshot, you'll need to "zypper ar" it and disable the rolling repo) - but I won't object if someone wants to implement a command to switch to a specific snapshot Feedback from someone who knows about how the repo is created and published would be nice - I'm especially interested if it's really as easy as a think/hope ;-) Regards, Christian Boltz -- Linux - und dein PC macht nie wieder blau. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Op donderdag 27 oktober 2016 19:11:39 CEST schreef Christian Boltz:
Just saying: If we agree on having such functionality, IMHO this is the way to go. -- Gertjan Lettink, a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Thursday, October 27, 2016 7:11:39 PM CDT Christian Boltz wrote:
Seems people keep missing the part about zypper automatically handling the repo switch (rather simple). It is not just for previous versions of packages as I explained about installing new software after an updated snapshot updates related packages. Please read the whole proposal. The whole idea is that if I am aware of this feature I will probably be someone who will just branch a package and maintain that against current TW until it is resolved (as I and others do regularly). That of course still does not resolve the other issues handled by this. This needs to be automatic so that it works without the user having to know about it. The reason for prefixing the repos is that is works without reworking all of zypper.
This ignores the symlinks to unchanged packages and if several versions of previous packages are already being kept then the mirrors already have $snapshot_count * $repo_size where $snapshot_count is number of old versions kept. Even if we kept the same number of old snapshots this would be a much improved state. People that will know exactly what packages to switch to older ones and how to do that will likely branch and maintain anyway.
Plus all the older packages that have to be stored either way (largest part). The only difference then is the symlinks and the directory itself which I would expect to be marginal and does not require any updating to metadata/ versioning. From what I understand this still does not accomplish the goal since the user would have to explicitly switch to older packages and such. I would imagine it would also require download of such meta data for all previous releases since all of them would be in one repo which seems less than ideal especially considering there are already complaints about the size.
Addressed above, this forces the user to do something in order to use the snapshot repos which partially defeats the point.
-- Jimmy
participants (6)
-
Carlos E. R.
-
Christian Boltz
-
Jan Engelhardt
-
Jimmy Berry
-
Knurpht - Gertjan Lettink
-
Todd Rme