curtin mirror URL contains double slash (/) after mirror hostname, impacting proxy cachability
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Andres Rodriguez | ||
2.0 |
Fix Released
|
Medium
|
Andres Rodriguez |
Bug Description
The mirror URL configured by MAAS contains a double slash after the mirror hostname. Other than being unclean, this is bad for HTTP proxies as the extra slash will result in caching a separate set of files to not having an extra slash.
root@semisomnol
deb http://
The data path is as follows
(1) The archive URL is configured stored as a single string in the database: http://
(2) maas:src/
>>> urlparse("http://
ParseResult(
(3) This is rendered into the curtin data using contrib/
apt_mirrors:
ubuntu_archive: http://{{main_
ubuntu_security: http://{{main_
At this stage the slash is duplicate because it is present in both the and the string concatenation.
(4) Interestingly the debian preseed section (debconf_
Rather than decide where to add or remove the leading slash, I propose that we remove the hostname/directory split entirely. It does not appear to serve any purpose, and is simply glued back together again before being output from MAAS. The problem would then solve itself.
This would also have the advantage of not stripping the scheme (http/https) in case someone wishes to use https, even though that is not common right now because of gpg signing.
Related branches
- Gavin Panella (community): Approve
-
Diff: 46 lines (+8/-8)2 files modifiedsrc/maasserver/preseed.py (+1/-1)
src/maasserver/tests/test_preseed.py (+7/-7)
- Andres Rodriguez (community): Approve
-
Diff: 66 lines (+17/-8)3 files modifieddocs/changelog.rst (+9/-0)
src/maasserver/preseed.py (+1/-1)
src/maasserver/tests/test_preseed.py (+7/-7)
Changed in maas: | |
importance: | Undecided → Medium |