Update /etc/resolv.conf when nameservers are changed in Network -> Global Configuration
Nameserver was set to 127.0.0.1 when domain controller was turned on and off...
and now, even if I tried to update the nameserver via new UI (nameserverui.png), it doesn't set it to the new nameserver(which is confirmed by cat /etc/resolv.conf, nameservershell.png)
Then I realized, even old UI is behaving the same way.
Possible a middleware issue since UI is unable to change/set the nameserver
Refer the screenshot for reference
NOTE: I double checked doing the same thing with FreeNAS-11.1-U4 version in which it worked,
UI was able to update nameserver! cross-checked via cat /etc/resolv.conf
#1 Updated by Dru Lavigne over 2 years ago
- Category set to Middleware
- Assignee changed from Release Council to William Grzybowski
- Target version set to 11.2-RC2
- Private changed from No to Yes
- Reason for Blocked set to Need additional information
Rishabh: please attach a debug (System -> Advanced -> Save Debug) to this ticket from the nightlies system.
#2 Updated by William Grzybowski over 2 years ago
- Assignee changed from William Grzybowski to Waqar Ahmed
- Target version changed from 11.2-RC2 to 11.2-BETA1
- Severity set to Med High
Waqar, something went wrong in the middlewared conversion here. We are calling service.restart for every service, where as in the legacy UI we called just "start" for some (at least resolvconf).
#10 Updated by Rishabh Chauhan over 2 years ago
- File nameserveroldui.png nameserveroldui.png added
- File nameserverolduibefore.png nameserverolduibefore.png added
- File netconf.png netconf.png added
- Status changed from Ready for Testing to Failed Testing
- Needs QA changed from Yes to No
It is still behaving the same way. I have attached two screenshots one is before (nameserverolduibefore) turning domain controller on and off, the other one is after(nameserveroldui)...
Note: it doesn't update the settings in the network> Global configuration(they remain the same as before domain controller toggle) even though /etc/resolv.conf says nameserver as 127.0.0.1
Another additional Note: Going to network> Global configuration(screenshot netconf) and saving the pre-populated setup which is the old config before domain controller doesn't update /etc/resolv.conf , it only cupdate it when i change it to something else, like 10.231.1.0 to 10.231.1.1
#11 Updated by Rishabh Chauhan over 2 years ago
After conversating with Waqar we came to an understandable explanation of the ticket in 3 steps:
1. if turning on/off of domain controller results in changing /etc/resolv.conf is the correct behavior or not ?
2. Once we turn domain controller on and off the contents of /etc/resolv.conf are refreshed and the new contents aren't reflected in the UI
3. so when the /etc/resolv.conf is changed to "127.0.0.1" (after domain controller on/off) and UI still shows "10.231.1.0" (which is not in sync with resolv.conf)-middleware has not communicated with the UI about the change, I tried to save the configuration again thinking that it will update in resolv.conf (which it didn't) so UI is not sending the information back to middleware either....but when i instead just change the name server to 10.231.1.1(note: its a different IP), it updates everywhere UI as well as /etc/resolv.conf(which is good)
so in the above case, only the Bolded part is behaving normally, rest everything else is an anomaly
#13 Updated by Waqar Ahmed over 2 years ago
Update: The 3 cases outlined earlier by Rishabh were present before the Network Configuration was moved to Middlewared from GUI. The initial description of the issue was valid to the extent that the file /etc/resolv.conf was not being updated when changes were made to the nameserver values in the UI. That issue was resolved in the above mentioned PR. These 3 cases are different and have been around for some time
#14 Updated by Waqar Ahmed over 2 years ago
- Status changed from In Progress to Ready for Testing
Rishabh, I have communicated with William and we have decided that if the Domain Controller is on, then all bets are off. The user should be aware of it's consequences as the changes would be widespread in that case. So for now, let's leave this in the user's hand. They should be careful when using DC. So we test out this ticket based on the issue when /etc/resolv.conf was not being updated when the nameservers were changed in the network configuration. And moving forward we can track the progress of this ticket based on the issue I stated before. Hope I made sense. Cheers