snap core store-proxy-id not set during bootstrap
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
With the new feature to install MongoDB from a snap, it became much more relevant to have a snap store proxy setup for the LXD provider. Otherwise it downloads all of core core 18 and juju-db on every bootstrap.
However, *during* the bootstrap process, the snap settings are not set yet:
2019-03-20 17:08:11 INFO juju.mongo mongo.go:511 Ensuring mongo server is running; data directory /var/snap/
root@juju-
error: unknown command "status", see 'snap help'
root@juju-
Key Value
cloud {...}
refresh {...}
seed {...}
root@juju-
{
"cloud": {
},
"refresh": {
},
"seed": {
}
}
We *definitely* need to check for them before we run 'snap install' of *anything*.
While for local development this is a 'nice to have'. If we get to production, they won't have outbound access *at all* without the proxy being set.
These are the settings "snap-store-proxy", and "snap-store-
(in the first test, I accidentally used 'snap-store-id' which is the ProxyConfig value, not 'snap-store-proxy' which is the environs/config value. However, I fixed that, and bootstrapped a second time, and saw the same behavior. We are running 'snap install' before we have configured snap-store-proxy.)
description: | updated |
With the right config set, once the machine has finished bootstrapping, I do see: 50ff28- 0:~# sudo snap get core -d
"name" : "unknown"
"http" : "",
"https" : "",
"store" : "yFsGTy6qwkrVIS eJI1JjU09v9Uxlc 0Gf"
"hold" : "2019-03- 20T19:42: 00.762131261Z"
"loaded" : true
root@juju-
{
"cloud": {
},
"proxy": {
},
"refresh": {
},
"seed": {
}
}
So the config is correct. I can also see that "snap install juju --classic --channel 2.5/edge" downloads at approx 100MB/s so it is clearly using the local snap store proxy.
We just need to configure that before we install juju-db.