Changing the DNS after microstack.init has been run is more difficult than it should be
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MicroStack |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
microstack.init reads the value of config.network.dns, then writes it into $SNAP_COMMON/
To change that value later, you need to:
1) Update the value of config.network.dns
2) Hand edit dhcp_agent.ini
3) Restart the snap
Instead, you should be able to:
1) Update the value of config.network.dns (possibly via a wrapper)
2) Invoke microstack.init in such a way that it will update the file and restart just the services that need a restart (possibly the wrapper above handles this, too)
The work involved is:
1) Refactor microstack_init to write dhcp_agent.ini via a template, rather than writing it directly in the init script.
2) Write the wrapper/add hooks to microstack.init to enable the above.
Changed in microstack: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in microstack: | |
importance: | Medium → Wishlist |
I can't get this to work at all.
sudo snap set microstack config. network. dns-servers= 10.246. 112.3
The snap was restarted:
$ sudo snap restart microstack
The procedure was confirmed:
$ sudo snap get microstack config. network. dns-servers
10.246.112.3
A VM was created:
$ microstack launch cirros -n test
But the nameserver does not change from the default of 1.1.1.1 :
$ ssh -i /home/ubuntu/ snap/microstack /common/ .ssh/id_ microstack cirros@10.20.20.85 cat /etc/resolv.conf
search bad
nameserver 1.1.1.1
I'm not sure why dhcp_agent.ini needs to also be created but I tried it, in addition to all the above:
$ cat /var/snap/ microstack/ common/ etc/neutron/ dhcp_agent. ini
[DEFAULT]
interface_driver = openvswitch agent.linux. dhcp.Dnsmasq isolated_ metadata = True
dhcp_driver = neutron.
enable_
dnsmasq_dns_servers = 10.246.112.3
This was followed by a restart of the snap, as before. No change was observed upon the creation of a new VM.