Chef-client running as chef-solo after upgrading from 10 to 11

After upgrading chef-client from 10.26.0-1 to 11.4.4-2, it thinks it’s runnin as solo which causes failures such as when attempting to use data bags. See below:

root@dev-01:/tmp# shef -z
loading configuration: /etc/chef/client.rb
Session type: client
Loading…

This is shef, the Chef shell.
Chef Version: 10.26.0
http://www.opscode.com/chef
http://wiki.opscode.com/display/chef/Home

run help' for help,exit’ or ^D to quit.

Ohai2u clif@dev-01!
chef > chef_cfg = data_bag_item(“configs”, “chef”)
=> data_bag_item[“configs”, “chef”, {“id”=>“chef”, “client”=>{“chef_server_url”=>{“production”=>“https://chef-prod.spanning.co”, “other”=>“https://chef-dev.spanning.co”}}, “server”=>{“file_cache_path”=>"/var/cache/chef", “path”=>"/var/lib/chef", “rabbitmq”=>{“password”=>“Zutt-kit0c”}, “solr”=>{“heap_size”=>“256M”, “java_opts”=>"-DSTART=#{solr_jetty_path}/etc/start.config", “url”=>“http://localhost:8983”}, “url”=>“http://localhost:4000”}}]
chef > puts Chef::Config[:solo].to_s
false
=> nil
chef > exit
root@dev-01:/tmp# dpkg -i chef_11.4.4-2.ubuntu.11.04_i386.deb
(Reading database … 64662 files and directories currently installed.)
Preparing to replace chef 10.26.0-1.ubuntu.11.04 (using chef_11.4.4-2.ubuntu.11.04_i386.deb) …
Unpacking replacement chef …
Setting up chef (11.4.4-2.ubuntu.11.04) …
Thank you for installing Chef!
root@dev-01:/tmp# chef-shell
loading configuration: none (standalone session)
Session type: standalone
Loading…done.

This is the chef-shell.
Chef Version: 11.4.4
http://www.opscode.com/chef
http://wiki.opscode.com/display/chef/Home

run help' for help,exit’ or ^D to quit.

Ohai2u clif@dev-01!
chef > chef_cfg = data_bag_item(“configs”, “chef”)
[2013-05-31T19:37:54+00:00] ERROR: Failed to load data bag item: “configs” "chef"
Chef::Exceptions::InvalidDataBagPath: Data bag path ‘/var/chef/data_bags’ is invalid
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/data_bag.rb:100:in load' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/data_bag_item.rb:146:inload’
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/data_query.rb:59:in data_bag_item' from (irb):1 from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/shell.rb:73:inblock in start’
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/shell.rb:72:in catch' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/shell.rb:72:instart’
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/bin/chef-shell:34:in <top (required)>' from /usr/bin/chef-shell:23:inload’
from /usr/bin/chef-shell:23:in `'
chef > puts Chef::Config[:solo].to_s
true
=> nil
chef > exit
root@dev-01:/tmp# cat /etc/chef/client.rb
node_name "dev-01"
environment "production"
chef_server_url "https://chef-prod.xxx.com"
log_level :info
log_location "/var/log/chef/client.log"
client_key "/etc/chef/client.pem"
validation_key "/etc/chef/validation.pem"
validation_client_name "chef-validator"
ssl_verify_mode :verify_none
file_cache_path "/var/cache/chef"
file_backup_path "/var/backups/chef"
pid_file "/var/run/chef/client.pid"
interval 1800
splay 20
Chef::Log::Formatt

I think you need chef-shell -z just like you did with the old school shef
command.

On Fri, May 31, 2013 at 3:59 PM, Clif Smith clif@texicans.us wrote:

After upgrading chef-client from 10.26.0-1 to 11.4.4-2, it thinks it's
runnin as solo which causes failures such as when attempting to use data
bags. See below:

root@dev-01:/tmp# shef -z
loading configuration: /etc/chef/client.rb
Session type: client
Loading....

This is shef, the Chef shell.
Chef Version: 10.26.0
Configuration Management System Software - Chef Infra | Chef
http://wiki.opscode.com/display/chef/Home

run help' for help, exit' or ^D to quit.

Ohai2u clif@dev-01!
chef > chef_cfg = data_bag_item("configs", "chef")
=> data_bag_item["configs", "chef", {"id"=>"chef", "client"=>{"chef_server_url"=>{"production"=>"https://chef-prod.spanning.co", "other"=>"https://chef-dev.spanning.co"}}, "server"=>{"file_cache_path"=>"/var/cache/chef", "path"=>"/var/lib/chef", "rabbitmq"=>{"password"=>"Zutt-kit0c"}, "solr"=>{"heap_size"=>"256M", "java_opts"=>"-DSTART=#{solr_jetty_path}/etc/start.config", "url"=>"http://localhost:8983"}, "url"=>"http://localhost:4000"}}]
chef > puts Chef::Config[:solo].to_s
false
=> nil
chef > exit
root@dev-01:/tmp# dpkg -i chef_11.4.4-2.ubuntu.11.04_i386.deb
(Reading database ... 64662 files and directories currently installed.)
Preparing to replace chef 10.26.0-1.ubuntu.11.04 (using chef_11.4.4-2.ubuntu.11.04_i386.deb) ...
Unpacking replacement chef ...
Setting up chef (11.4.4-2.ubuntu.11.04) ...
Thank you for installing Chef!
root@dev-01:/tmp# chef-shell
loading configuration: none (standalone session)
Session type: standalone
Loading....done.

This is the chef-shell.
Chef Version: 11.4.4
Configuration Management System Software - Chef Infra | Chef
http://wiki.opscode.com/display/chef/Home

run help' for help, exit' or ^D to quit.

Ohai2u clif@dev-01!
chef > chef_cfg = data_bag_item("configs", "chef")
[2013-05-31T19:37:54+00:00] ERROR: Failed to load data bag item: "configs" "chef"
Chef::Exceptions::InvalidDataBagPath: Data bag path '/var/chef/data_bags' is invalid
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/data_bag.rb:100:in load' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/data_bag_item.rb:146:in load'
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/data_query.rb:59:in data_bag_item' from (irb):1 from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/shell.rb:73:in block in start'
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/shell.rb:72:in catch' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/shell.rb:72:in start'
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/bin/chef-shell:34:in <top (required)>' from /usr/bin/chef-shell:23:in load'
from /usr/bin/chef-shell:23:in `'
chef > puts Chef::Config[:solo].to_s
true
=> nil
chef > exit
root@dev-01:/tmp# cat /etc/chef/client.rb
node_name "dev-01"
environment "production"
chef_server_url "https://chef-prod.xxx.com"
log_level :info
log_location "/var/log/chef/client.log"
client_key "/etc/chef/client.pem"
validation_key "/etc/chef/validation.pem"
validation_client_name "chef-validator"
ssl_verify_mode :verify_none
file_cache_path "/var/cache/chef"
file_backup_path "/var/backups/chef"
pid_file "/var/run/chef/client.pid"
interval 1800
splay 20
Chef::Log::Formatt

My bad. Thanks!

On May 31, 2013, at 3:01 PM, Pete Cheslock petecheslock@gmail.com wrote:

I think you need chef-shell -z just like you did with the old school shef command.

On Fri, May 31, 2013 at 3:59 PM, Clif Smith clif@texicans.us wrote:
After upgrading chef-client from 10.26.0-1 to 11.4.4-2, it thinks it's runnin as solo which causes failures such as when attempting to use data bags. See below:

root@dev-01:/tmp# shef -z
loading configuration: /etc/chef/client.rb
Session type: client
Loading....

This is shef, the Chef shell.
Chef Version: 10.26.0

Configuration Management System Software - Chef Infra | Chef
http://wiki.opscode.com/display/chef/Home

run help' for help, exit' or ^D to quit.

Ohai2u clif@dev-01!
chef > chef_cfg = data_bag_item("configs", "chef")
=> data_bag_item["configs", "chef", {"id"=>"chef", "client"=>{"chef_server_url"=>{"production"=>"https://chef-prod.spanning.co", "other"=>"https://chef-dev.spanning.co"}}, "server"=>{"file_cache_path"=>"/var/cache/chef", "path"=>"/var/lib/chef", "rabbitmq"=>{"password"=>"Zutt-kit0c"}, "solr"=>{"heap_size"=>"256M", "java_opts"=>"-DSTART=#{solr_jetty_path}/etc/start.config", "url"=>"http://localhost:8983"}, "url"=>"http://localhost:4000"}}]

chef > puts Chef::Config[:solo].to_s
false
=> nil
chef > exit
root@dev-01:/tmp# dpkg -i chef_11.4.4-2.ubuntu.11.04_i386.deb
(Reading database ... 64662 files and directories currently installed.)

Preparing to replace chef 10.26.0-1.ubuntu.11.04 (using chef_11.4.4-2.ubuntu.11.04_i386.deb) ...
Unpacking replacement chef ...
Setting up chef (11.4.4-2.ubuntu.11.04) ...
Thank you for installing Chef!

root@dev-01:/tmp# chef-shell
loading configuration: none (standalone session)
Session type: standalone
Loading....done.

This is the chef-shell.
Chef Version: 11.4.4

Configuration Management System Software - Chef Infra | Chef
http://wiki.opscode.com/display/chef/Home

run help' for help, exit' or ^D to quit.

Ohai2u clif@dev-01!
chef > chef_cfg = data_bag_item("configs", "chef")
[2013-05-31T19:37:54+00:00] ERROR: Failed to load data bag item: "configs" "chef"

Chef::Exceptions::InvalidDataBagPath: Data bag path '/var/chef/data_bags' is invalid
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/data_bag.rb:100:in `load'

    from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/data_bag_item.rb:146:in `load'
    from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/data_query.rb:59:in `data_bag_item'

    from (irb):1
    from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/shell.rb:73:in `block in start'
    from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/shell.rb:72:in `catch'

    from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/shell.rb:72:in `start'
    from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/bin/chef-shell:34:in `<top (required)>'

    from /usr/bin/chef-shell:23:in `load'
    from /usr/bin/chef-shell:23:in `<main>'

chef > puts Chef::Config[:solo].to_s
true
=> nil
chef > exit

root@dev-01:/tmp# cat /etc/chef/client.rb
node_name "dev-01"
environment "production"
chef_server_url "https://chef-prod.xxx.com"

log_level :info
log_location "/var/log/chef/client.log"
client_key "/etc/chef/client.pem"
validation_key "/etc/chef/validation.pem"

validation_client_name "chef-validator"
ssl_verify_mode :verify_none
file_cache_path "/var/cache/chef"
file_backup_path "/var/backups/chef"

pid_file "/var/run/chef/client.pid"
interval 1800
splay 20
Chef::Log::Formatt