Hashes don't preserve ordering in Ruby 1.8.7I'd suggest installing and using Chef with the Omnibus Installers, this will give you a modern Ruby environment (1.9.3-p194 or similar)
Cheers,AJOn 8 November 2012 16:03, Jason J. W. Williams < " target="_blank"> > wrote:
So we set up a new Chef client (10.16.2) from scratch and we've noticed some interesting behavior:Any cookbook that relies on iteration over a list of any sort now returns random ordering of the list between runs with no change in the underlying data.For example the following data:default[:testapp][:languages] = {"US" => "ASCII","JP" => "utf-8"}When inserted into a file with this template code:[Languages]<% for language in node[:testapp][:languages].keys-%><%=language%>:<%=node[:testappanguages][language]%><% end-%>Sometimes generates:[Languages]JP:utf-8US:ASCIIAnd other times generates:[Languages]US:ASCIIJP:utf-8Again nothing has changed between runs in the underlying data, cookbooks or roles. This doesn't affect any of our existing nodes (we noticed it but multiple apps on the new node were intermittently and restarting for no reason). Also downgrading the affected node to Chef 0.10.8 or 10.14.2 (the versions we run on the other nodes) doesn't help.Ruby version is 1.8.7 across the board. Unaffected nodes are running Ubuntu 10.04.3 LTS, the affected node is running 10.04.4 LTS.Any ideas what may be causing this?-J
Archive powered by MHonArc 2.6.16.