-
Notifications
You must be signed in to change notification settings - Fork 23
CA-417641 Update ntp-dhcp server file path #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CA-417641 Update ntp-dhcp server file path #74
Conversation
xsconsole can set ntp to Use DHCP NTP Servers or Use Default NTP Servers, Provide NTP Servers Manually. This is so-called dhcp default and manual mode. When switching from other modes to DHCP, the DHCP-provided NTP servers should be added to the Chrony sources. Conversely, they should be removed when switching away from DHCP. In XS9, the ntp-dhcp server path is outdated as the chrony version update, comparing to XS8. xs8-chrony: version 3.2, the server file with dhclient is /var/lib/dhclient/chrony.servers.$interface xs9-chrony: version 4.6.1, the server file with dhclient is /run/chrony-dhcp/$interface.sources So the path should be updated. Signed-off-by: Changlei Li <[email protected]>
|
Test: After the fix switch form |
| os.chmod("/etc/dhcp/dhclient.d/chrony.sh", newPermissions) | ||
|
|
||
| getstatusoutput("rm -f /var/lib/dhclient/chrony.servers.*") | ||
| getstatusoutput("rm -f /run/chrony-dhcp/*.sources") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file is removed,
what happens if user want to change back to dhcp mode? (without interface configure update, e.g: chrony.sh has no chance to run to regenerate the file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See L605 above in AddDHCPNTP, the file will be created and filled.
xsconsole can set ntp to
Use DHCP NTP ServersorUse Default NTP Servers,Provide NTP Servers Manually. This is so-calleddhcpdefault andmanualmode.When switching from other modes to DHCP, the DHCP-provided NTP servers should be added to the Chrony sources. Conversely, they should be removed when switching away from DHCP.
In XS9, the ntp-dhcp server path is outdated as the chrony version update, comparing to XS8.
xs8-chrony: version 3.2, the server file with dhclient is
/var/lib/dhclient/chrony.servers.$interfacexs9-chrony: version 4.6.1, the server file with dhclient is
/run/chrony-dhcp/$interface.sourcesIt takes effect by write
server $source iburst preferto/run/chrony-dhcp/$interface.sourcesand/run/chrony-dhcpis sourcedir in/etc/chrony.conf.