Skip to content
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

Make sure we're running with correct time on installation #568

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dirkmueller
Copy link
Contributor

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.

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.
@@ -322,6 +322,9 @@ def find_node_boot_mac_addresses(node, admin_data_net)
cloud_available = true if name.include? "Cloud"
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 }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. 125/100

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a hint: you don't need the Chef::Recipe:: prefix (but that won't help with the hound warning)

Copy link
Member

@rsalevsky rsalevsky Jul 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@@ -12,6 +12,7 @@
<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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dirkmueller can you add something like <% unless @ntp_servers.empty? -%> to protect against an empty list of ntp servers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

9 participants