Comment 2 for bug 1892447

Revision history for this message
Pengpeng Sun (pengpengs) wrote :

emm...I see the new name servers are appended to the current name servers list. https://github.com/canonical/cloud-init/blob/master/cloudinit/distros/parsers/resolv_conf.py#L79

So the new name servers are always in the tail, if there are already 3 current name servers exist, then any new name servers will be discarded.

In our scenario, new name servers sent to cloud-init by OVF datasource, but the result is inconsistent, depends on how many name servers exist before power-on.

If change the implementation to append the current name servers to the new name servers, then the current name servers are in the tail, then keep the first 3 of the list. In such way, new name servers can be always set.