<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 13 January 2017 at 08:14, Max Brustkern <span dir="ltr"><<a href="mailto:max.brustkern@canonical.com" target="_blank">max.brustkern@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>So I created a system directory with the contents of /lib/systemd/system. I edited that file to contain the environment variables:<br>nuclearbob@localhost:~$ cat /lib/systemd/system/snapd.<wbr>service <br>[Unit]<br>Description=Snappy daemon<br>Requires=snapd.socket<br><br>[Service]<br>ExecStart=/usr/lib/snapd/snapd<br>EnvironmentFile=/etc/<wbr>environment<br>Restart=always<br>http_proxy=<a href="http://squid.internal:3128" target="_blank">http://squid.<wbr>internal:3128</a><br>https_proxy=<a href="https://squid.internal:3128" target="_blank">https://squid.<wbr>internal:3128</a></div></div></div></div></div></blockquote><div><br></div><div>That's not the right syntax, it should be</div><div><br></div><div>Environment=http_proxy=<a href="http://squid.internal:3128/" target="_blank">http://squid.<wbr>internal:3128</a> https_proxy=<a href="https://squid.internal:3128/" target="_blank">https://squid.<wbr>internal:3128</a></div><div><br></div><div>See man systemd.exec for more details on this.</div><div><br></div><div>Cheers,</div><div>mwh</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><br>[Install]<br>WantedBy=multi-user.target<br><br></div>I then did:<br>nuclearbob@localhost:~$ sudo systemctl daemon-reload<br>nuclearbob@localhost:~$ sudo service snapd restart<br><br></div>I still don't seem to see snapd picking up on the proxy. I tried:<br>sudo systemctl edit snapd<br></div>I pasted in the file contents to there, but after that I get:<br>nuclearbob@localhost:~$ sudo service snapd restart<br>Failed to restart snapd.service: Unit snapd.service is not loaded properly: Invalid argument.<br>See system logs and 'systemctl status snapd.service' for details.<br>nuclearbob@localhost:~$ systemctl status snapd.service<br>● snapd.service - Snappy daemon<br>   Loaded: error (Reason: Invalid argument)<br>  Drop-In: /etc/systemd/system/snapd.<wbr>service.d<br>           └─override.conf<br>   Active: active (running) since Thu 2017-01-12 19:11:46 UTC; 2min 26s ago<br> Main PID: 1339 (snapd)<br>   CGroup: /system.slice/snapd.service<br>           └─1339 /usr/lib/snapd/snapd<br><br></div>Any additional tips to get snapd running on ubuntu core in the lab?<br><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="gmail-h5">On Wed, Jan 11, 2017 at 11:49 PM, Stuart Bishop <span dir="ltr"><<a href="mailto:stuart.bishop@canonical.com" target="_blank">stuart.bishop@canonical.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="gmail-m_1319056982746270045gmail-">On 12 January 2017 at 01:44, Max Brustkern <span dir="ltr"><<a href="mailto:max.brustkern@canonical.com" target="_blank">max.brustkern@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>I'm trying to run ubuntu core 16 in a kvm instance in an internal lab that requires a web proxy. This bug:<br><a href="https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1579652" target="_blank">https://bugs.launchpad.net/ubu<wbr>ntu/+source/snapd/+bug/1579652</a><br></div>seems to cover how to do this on classic ubuntu, but the files that hold the environment variables used by snapd on an ubuntu core system are all on read-only filesystems. How do I set HTTPS_PROXY in a persistent way for snapd on that system?<br></div></div></div></blockquote></span><div><br><a href="https://bugs.launchpad.net/snappy/+bug/1533899" target="_blank">https://bugs.launchpad.net/sna<wbr>ppy/+bug/1533899</a> is similar, but about adding support for proxies to snapd (rather than have it use the system environment variables, which is one implementation option but not always what you want since that affects everything on the system). But that doesn't help with your read-only filesystem sorry :-(<br><br></div><div>(Hmm... disgusting hack idea.... since you can't create /etc/systemd/system/snapd.serv<wbr>ice.d/ on your read-only filesystem, try mounting that directory from somewhere. Extra points for using systemd to mount the systemd service file overrides and setting up dependencies so it does everything in the right order :-) )<span class="gmail-m_1319056982746270045gmail-HOEnZb"><font color="#888888"><br></font></span></div></div><span class="gmail-m_1319056982746270045gmail-HOEnZb"><font color="#888888"><br clear="all"><br>-- <br><div class="gmail-m_1319056982746270045gmail-m_258486575297686928gmail_signature">Stuart Bishop <<a href="mailto:stuart.bishop@canonical.com" target="_blank">stuart.bishop@canonical.com</a>></div>

</font></span></div></div>
<br></div></div><span class="gmail-HOEnZb"><font color="#888888">--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/snapcraft</a><br>
<br></font></span></blockquote></div><br></div></div></div></div></div></div></div>
<br>--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/snapcraft</a><br>
<br></blockquote></div><br></div></div>