Yeah, the overlay form is busted then.
On Dec 12, 2013 1:50 PM, "Sébastien Braun" <[email protected]> wrote:
> Thanks for the trick, here it is:
>
> {
> "crowbar": {
> "ntp": {
> "external_servers": "0.europe.pool.ntp.org"
> }
> }
> }
>
> it confirms it's a string.
>
> Thanks again.
> Sébastien.
>
>
> On Thu, Dec 12, 2013 at 4:59 PM, <[email protected]> wrote:
>
>> Thanks.
>>
>>
>>
>> Please check the user data in the matching deployment role using the URL
>> /deployments/system/roles/ntp-server?raw=true
>>
>>
>>
>> That should show you the data being injected. It’s possible that the
>> overlay form put the data in wrong.
>>
>>
>>
>> I believe it should be an array, not a single string.
>>
>>
>>
>> Here’s the raw template:
>>
>>
>>
>> {
>>
>> "crowbar": {
>>
>> "ntp": {
>>
>> "external_servers": [
>>
>>
>>
>> ]
>>
>> }
>>
>> }
>>
>> }
>>
>>
>>
>> *From:* Sébastien Braun [mailto:[email protected]]
>> *Sent:* Thursday, December 12, 2013 9:32 AM
>> *To:* Hirschfeld, Rob
>> *Cc:* crowbar
>>
>> *Subject:* Re: [Crowbar] NTP cookbook broken in CB20
>>
>>
>>
>> CB2.0 code date from dec 6.
>>
>>
>>
>> Here is the error message that I've got when adding an NTP server like
>> 0.europe.pool.ntp.org in the bootstrap web UI (/utils/bootstrap)
>>
>> [2013-12-07T18:04:41-06:00] INFO: Forking chef instance to converge...
>>
>> [2013-12-07T18:04:41-06:00] INFO: *** Chef 11.6.0 ***
>>
>> [2013-12-07T18:04:42-06:00] INFO: Setting the run_list to
>> ["recipe[barclamp]", "recipe[ohai]", "recipe[utils]", "role[ntp-server]",
>> "recipe[crowbar-hacks::solo-saver]"] from JSON
>>
>> [2013-12-07T18:04:42-06:00] INFO: Run List is [recipe[barclamp],
>> recipe[ohai], recipe[utils], role[ntp-server],
>> recipe[crowbar-hacks::solo-saver]]
>>
>> [2013-12-07T18:04:42-06:00] INFO: Run List expands to [barclamp, ohai,
>> utils, ntp, crowbar-hacks::solo-saver]
>>
>> [2013-12-07T18:04:42-06:00] INFO: Starting Chef Run for crowbar.lab.int
>>
>> [2013-12-07T18:04:42-06:00] INFO: Running start handlers
>>
>> [2013-12-07T18:04:42-06:00] INFO: Start handlers complete.
>>
>> [2013-12-07T18:04:42-06:00] INFO: ohai plugins will be at:
>> /etc/chef/ohai_plugins
>>
>> [2013-12-07T18:04:42-06:00] INFO: Processing
>> directory[/etc/chef/ohai_plugins] action create (ohai::default line 23)
>>
>> [2013-12-07T18:04:42-06:00] INFO: Processing
>> remote_directory[/etc/chef/ohai_plugins] action create (ohai::default line
>> 32)
>>
>> [2013-12-07T18:04:42-06:00] INFO: Processing
>> cookbook_file[/etc/chef/ohai_plugins/crowbar.rb] action create (dynamically
>> defined)
>>
>> [2013-12-07T18:04:42-06:00] INFO: Processing
>> cookbook_file[/etc/chef/ohai_plugins/README] action create (dynamically
>> defined)
>>
>> [2013-12-07T18:04:42-06:00] INFO: Processing
>> directory[/etc/chef/ohai_plugins] action nothing (ohai::default line 23)
>>
>> [2013-12-07T18:04:42-06:00] INFO: Processing
>> remote_directory[/etc/chef/ohai_plugins] action nothing (ohai::default line
>> 32)
>>
>> [2013-12-07T18:04:42-06:00] INFO: Processing log[running on OS:[ubuntu] on
>> VMware Virtual Platform hardware ] action write (utils::default line 28)
>>
>> [2013-12-07T18:04:42-06:00] INFO: running on OS:[ubuntu] on VMware Virtual
>> Platform hardware
>>
>> [2013-12-07T18:04:42-06:00] INFO: Processing package[ntp] action install
>> (ntp::default line 16)
>>
>> [2013-12-07T18:04:43-06:00] INFO: Processing user[ntp] action create
>> (ntp::default line 30)
>>
>> [2013-12-07T18:04:43-06:00] INFO: Processing template[/etc/ntp.conf] action
>> create (ntp::default line 31)
>>
>> [0m
>>
>> ================================================================================[0m
>>
>> [31mError executing action `create` on resource 'template[/etc/ntp.conf]'[0m
>>
>> ================================================================================[0m
>>
>>
>>
>> [0m
>>
>> Chef::Mixin::Template::TemplateError[0m
>>
>> ------------------------------------[0m
>>
>> undefined method `each' for "0.europe.pool.ntp.org":String[0m
>>
>>
>>
>> [0m
>>
>> Resource Declaration:[0m
>>
>> ---------------------[0m
>>
>> # In /var/chef/cookbooks/ntp/recipes/default.rb
>>
>>
>>
>> 31: template "/etc/ntp.conf" do
>>
>> 32: owner "root"
>>
>> 33: group "root"
>>
>> 34: mode 0644
>>
>> 35: source "ntp.conf.erb"
>>
>> 36: variables(:ntp_servers => ntp_servers)
>>
>> 37: notifies :restart, "service[ntp]"
>>
>> 38: end
>>
>> 39:
>>
>> [0m
>>
>>
>>
>> [0m
>>
>> Compiled Resource:[0m
>>
>> ------------------[0m
>>
>> # Declared in /var/chef/cookbooks/ntp/recipes/default.rb:31:in `from_file'
>>
>>
>>
>> template("/etc/ntp.conf") do
>>
>> provider Chef::Provider::Template
>>
>> action "create"
>>
>> retries 0
>>
>> retry_delay 2
>>
>> path "/etc/ntp.conf"
>>
>> backup 5
>>
>> atomic_update true
>>
>> source "ntp.conf.erb"
>>
>> variables {:ntp_servers=>"0.europe.pool.ntp.org"}
>>
>> cookbook_name :ntp
>>
>> recipe_name "default"
>>
>> owner "root"
>>
>> group "root"
>>
>> mode 420
>>
>> end
>>
>> [0m
>>
>>
>>
>> [0m
>>
>> Template Context:[0m
>>
>> -----------------[0m
>>
>> on line #20
>>
>> 18: fudge 127.127.1.0 stratum 1
>>
>> 19: <% else -%>
>>
>> 20: <% @ntp_servers.each do |ntp_server| -%>
>>
>> 21: server <%= ntp_server %> iburst minpoll 4
>>
>> 22: <% end -%>[0m
>>
>>
>>
>> [0m
>>
>> [2013-12-07T18:04:43-06:00] INFO: Running queued delayed notifications
>> before re-raising exception
>>
>> [2013-12-07T18:04:43-06:00] ERROR: Running exception handlers
>>
>> [2013-12-07T18:04:43-06:00] ERROR: Exception handlers complete
>>
>> [2013-12-07T18:04:43-06:00] FATAL: Stacktrace dumped to
>> /var/chef/cache/chef-stacktrace.out
>>
>> [2013-12-07T18:04:43-06:00] FATAL: Chef::Exceptions::ChildConvergeError:
>> Chef run process exited unsuccessfully (exit code 1)
>>
>>
>>
>> Thanks Rob
>>
>>
>>
>> On Thu, Dec 12, 2013 at 3:32 PM, <[email protected]> wrote:
>>
>> Sebastien,
>>
>> Could you provide some more information about your set and which version
>> of the code (date) you are using?
>>
>> The update NTP to an external value has had minimal testing and likely
>> needs to be checked. We've also been making recent changes to update how
>> attributes are handled but those have not been reflected in the UI.
>>
>> The 1st step in troubleshooting would be to look at the actual json on
>> the node role in "raw" mode.
>>
>> Rob
>>
>> From: crowbar-bounces On Behalf Of Sébastien Braun
>> Sent: Thursday, December 12, 2013 6:58 AM
>> To: crowbar
>> Subject: Re: [Crowbar] NTP cookbook broken in CB20
>>
>>
>> Hi Adam,
>>
>> It's not an Array when bootstrapping the admin node from the Crowbar 2.0
>> Web UI, but a string.
>>
>> When you run the installer with --wizard, you get the opportunity to
>> setup things before installing the admin node, when you give a NTP server
>> information in the UI it's given to the NTP cookbook as a string.
>>
>> Thanks,
>>
>> --
>> Sébastien
>>
>>
>>
>>
>>
>> --
>> Sébastien
>>
>
>
>
> --
> Sébastien
>
> _______________________________________________
> Crowbar mailing list
> [email protected]
> https://lists.us.dell.com/mailman/listinfo/crowbar
> For more information: http://crowbar.github.com/
>
_______________________________________________
Crowbar mailing list
[email protected]
https://lists.us.dell.com/mailman/listinfo/crowbar
For more information: http://crowbar.github.com/