[chef] Re: Upgrade to Chef12 fail to import the environments


Chronological Thread 
  • From: Stephen Delano < >
  • To: " " < >
  • Subject: [chef] Re: Upgrade to Chef12 fail to import the environments
  • Date: Tue, 9 Dec 2014 11:46:04 -0800

Hi Tiago, 

In the Chef 11 install that you're upgrading from, are there any environments? It appears that the process of downloading the files from the source server (Chef 11) did not create an environments directory. If you:

`ls /tmp/chef11-server-data20141209-14126-4pi3rz`

do you see a directory named environments?

Here's the code in question that is causing the failure, if you'd like that level of detail: https://github.com/opscode/opscode-omnibus/blob/master/files/private-chef-ctl-commands/open_source_chef12_upgrade.rb#L119-L122

-Stephen

On Tue, Dec 9, 2014 at 11:18 AM, Tiago Cruz < " target="_blank"> > wrote:
Ohai Chef's,

After a lot of tests, I tried to do the upgrade on my production environment... but fails 'cause can't import the environments:

tmp]# ll /tmp/chef11-server-data20141209-13680-18oxyxs/
total 115k
drwx--S---    8 root root 4.1k Dec  9 18:07 ./
drwsrwsrwt.  15 root root 4.1k Dec  9 18:57 ../
drwxr-sr-x    2 root root  21k Dec  9 18:06 clients/
drwxr-sr-x  318 root root  13k Dec  9 18:07 cookbooks/
drwxr-sr-x   25 root root 4.1k Dec  9 18:06 data_bags/
-rw-r--r--    1 root root  24k Dec  9 18:07 key_dump.json
drwxr-sr-x    2 root root  25k Dec  9 18:06 nodes/
drwxr-sr-x    2 root root  13k Dec  9 18:06 roles/
drwxr-sr-x    2 root root 4.1k Dec  9 18:06 users/

Logs:

Creating /tmp/chef11-server-data20141209-13680-18oxyxs as the location to save the open source Chef 11 server data
...
Created /environments/_default.json
Created /environments/homol.json
Created /environments/production.json
...

Pulling open source Chef 11 database credentials
Finished downloading data from the open source Chef 11 server
Ensuring open source Chef 11 server is stopped
ok: down: bookshelf: 0s, normally up
ok: down: chef-expander: 1s, normally up
ok: down: chef-server-webui: 0s, normally up
ok: down: chef-solr: 0s, normally up
ok: down: erchef: 1s, normally up
ok: down: nginx: 0s, normally up
ok: down: postgresql: 1s, normally up
ok: down: rabbitmq: 0s, normally up
Open source Chef 11 server data downloaded to chef11-server-data20141209-13680-18oxyxs
Created /tmp/chef12-server-data20141209-14126-113ym99 as the location to save the tranformed data
Transforming open source Chef 11 server data for upload to Chef 12 server
/opt/opscode/embedded/lib/ruby/1.9.1/fileutils.rb:1515:in `stat': No such file or directory - /tmp/chef11-server-data20141209-14126-4pi3rz/environments (Errno::ENOENT)
from /opt/opscode/embedded/lib/ruby/1.9.1/fileutils.rb:1515:in `block in fu_each_src_dest'
from /opt/opscode/embedded/lib/ruby/1.9.1/fileutils.rb:1531:in `fu_each_src_dest0'
from /opt/opscode/embedded/lib/ruby/1.9.1/fileutils.rb:1513:in `fu_each_src_dest'
from /opt/opscode/embedded/lib/ruby/1.9.1/fileutils.rb:436:in `cp_r'
from (eval):121:in `block in transform_chef11_data'
from (eval):120:in `each'
from (eval):120:in `transform_chef11_data'
from (eval):45:in `run_upgrade'
from (eval):135:in `block (2 levels) in load_files'
from /opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/omnibus-ctl-0.3.1/lib/omnibus-ctl.rb:177:in `call'
from /opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/omnibus-ctl-0.3.1/lib/omnibus-ctl.rb:177:in `block in add_command_under_category'
from /opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/omnibus-ctl-0.3.1/lib/omnibus-ctl.rb:555:in `run'
from /opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/omnibus-ctl-0.3.1/bin/omnibus-ctl:31:in `<top (required)>'
from /opt/opscode/embedded/bin/omnibus-ctl:23:in `load'
from /opt/opscode/embedded/bin/omnibus-ctl:23:in `<main>'


Strange, is not?

--
-- Tiago Cruz





Archive powered by MHonArc 2.6.16.

§