OCI: Failure to download a snap during build
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Invalid
|
Undecided
|
Unassigned | ||
Snap Store Server |
New
|
Undecided
|
Unassigned |
Bug Description
We've been experiencing failures when building snap-based OCI images.
During the build process, one of the things we do in the Dockerfile is to download the snap (using curl). Here's the current curl incantation that we use (using the cassandra snap as an example):
curl -L $(curl -H 'X-Ubuntu-Series: 16' -H 'Snap-CDN: none' -H "X-Ubuntu-
With this, we're now seeing:
[0m[27/
[91mcurl: (56) Received HTTP code 403 from proxy after CONNECT
[0m[27/
Full logs here:
I had a brief chat with Colin who suggested that we should be passing -H 'Snap-CDN: none' when downloading the snap. As seen above, even after providing this extra header the download still fails. It's also worth mentioning that this is the first time we're seeing such failures; all of our previous builds of snap-based OCIs worked fine.
FWIW, I was passing the -H 'Snap-CDN: none' header to the wrong curl command; it's the outermost one that needs it, not the innermost. After fixing this nit, the build succeeded (at least for one of our snap-based images; I will rebuild the others soon, but I'm not expecting failures).
Thanks to Colin for the help.