[lxc-devel] [LXD] Default routes changes.

Stéphane Graber stgraber at ubuntu.com
Fri Dec 19 18:34:07 UTC 2014


On Thu, Dec 18, 2014 at 11:16:16PM +0530, Kunal Kushwaha wrote:
> Hi,
> 
> With ref to LXD issue #114 <https://github.com/lxc/lxd/issues/114>
> 
> There are two ways to implement the default roots.
> 
> 1. Initialize within code.
> Instead of initializing with empty Config Structure at
> https://github.com/lxc/lxd/blob/master/config.go#L56
> 
> can  be initialized as
> 
> remotes := map[string]RemoteConfig{
> "images": RemoteConfig{"https+registry://registry.linuxcontainers.org"},
> "local":  RemoteConfig{"unix+lxd://var/lib/lxd/socket"},
> }
> 
> defaultConfig := &Config{TestOption: "",
> DefaultRemote: "",
> Remotes:       remotes,
> ListenAddr:    "80"}
> 
> 
> 
> 2. Create a default config file.
> While installation, a default config.yml can be create with default
> settings.
> 
> ---
> test-option:
> default-remote:
> remotes:
>   images:
>     addr: https+registry://registry.linuxcontainers.org
>   local:
>     addr: unix+lxd://var/lib/lxd/socket
> listen-addr: 80
> 
> 
> Which approach is better?
> 
> 
> Regards,
> Kunal Kushwaha

So I think we'd need something closer to option 1 since the actual list
of default remotes may vary depending on the system.

See: https://github.com/lxc/lxd/issues/114

The "local" entry must only be added and set as default if there
is a lxd socket. If there isn't, only the images one should be present
and no remote should be set as default.


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20141219/8f73617f/attachment.sig>


More information about the lxc-devel mailing list