Using EnvironmentFile= for slurping in /etc/environment is a standard thing indeed (I just fixed the description to add the missing "-" prefix, in case the file does not exist); this is the counterpart of sourcing /etc/environment into init.d scripts or upstart jobs.
This is more of a philosophical question, whether we want /etc/environment to influence lxd's environment or not. ** Description changed: In the Canonical DC one needs to use a proxy to download images from outside, such as images.linuxcontainers.org. This currently causes some trouble (like in https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac /autopkgtest-xenial/xenial/amd64/a/autopkgtest/20160314_110014@/log.gz). AFAIUI, lxd-images is being deprecated, in favor of adding and launching from remotes. The lxd-images command used the proxy information from the current shell, but with "lxc launch images:..." it is the running lxd daemon which does the download, and thus the proxy info on the current shell is meaningless. But the lxd daemon process does not have any proxy environment set. So I'm looking for a sensible way to configure a default proxy for image downloads. In my local test I just added - "EnvironmentFile=/etc/environment" to /lib/systemd/system/lxd.service's + "EnvironmentFile=-/etc/environment" to /lib/systemd/system/lxd.service's [Service], as that's the most likely place where this is set by default (and that's also where ubuntu-system-service writes it when you configure a system-wide proxy in the control center). Would that be acceptable to add by default? /etc/environment is normally read by pam_env and thus is mostly meant for user sessions, cron jobs etc.¸ but there's some precedent for sourcing /etc/environment in init.d scripts and upstart jobs. Alternatively, is there some way that this can be configured in a different file, so that it applies to lxd as soon as it gets apt-get install'ed (via a test dependency)? ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: lxd 2.0.0~rc3-0ubuntu1 ProcVersionSignature: Ubuntu 4.4.0-12.28-generic 4.4.4 Uname: Linux 4.4.0-12-generic x86_64 ApportVersion: 2.20-0ubuntu3 Architecture: amd64 CurrentDesktop: i3 Date: Mon Mar 14 21:18:33 2016 EcryptfsInUse: Yes SourcePackage: lxd UpgradeStatus: No upgrade log present (probably fresh install) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1557161 Title: Use proxy from /etc/environment or other system-wide config file To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lxd/+bug/1557161/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
