Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fix LXD domain name to be ".lxd" to match the default network configuration #6460
Conversation
| @@ -212,7 +212,7 @@ func (env *environ) newRawInstance(args environs.StartInstanceParams) (*lxdclien | ||
| cloudcfg.AddRunTextFile(serverCertPath, serverState.Environment.Certificate, 0600) | ||
| } | ||
| - cloudcfg.SetAttr("hostname", hostname) | ||
| + cloudcfg.SetAttr("fqdn", hostname+".lxd") |
| @@ -212,7 +212,7 @@ func (env *environ) newRawInstance(args environs.StartInstanceParams) (*lxdclien | ||
| cloudcfg.AddRunTextFile(serverCertPath, serverState.Environment.Certificate, 0600) | ||
| } | ||
| - cloudcfg.SetAttr("hostname", hostname) | ||
| + cloudcfg.SetAttr("fqdn", hostname+".lxd") | ||
| cloudcfg.SetAttr("manage_etc_hosts", true) |
dooferlad
Oct 17, 2016
Contributor
The commit message says manage_etc_hosts in cloudconfig/containerinit isn't needed. It was removed from there.
frobware
suggested changes
Oct 17, 2016
Commit message is missing QA steps and a link to the bug. Does LXD 2.4 (i.e., 16.10) still use .lxd as a domain? Any tests done against the public clouds?
|
@frobware LXD > 2.3 has a property you can set to change the domain (lxc network get lxdbr0 dns.domain for example) that uses "lxd" as a default. Earlier versions read /etc/default/lxd-bridge and use the LXD_DOMAIN key (ini format). I intend to add the ability to read that property for later versions of LXD. I don't have a strong opinion about if we should try reading the ini file for older versions. Thoughts? |
dooferlad commentedOct 17, 2016
•
Edited 1 time
-
dooferlad
Oct 17, 2016
This is a temporary fix until we can discover the correct domain.
Don't set manage_etc_hosts in cloudconfig/containerinit because it isn't needed for non-LXD provider cases (or so it seems).
Tested by checking that .lxd is the domain used in LXD environments
Tested by checking that .lxd is not used in non-LXD environments (I tried MAAS)
I have also tested by deploying a rabbitmq-server cluster on LXD, which needs name resolution to work.
Fixes:
http://pad.lv/1563271
http://pad.lv/1633126