-
Notifications
You must be signed in to change notification settings - Fork 328
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
fix is_virtual detection issue
#235
Conversation
| @@ -31,7 +31,7 @@ interface listen <%= interface %> | |||
| server <%= server %><% if @iburst_enable == true -%> iburst<% end %><% if @preferred_servers.include?(server) -%> prefer<% end %> | |||
| <% end -%> | |||
|
|
|||
| <% if scope.lookupvar('::is_virtual') == "false" or @udlc -%> | |||
| <% if scope.lookupvar('::is_virtual') == "true" or @udlc -%> | |||
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.
why does this use scope.lookupvar anyway?
are facts not exposed as @fact, too?
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.
it can be look up via @fact, just follow previous change : )
adjust the expression to ensure `127.127.1.0` is set only if target is running under virtual environment or `udlc` is set. if `server` pointed to `127.127.1.0` without `preferred_servers` settings, it would try to sync with itself but not to the `server`.
|
+1 |
fix `is_virtual` detection issue
|
Actually, I don't agree with this. UDLC should not be used on VMs, and this is a backwards incompatible change (as the udlc will now be ENABLED on all vms instead of disabled). Perhaps the |
|
I also think I disagree with "if server pointed to 127.127.1.0 without preferred_servers settings, it |
The UDLC should really only be used on machines with accurate clocks, and this logic was reversed incorrectly. This PR also allows the udlc setting to be overridden, whereas before it was not.
Fix PR #235 and make udlc configurable
adjust the expression to ensure
127.127.1.0is set only if target is runningunder virtual environment or
udlcis set.if
serverpointed to127.127.1.0withoutpreferred_serverssettings, itwould try to sync with itself but not to the
server.