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 publication options for packages with Phased-Update-Percentage #716

Open
rossengeorgiev opened this issue Jan 16, 2023 · 4 comments
Open
Labels
.feature CHANGES/<issue_number>.feature

Comments

@rossengeorgiev
Copy link

This weekend I came across https://utcc.utoronto.ca/~cks/space/blog/linux/Ubuntu2204ServerPhasedUpdates which goes into details about Ubuntu's phased updates system. Turns out support of it was added to apt in Ubuntu 22.04. That means is that if you have a fleet of machines they will end up with different version of the package. Naturally, I started wondering whether this affects katello and content views, and I think it does.

# curl -sS https://foreman.example.com/pulp/content/MyOrg/Library/custom/Ubuntu/focal-updates/dists/focal-updates/main/binary-amd64/Packages | grep -c 'Phased-Update-Percentage'
168

I don't have jammy synced, but the metadata seems to be there. I haven't actually tested that you get different versions of the package on different system on jammy, but I could.

The question is should pulp_deb so something about this? or not? Perhaps, as it seems to break the idea of content views.

It seems right now the only way to control this behaviour is via apt configuration options.

@quba42
Copy link
Collaborator

quba42 commented Jan 17, 2023

Having researched the feature, it looks like on the repo side, it is just a matter of adding a Phased-Update-Percentage field to individual package paragraphs in the repo metadata. (See: https://wiki.debian.org/DebianRepository/Format#Phased-Update-Percentage)

Ubuntu apparently has a policy of updating the percentage in their repo every 6h when they do a phased release of a package. As such, syncing this information into pulp_deb is information that is going to be very quickly out of date, and the whole idea behind phased updates probably does not make a lot of sense to most users who control updates via Pulp mirror.

Users can of course simply configure their Ubuntu hosts to ignore phased updates and be done with. However, I still feel like a special handling in pulp_deb could make sense:

My proposal would be to simply sync the Ubuntu repo as it is, including all phased update percentages at the time of the sync, but to offer an option not to publish these fields during the pulp_deb publish step here:
https://docs.pulpproject.org/pulp_deb/restapi.html#tag/Publications:-Apt/operation/publications_deb_apt_create

Perhaps it could be a three way option:

  1. Publish the repo as synced
  2. Drop the Phased-Update-Percentage values during publish (packages are instantly available to all hosts)
  3. Don't publish packages with Phased-Update-Percentage < 100 (partially phased in packages are NOT made available)

These three options would mirror the available configuration options for APT.

For convenience we could add the possibility of setting a default value for the new publication parameter in the pulp_deb config file and/or for individual Pulp repositories (the latter would require a DB migration).

@quba42 quba42 changed the title Ubuntu 22.04 phased updates Add publication options for packages with Phased-Update-Percentage Jan 17, 2023
@quba42
Copy link
Collaborator

quba42 commented Jan 17, 2023

We are now tracking this internally, but at moderate priority, since it can be worked around via APT client configuration.

@rossengeorgiev
Copy link
Author

I think the most sensible default would be to just include all packages and remove Phased-Update-Percentage. Potentially, have an option to not remove, if someone wants to simply mirror repositories so they still get to be part of phase updates. Then things like content views can simply remove Phased-Update-Percentage.

Is this something to discuss with pulp and foreman/katellote devs and community members? As an option like that will need to be exposed in various places.

@quba42
Copy link
Collaborator

quba42 commented Jan 18, 2023

Is this something to discuss with pulp and foreman/katellote devs and community members? As an option like that will need to be exposed in various places.

I think for now this issue is enough. On the Katello side it is probably not worth the effort to add the ability to set the new behaviour on a per repository basis. As in, we can get most of what we want with very little effort in Katello, by just setting a global default behaviour regarding phased updates for pulp_deb. And I agree that the sane default would just be to ignore (drop) the phased upgrade percentage.

@quba42 quba42 added the .feature CHANGES/<issue_number>.feature label Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.feature CHANGES/<issue_number>.feature
Projects
None yet
Development

No branches or pull requests

2 participants