Project

General

Profile

Bug #31308

Update /etc/resolv.conf when nameservers are changed in Network -> Global Configuration

Added by Rishabh Chauhan about 1 year ago. Updated 10 months ago.

Status:
Done
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Middleware
Target version:
Severity:
Med High
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

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

nameserverui.png (36 KB) nameserverui.png Rishabh Chauhan, 04/04/2018 11:12 AM
nameservershell.png (11.8 KB) nameservershell.png Rishabh Chauhan, 04/04/2018 11:12 AM
nameserveroldui.png (15.3 KB) nameserveroldui.png Rishabh Chauhan, 06/06/2018 10:25 AM
nameserverolduibefore.png (16.7 KB) nameserverolduibefore.png Rishabh Chauhan, 06/06/2018 10:25 AM
netconf.png (23.9 KB) netconf.png Rishabh Chauhan, 06/06/2018 10:26 AM
16101
16104
18217
18220
18223

History

#1 Updated by Dru Lavigne about 1 year 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 about 1 year 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).

#3 Updated by Rishabh Chauhan about 1 year ago

  • File debug-freenas-20180404130250.tgz added

#4 Updated by Waqar Ahmed about 1 year ago

  • Status changed from Not Started to In Progress

#5 Updated by Waqar Ahmed about 1 year ago

  • % Done changed from 0 to 90

#6 Updated by Waqar Ahmed about 1 year ago

  • Status changed from In Progress to Done
  • % Done changed from 90 to 100
  • Needs Merging changed from Yes to No

#7 Updated by Dru Lavigne about 1 year ago

  • File deleted (debug-freenas-20180404130250.tgz)

#8 Updated by Dru Lavigne about 1 year ago

  • Subject changed from cannot set DNS in the webui to Reload network configuration after changing a configuration value
  • Private changed from Yes to No
  • Needs Doc changed from Yes to No

#9 Updated by Dru Lavigne 12 months ago

  • Status changed from Done to Ready for Testing

#10 Updated by Rishabh Chauhan 11 months ago

18217
18220
18223

FreeNAS-11.2-MASTER-201806050447
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 11 months 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

#12 Updated by Waqar Ahmed 11 months ago

  • Status changed from Failed Testing to In Progress
  • Reason for Blocked deleted (Need additional information)

#13 Updated by Waqar Ahmed 11 months 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 10 months 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

#17 Updated by Dru Lavigne 10 months ago

  • Subject changed from Reload network configuration after changing a configuration value to Update /etc/resolv.conf when nameservers are changed in Network -> Global Configuration
  • Status changed from Ready for Testing to Done

Also available in: Atom PDF