Chef Upgrade issue


#1

Hello everyone.

We had chef-server v10.8.0 and decided to migrate to the latest one.
Migration was done following closely this article
http://www.opscode.com/blog/2013/03/12/5106/.
New chef server is up and running.

Everything is good except one problem:
chef-server now stores data which were in cookbook files like this:

123(it can be any random number)

^M
0^M
^M

And of course chef-client throws an exception.Here is a small stacktrace:
Relevant File Content:

/usr/local/rvm/gems/ruby-1.9.3-p392/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:

23:
24: # Loads a given ruby file, and runs instance_eval against it in the
context of the current
25: # object.
26: #
27: # Raises an IOError if the file cannot be found, or is not
readable.
28: def from_file(filename)
29: if File.exists?(filename) && File.readable?(filename)
30>> self.instance_eval(IO.read(filename), filename, 1)
31: else
32: raise IOError, "Cannot open or read #{filename}!"
33: end
34: end
35:
36: # Loads a given ruby file, and runs class_eval against it in the
context of the current
37: # object.
38: #
39: # Raises an IOError if the file cannot be found, or is not
readable.

[2013-04-30T13:00:21+03:00] ERROR: Running exception handlers
[2013-04-30T13:00:21+03:00] FATAL: Saving node information to
/var/chef/cache/failed-run-data.json
[2013-04-30T13:00:21+03:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated
[2013-04-30T13:00:21+03:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[2013-04-30T13:00:21+03:00] FATAL: SyntaxError:
/var/chef/cache/cookbooks/nginx/attributes/upstream.rb:1: syntax error,
unexpected tIDENTIFIER, expecting $end

It complains on any file not just upstream.rb

Here is example file:
cat /var/chef/cache/cookbooks/uptodate/attributes/default.rb
60
default[:yum][:updates][:excludes] = [ ‘kernel’ ]

0

The question is how i can get rid of this strange symobls and numbers in
cookbook data after upload?I also tried upload cookbooks in an empty database
with knife cookbook upload cookbooks/.Result is the same.