Ephemeral environment during curtin installation doesn't use proxy

Bug #1496961 reported by Andres Rodriguez
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Blake Rouse

Bug Description

Trying to install a machine with mlaltest trunk, I came itno an issue where:

When deploying, the ephemeral environment tries to access the archive, however, it does it without going to the proxy first, and tries to do it directly.

However, when curtin takes over and installs packages, these are installed using the proxy.

This means that either
1. proxy is not set for the pehemeral environment
2. proxy is set only after curtin takes over

Or some other reason.

Tags: ci

Related branches

Changed in maas:
milestone: none → 1.9.0
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Blake Rouse (blake-rouse) wrote :
Download full text (3.5 KiB)

This is breaking the MAAS CI at the moment as well. The CI does all network communication through the proxy. Here is the installation log:

Err http://archive.ubuntu.com trusty InRelease

Err http://archive.ubuntu.com trusty-updates InRelease

Err http://security.ubuntu.com trusty-security InRelease

Err http://archive.ubuntu.com trusty Release.gpg
  Unable to connect to archive.ubuntu.com:http:
Err http://security.ubuntu.com trusty-security Release.gpg
  Unable to connect to security.ubuntu.com:http:
Err http://archive.ubuntu.com trusty-updates Release.gpg
  Unable to connect to archive.ubuntu.com:http:
Reading package lists...
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Unable to connect to archive.ubuntu.com:http:

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Unable to connect to archive.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Unable to connect to security.ubuntu.com:http:

W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package bcache-tools
Unexpected error while running command.
Command: ['eatmydata', 'apt-get', 'install', '--quiet', '--assume-yes', '--option=Dpkg::options::=--force-unsafe-io', 'mdadm', 'lvm2', 'bcache-tools']
Exit code: 100
Reason: -
Stdout: ''
Stderr: ''
Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: "Err http://archive.ubuntu.com trusty InRelease\n \nErr http://archive.ubuntu.com trusty-updates InRelease\n \nErr http://security.ubuntu.com trusty-security InRelease\n \nErr http://archive.ubuntu.com trusty Release.gpg\n Unable to connect to archive.ubuntu.com:http:\nErr http://security.ubuntu.com trusty-security Release.gpg\n Unable to connect to security.ubuntu.com:http:\nErr http://archive.ubuntu.com trusty-updates Release.gpg\n Unable to connect to archive.ubuntu.com:http:\nReading package lists...\nW: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease \n\nW: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease \n\nW: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease \n\nW: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Unable to connect to archive.ubuntu.com:http:\n\nW: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Unable to connect to archive.ubuntu.com:http:\n\nW: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Unable to connect to security.ubuntu.com:http:\n\nW: Some index files failed to download. They have been ignored, or old ones used instead.\nReading package lists...\nBuilding dependen...

Read more...

Changed in maas:
status: Confirmed → Triaged
Revision history for this message
Blake Rouse (blake-rouse) wrote :

MAAS is sending the proxy but curtin is only using it by placing it into the target system. It also needs to set it up in the ephemeral so that any packages it needs to download will use the proxy as well.

Changed in curtin:
status: New → Triaged
importance: Undecided → Critical
Changed in maas:
importance: High → Critical
tags: added: ci
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Looks to be that MAAS is not setting the apt_proxy with cloud-init. That will make sure that both the installed system and the ephemeral will use the proxy.

Changed in curtin:
status: Triaged → Invalid
Changed in maas:
assignee: nobody → Blake Rouse (blake-rouse)
Changed in maas:
status: Triaged → Fix Committed
no longer affects: curtin
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.