LXDInstanceProvider does not pass proxy information to lxc exec

Bug #1826481 reported by Bryon Nevis
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

In order to facilitate building in an lxd container behind a firewall, it should be possible to pass proxy variables (http_proxy, https_proxy, no_proxy) that are defined as part of the lxd core configuration to the lxc exec command. Note entirely sure this will fix the whole issue, because the snapcraft squashfs makes it difficult to overwrite the file to test the fix, but this seems like part of the issue.

class LXDInstanceProvider:
    """Provide the minimal Provider methods to be able to use the SnapInjector.
    """

   ...

    def run(self, command: Sequence[str], hide_output: bool = False):
        cmd = ["lxc", "exec", self._instance_name, "--"] + list(command)

Bryon Nevis (bnevis)
description: updated
Revision history for this message
Alberto Donato (ack) wrote :

Can't snapcraft just look at environment variables ($http_proxy, $https_proxy) and pass them along in the container configuration?

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.