Launchpad API randomly returns empty responses
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Colin Watson | ||
lazr.restful |
Fix Released
|
Critical
|
Colin Watson |
Bug Description
Since October 10, I've started to see an issue ocassionally when running `apt-add-
$ sudo apt-add-repository ppa:maxmind/ppa
Cannot add PPA: 'ppa:~maxmind/
The team named '~maxmind' has no PPA named 'ubuntu/ppa'
Please choose from the following available PPAs:
* 'ppa': MaxMind Libraries and Software
This occurs for a number of different PPAs - `maxmind/ppa`, `~ondrej/
Someone else seems to have reported a similar thing here: https:/
Related branches
- Jürgen Gmach: Approve
-
Diff: 50 lines (+13/-4)2 files modifiedlib/lp/services/webservice/stories/conditional-write.rst (+12/-3)
requirements/launchpad.txt (+1/-1)
- Guruprasad: Approve
-
Diff: 251 lines (+69/-17)10 files modifiedNEWS.rst (+2/-0)
src/lazr/restful/_resource.py (+22/-4)
src/lazr/restful/basic-site.zcml (+1/-0)
src/lazr/restful/example/base/filemanager.py (+2/-1)
src/lazr/restful/example/base/tests/entry.txt (+15/-3)
src/lazr/restful/example/base/tests/field.txt (+5/-1)
src/lazr/restful/example/base/tests/hostedfile.txt (+4/-1)
src/lazr/restful/example/base/tests/root.txt (+8/-3)
src/lazr/restful/publisher.py (+5/-1)
src/lazr/restful/testing/webservice.py (+5/-3)
summary: |
- (Intermittently) cannot add PPA in Ubuntu + Launchpad API randomly returns empty responses |
Changed in lazr.restful: | |
status: | New → In Progress |
importance: | Undecided → Critical |
assignee: | nobody → Colin Watson (cjwatson) |
This is reproducible using cURL, something seems cooked with the launchpad API servers:
curl -sS -D - -o /dev/null -H 'Accept: application/json' https:/ /launchpad. net/api/ 1.0/~maxmind/ +archive/ ubuntu/ ppa security- policy: frame-ancestors 'self'; ba7dbeb3fcc6e16 eab40eff6b9- 5b65841c4222b14 0eee5758e4d9640 3bbb8d6d1b" transport- security: max-age=15552000 type-options: nosniff revision: bd6cfd0cfc024db e1dcd7d5d91165f b4f6a6c596 notifications: [] e1dcd7d5d91165f b4f6a6c596 02d4-430c- 9567-a4ec9ad45b 6b prod-launchpad- 29 prod-launchpad- 29:3128 prod-launchpad- 29 (squid/4.10)
HTTP/1.1 200 OK
Date: Fri, 13 Oct 2023 13:52:15 GMT
Server: gunicorn
Content-Type: application/json
x-powered-by: Zope (www.zope.org), Python (www.python.org)
Content-Length: 0
content-
ETag: "4da4ac44a91c53
strict-
Vary: Accept
x-content-
x-frame-options: SAMEORIGIN
x-launchpad-
x-lazr-
x-xss-protection: 1; mode=block
x-vcs-revision: bd6cfd0cfc024db
x-request-id: c070f93a-
Age: 973
X-Cache: HIT from juju-98d295-
X-Cache-Lookup: HIT from juju-98d295-
Via: 1.1 juju-98d295-
Notice above the "Content-Length: 0", i.e. API servers return empty 0-byte responses. Running the same command a couple of seconds later show:
curl -sS -D - -o /dev/null -H 'Accept: application/json' https:/ /launchpad. net/api/ 1.0/~maxmind/ +archive/ ubuntu/ ppa security- policy: frame-ancestors 'self'; ba7dbeb3fcc6e16 eab40eff6b9- 5b65841c4222b14 0eee5758e4d9640 3bbb8d6d1b" transport- security: max-age=15552000 Accept- Encoding type-options: nosniff revision: bd6cfd0cfc024db e1dcd7d5d91165f b4f6a6c596 notifications: [] e1dcd7d5d91165f b4f6a6c596 38a0-48da- 98b3-cf59402040 43 prod-launchpad- 29 prod-launchpad- 29:3128 prod-launchpad- 29 (squid/4.10)
HTTP/1.1 200 OK
Date: Fri, 13 Oct 2023 11:07:37 GMT
Server: gunicorn
x-powered-by: Zope (www.zope.org), Python (www.python.org)
Content-Length: 977
content-
Content-Type: application/json
ETag: "4da4ac44a91c53
strict-
Vary: Accept,
x-content-
x-frame-options: SAMEORIGIN
x-launchpad-
x-lazr-
x-xss-protection: 1; mode=block
x-vcs-revision: bd6cfd0cfc024db
x-request-id: d843e87b-
Age: 976
X-Cache: HIT from juju-98d295-
X-Cache-Lookup: HIT from juju-98d295-
Via: 1.1 juju-98d295-
A noticeable difference here is the "Vary: Accept" vs "Vary: Accept, Accept- Encoding" , but in short the edge servers seem to be caching/serving 0-byte responses, which causes apt-add-repository to fail to find the packages.