- From: Gilles Devaux <
>
- To: Gilles Devaux <
>
- Cc:
- Subject: [chef] Re: strange behavior in chef-server
- Date: Wed, 3 Mar 2010 21:07:08 -0800
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=L8NBG3LYczlrFoof7/3hAJS31A5PhNYsdEREx0inAQbC3gIVyed9pjdj5KITULz13U 0AVihh5+N1ogRmqwX1RSVqB1jSI9B99YTKp4MJyr0c61PH08H39fWBx+grFSKf0lhoG8 BNVymyN3ZP3bkjL5qEv+JBhPYJzKJ50rCdvAU=
More info for the second issue, using knife I have a better output.
The duplicate ws1 entry is in the 'attribute' section, the correct list is in
the 'default' section.
It seems the record in the 'attribute' section comes form the node itself.
Now my new settings are in the override section (appears like this in the
web-ui too) but the knife output puts them in 'default'.
If the client received them in the 'default' section then this could explain
my first problem, the templates not being regenerated.
I have been able to change the value in the 'attribute' section or delete
them from the web-ui. I have also changed the template a bit to force a new
compilation and it seems that the attributes get duplicated:
passing
>
:backends => [
>
{ :name => "ws1", :ip => "IP" },
>
{ :name => "ws2", :ip => "IP2" }
>
],
produces
# real servers
server ws1 IP1 check slowstart 1000
server ws2 IP2 check slowstart 1000
server ws1 IP1 check slowstart 1000
server ws2 IP2 check slowstart 1000
this is my template:
# real servers
<% @node[:haproxy][:backends].each do |backend| -%>
server <%= backend[:name] %> <%= backend[:ip] %> check slowstart 1000
<%end-%>
I'll continue to investigate, in the meantime if someone think about
something :)
Thanks
--Gilles
On Mar 3, 2010, at 7:31 PM, Gilles Devaux wrote:
>
Hi,
>
>
I am running chef 0.8.4 on both server and client and I see the following
>
behaviors:
>
>
- updating attributes in a role, uploading to the server and launching
>
chef-client does not trigger the templates to be regenerated, only a
>
modification of the 'source' file seems to trigger it.
>
>
- The server seems to send strange arguments:
>
>
override_attributes "haproxy" => {
>
:backends => [
>
{ :name => "ws1", :ip => "IP" },
>
{ :name => "ws2", :ip => "IP2" }
>
],
>
:listenip => 'IP'
>
}
>
>
is passed as:
>
"haproxy"=>{"listenip"=>"173.203.240.198", "check"=>"check.txt",
>
"backends"=>[{"name"=>"ws1", "ip"=>"IP1"}, {"name"=>"ws1", "ip"=>"IP1"}]}
>
>
and
>
>
"haproxy"=>{"listenip"=>"173.203.240.198",
>
"backends"=>{"0"=>{"name"=>"ws1", "ip"=>"IP1"}, "1"=>{"name"=>"ws2",
>
"ip"=>"IP2"}}}}
>
>
in another section, I haven't been able to isolate the parent, the dump is
>
too big and I have format errors.
>
>
Thanks
>
>
--Gilles
>
Archive powered by MHonArc 2.6.16.