Skip to content

Commit b3753c8

Browse files
committed
phased-updates: first pass of technical updates
That documentation is written like a live document, more or less playing the role of a bug tracker with open questions and future work. This doesn't fit a documentation page, so I've removed most of those entries, and corrected what I could so that at least the technical information in that page is correct. This still needs an overhaul to better fit modern documentation standards.
1 parent d8be0b3 commit b3753c8

File tree

1 file changed

+11
-110
lines changed

1 file changed

+11
-110
lines changed

docs/staging/phased-updates.md

Lines changed: 11 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Once an update is released to `-updates`, the update is then phased so that the
1313
update is gradually made available to expanding subsets of Ubuntu users. This
1414
process allows us to automatically monitor for regressions and halt the update
1515
process if any are found. Complete details about the process can be found in a
16-
**blog post** by Brian Murray.
16+
[**blog post**](https://web.archive.org/web/20210507035933/http://www.murraytwins.com/blog/?p=127) by Brian Murray.
1717

1818
The Phased-Update-Percentage is initially set to 10%, and a job is run (every 6
1919
hours) that checks for regressions and if none are found the phased update
@@ -26,21 +26,13 @@ The progress of phased updates is visible
2626
[in a report](https://ubuntu-archive-team.ubuntu.com/phased-updates.html)
2727
which is updated by the same job that does the phasing.
2828

29+
TODO: this block can probably be dropped, as Focal is now EOSS, and all currently supported Ubuntu releases have phased-updates built into `apt`
2930
Up to Ubuntu 20.04 LTS (Focal), Update Manager is the only package manager that
3031
supports phased updates
31-
([reference](https://discourse.ubuntu.com/t/phased-updates-in-apt-in-21-04/20345?u=nteodosio)).
32+
([reference](https://discourse.ubuntu.com/t/phased-updates-in-apt-in-21-04/20345)).
3233
Any other update mechanism installs all updates regardless of the
3334
Phased-Update-Percentage.
3435

35-
## Release note
36-
37-
[Stable Release Updates](https://wiki.ubuntu.com/StableReleaseUpdates) will no
38-
longer appear in Update Manager at the same time for all machines. Instead a
39-
subset of machines will be selected at random to receive the update first. The
40-
update will only be made available to everyone if there are no serious
41-
regressions encountered by the first set of users. There is still a testing
42-
process completed by Ubuntu developers before any users receive the update.
43-
4436
## Rationale
4537

4638
Giving an entirely new version of any widely used software program to our
@@ -70,15 +62,15 @@ update before a large number of users encounter it.
7062
* **I want to** install all updates immediately
7163
* **so that** I can see breakage as quickly as possible
7264

73-
## update-manager
65+
## apt
7466

75-
`update-manager` will treat an update available only when the computer is in
67+
`apt` will treat an update available only when the computer is in
7668
the current **testing set** for that update.
7769

78-
A computer is in the testing set if `Phased-Update-Percentage`
79-
$\times 2^{128} \geq$ `md5` (*machine id* + *package name* + *package version*).
80-
81-
($2^{128}$ is the maximum number producible by the `md5` function.)
70+
A computer being in the testing set is determined as follow:
71+
* Compute a random number based on the following seed: (*package name* + *package version* + *machine id*).
72+
* Distribute uniformly that random number between 0 and 100.
73+
* Check whether that number is below `Phased-Update-Percentage` and if yes, include the update.
8274

8375
This algorithm requires only the package record and the machine ID to execute
8476
and is fairly fast so shouldn't slow down the time to calculate the list of
@@ -89,101 +81,10 @@ package and version at a particular threshold. It does vary based on package
8981
and version though, so that the same set of users aren't always the ones that
9082
find the regressions.
9183

92-
### Unresolved questions
93-
94-
* Is the algorithm correct?
95-
* What do we want to call the new field?
96-
* What should update manager do if there is another version of the package available and the algorithm answers no for the latest? e.g. security update and newer package in -updates. If it won't install the -updates version, should it install the -security? Probably.
97-
* If update manager pops up once a week does it make the phased updates rather useless?
98-
* Assuming that the default is one week, and there is a fairly uniform distribution on which day of the week that is, we will find that the actual percentage of people with the update installed lags the set number fairly significantly. How much depends on how promptly people install the updates. If everyone installs as soon as the popup happens the update will take about a week longer than the ideal curve to fully propagate, but a majority of people will have the update installed by the time it reaches 100% on the server side.
99-
* We can't know exactly what the current percentage is, only guess based on the phase of the update.
100-
* When pausing an update the phase should be bought down to 0 to prevent others installing it, and then increased back up, or jumped to the previous value.
101-
* Given that the phase doesn't control the percentage of machines with the update installed very strongly, and the "open weekly" default for non-security updates provides some sort of phasing, the main thing this scheme provides is the ability to pause an update without deleting it from -updates. Is that worth the effort?
102-
* Combining phased updates with an option in update-manager to still only show non-security updates (combined with a change to calculate that based on whether the updates will be shown for the particular machine) makes sense to balance our control in pushing out updates, with the users desire to not be bothered by update prompts every day.
103-
* Given that it is machine based someone with multiple machines will see the updates at different times. Is that too confusing? Should there be a way to turn it off (opt in to testing)?
104-
105-
## Archive
106-
107-
On the server side the new `Phased-Update-Percentage` field needs to be
108-
populated when we want to phase an update.
109-
110-
Launchpad will insert this into the package record. It therefore needs to know
111-
what value to insert. Where should it be stored in Launchpad?
112-
113-
An API will be added to Launchpad to set the value, and it will be controlled
114-
by `ubuntu-sru` (ubuntu-archive?).
115-
116-
I think that this should be akin to component/section/priority overrides: that is, it should be a column on `BinaryPackagePublishingHistory` and it could most easily be set by adding another optional parameter to `BinaryPackagePublishingHistory.changeOverride`. This will have the effect of creating a new publication for the package, so it will be beneficial not to change the value too often (perhaps once a day or so); but in order to get the LP archive publisher to generate a new Packages stanza a new publication is necessary anyway, so this is true regardless. `BinaryPackagePublishingHistory.changeOverride` is restricted to ubuntu-archive. --`cjwatson`
117-
118-
A script will then be run to set these values. When a package is pushed into -updates
119-
the script will start to increase the percentage over time, using some
120-
to-be-defined function of the age of the package, and possibly the urgency.
121-
122-
There will be an override to that aging that will allow `ubuntu-sru` to pause the
123-
script for a particular package that can be used when there are suspected
124-
regressions. Once it has been decided what to do the package can either be
125-
superseded in updates, in which case the process will start again for the new
126-
version, or the roll-out will be continued.
127-
128-
## Opting out
129-
130-
Pre-release versions of Ubuntu should be opted out of phased updates by default.
131-
132-
[The "Updates" panel of the Contributor Console](https://wiki.ubuntu.com/ContributorConsole#updates)
133-
should let testers opt out of phased updates post-release, or opt in to phased
134-
updates pre-release (to test the phasing mechanism itself).
135-
136-
### Unresolved questions
137-
138-
* Where should the information be stored in Launchpad?
139-
* Who should be allowed to change the value?
140-
* How should the process be paused for a particular package?
141-
* What should the roll-out curve look like?
142-
143-
## Further development
144-
145-
* An automatic link could be added from the error tracker to the roll-out script
146-
so that it pauses propagation if there is a spike in crashes with the new
147-
version.
148-
149-
Replace that heading with headings for each thing you’re changing or specifying.
150-
151-
Checklist:
152-
153-
1. Have you reviewed the bug reports for the relevant package? (Yes, this may
154-
take an hour or two. But you might be able to fix multiple bugs with a
155-
well-designed change.)
156-
157-
1. If any user interface is involved, is it fully described? Include any
158-
wire frames or mock-ups.
159-
160-
1. Have you had any new user interface, or new visible text, reviewed by a
161-
designer? (Or if you are a designer, have you had it peer-reviewed?)
162-
163-
1. Is the change accessible? (For example, have you specified accessible labels
164-
for any graphic-only elements?)
165-
166-
1. How will users learn the new way of doing things? Describe any help pages
167-
required, and any changes to the Ubuntu Web site or installer slideshow.
168-
169-
1. Is any migration of data or settings required?
170-
171-
1. How will the feature be tested? Work with the
172-
[Quality team](https://discourse.ubuntu.com/t/ubuntu-quality/39).
173-
174-
## Unresolved issues
175-
176-
(None)
177-
178-
## See Also
179-
180-
* [Error Tracker/Phased Updates](https://wiki.ubuntu.com/ErrorTracker/PhasedUpdates)
181-
* [Ubuntu Archive team - phased updates](https://ubuntu-archive-team.ubuntu.com/phased-updates.html)
182-
18384
----
18485

185-
* **Launchpad entry**: [Phased updates of software packages](https://blueprints.launchpad.net/ubuntu/+spec/foundations-r-phased-updates)
86+
* **Launchpad spec entry**: [Phased updates of software packages](https://blueprints.launchpad.net/ubuntu/+spec/foundations-r-phased-updates)
18687
* **Originally created**: 2012-05-14
18788
* **Last updated**: 2023-06-09
188-
* **Contributors**: `Evan Dandrea`, `James Westby`, `Colin Watson`, `Steve Langasek`, `Michael Vogt`, `Matthew Paul Thomas`, and others
89+
* **Contributors**: `Evan Dandrea`, `James Westby`, `Colin Watson`, `Steve Langasek`, `Michael Vogt`, `Matthew Paul Thomas`, `Brian Murray`, and others
18990

0 commit comments

Comments
 (0)