Make sure we're running with correct time on installation#568
Open
dirkmueller wants to merge 1 commit intocrowbar:masterfrom
Open
Make sure we're running with correct time on installation#568dirkmueller wants to merge 1 commit intocrowbar:masterfrom
dirkmueller wants to merge 1 commit intocrowbar:masterfrom
Conversation
With machines that don't have proper RTC time, we're running into nasty issues when trying to install on a system that is thinking it lives in the 70ties.
| end | ||
|
|
||
| ntp_servers = search(:node, "roles:ntp-server") | ||
| ntp_servers_ips = ntp_servers.map { |n| Chef::Recipe::Barclamp::Inventory.get_network_by_type(n, "admin").address } |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. 125/100
Member
There was a problem hiding this comment.
Just a hint: you don't need the Chef::Recipe:: prefix (but that won't help with the hound warning)
Member
There was a problem hiding this comment.
Using a multiline do block should do the trick here and hound should be happy.
ntp_servers_ips = ntp_servers.map do |n|
Chef::Recipe::Barclamp::Inventory.get_network_by_type(n, "admin").address
end
vuntz
suggested changes
Nov 24, 2016
| <final_reboot config:type="boolean">false</final_reboot> | ||
| <halt config:type="boolean">false</halt> | ||
| <second_stage config:type="boolean">true</second_stage> | ||
| <ntp_sync_time_before_installation><%= @ntp_servers.first %></ntp_sync_time_before_installation> |
Member
There was a problem hiding this comment.
@dirkmueller can you add something like <% unless @ntp_servers.empty? -%> to protect against an empty list of ntp servers?
vuntz
suggested changes
Jan 6, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With machines that don't have proper RTC time, we're running into
nasty issues when trying to install on a system that is thinking it
lives in the 70ties.