[Bug 1892447] Re: Why ignore new name server if 3 name servers exists
Hi Paride, We are hitting this on RHEL as well -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1892447 Title: Why ignore new name server if 3 name servers exists To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1892447/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1892447] Re: Why ignore new name server if 3 name servers exists
** Changed in: cloud-init (Ubuntu) Status: New => Triaged ** Changed in: cloud-init (Ubuntu) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1892447 Title: Why ignore new name server if 3 name servers exists To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1892447/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1892447] Re: Why ignore new name server if 3 name servers exists
Hi, I agree: the "stale" resolv.conf may disrupt the nameserver configuration, and do it in a way that depends on the number of nameservers listed there. Adding the /etc/resolv.conf nameservers to the *tail* of the nameserver list (trimmed to 3 entries) may be the most sensible thing to do. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1892447 Title: Why ignore new name server if 3 name servers exists To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1892447/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1892447] Re: Why ignore new name server if 3 name servers exists
I set back to 'New', Pengpeng's comment does make sense. cloudinit/net/sysconfig.py's render_network_state calls _render_dns. _render_dns then will load the existing file if it is present. So the end result is that if we have a "stale" version of /etc/resolv.conf on the system, then the dns servers provided in networking configuration get appended to that list. That does seem wrong, and results in the desired networking configuration not being applied. ** Changed in: cloud-init (Ubuntu) Status: Expired => New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1892447 Title: Why ignore new name server if 3 name servers exists To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1892447/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1892447] Re: Why ignore new name server if 3 name servers exists
[Expired for cloud-init (Ubuntu) because there has been no activity for 60 days.] ** Changed in: cloud-init (Ubuntu) Status: Incomplete => Expired -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1892447 Title: Why ignore new name server if 3 name servers exists To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1892447/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1892447] Re: Why ignore new name server if 3 name servers exists
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. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1892447 Title: Why ignore new name server if 3 name servers exists To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1892447/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1892447] Re: Why ignore new name server if 3 name servers exists
Hi Pengpeng, I think it boils down to arbitrary choice: we either need to discard the head or the tail of the list, and the current implementation discards the tail. I think the most common way to order nameservers is by decreasing priority, so the current implementation is the least surprising to me. Do you have a specific reason to ask for the other way around? Thanks! Paride ** Changed in: cloud-init (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1892447 Title: Why ignore new name server if 3 name servers exists To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1892447/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs