-
Notifications
You must be signed in to change notification settings - Fork 57
Make sure we're running with correct time on installation #568
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Metrics/LineLength: Line is too long. 125/100
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a hint: you don't need the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| autoyast_template = mnode[:state] == "os-upgrading" ? "autoyast-upgrade" : "autoyast" | ||
| template "#{node_cfg_dir}/autoyast.xml" do | ||
| mode 0644 | ||
|
|
@@ -341,6 +344,7 @@ def find_node_boot_mac_addresses(node, admin_data_net) | |
| node_ip: mnode[:crowbar][:network][:admin][:address], | ||
| node_fqdn: mnode[:fqdn], | ||
| node_hostname: mnode[:hostname], | ||
| ntp_servers: ntp_servers_ips, | ||
| platform: target_platform_distro, | ||
| target_platform_version: target_platform_version, | ||
| architecture: arch, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will possibly fail if there are no ntp servers configured; don't know how autoyast behaves in that case.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From AutoYaST:
which sounds like the installation will fail in case of a missing NTP server. |
||
| </mode> | ||
| <mouse> | ||
| <id>none</id> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dirkmueller can you add something like |
||
| </mode> | ||
| <mouse> | ||
| <id>none</id> | ||
|
|
||
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.
use
search_env_filteredThere 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.
we don't seem to be very consistent on this. there is no other usage of search_env_filtered in crowbar-core (actually I can find it only in the nova barclamp, which is strange..)
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.
search_env_filtered(andget_instance) should only be used when a proposal references another proposal through its attributes. It's not the case here, as the provisioner proposal doesn't reference the ntp proposal.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.
Can you replace this line with:
Uh oh!
There was an error while loading. Please reload this page.
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.
@vuntz Why can't it retrieve the servers from the new config databag, like in #947?
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's possible now; my comment was from before this got merged :-)