klively | 22 Apr 20:00 2014

uninitialized constant Chef::Provider::Package::Apt

When I issue the "vagrant up" command in a cookbook directory with a proper
Vagrantfile, vagrant quits unexpectedly.  I upgraded to the latest version of
Vagrant as well as the latest version of vagrant-berkshelf to no avail.  I
have included the stack trace, gems, and plugin versions below.  I do not
believe this to be a vagrant issue as I have installed multiple different
vagrant installs, as well as different versions of plugins just to have the
same happen.  I've found very little on this subject with no answers.  Thanks
in advance

==================== Stack Trace ========================

$ vagrant up

Vagrant failed to initialize at a very early stage:

The plugins failed to load properly. The error message given is
shown below.

uninitialized constant Chef::Provider::Package::Apt

==================== Versions/Gems ======================

Vagrant 1.5.4

Vagrant plugin list:

chef (0.8.10)
vagrant-berkshelf (2.0.1)
vagrant-login (1.0.1, system)
vagrant-omnibus (1.3.1)
(Continue reading)

Tomasz Chmielewski | 22 Apr 02:13 2014

403 "Forbidden" when uploading cookbooks with large files

I'm unable to upload a cookbook with a large file (~160 MB):

$ knife cookbook upload --all

Uploading mmaww-staging  [1.0.0]
ERROR: Failed to upload
(95d55edf3a75d5358a424d843c3e8463) to
: 403 "Forbidden"
<?xml version="1.0" encoding="UTF-8"?><Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>g2gCZAATYm9va3NoZWxmQDEyNy4wLjAuMWgDYgAABXZiAAHoHmIAAf01</RequestId><HostId></HostId></Error>
ERROR: You authenticated successfully to as tch but you are not authorized for
this action
Response:  <?xml version="1.0"
encoding="UTF-8"?><Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>g2gCZAATYm9va3NoZWxmQDEyNy4wLjAuMWgDYgAABXZiAAHoHmIAAf01</RequestId><HostId></HostId></Error>

$ echo $?

Any advice?

# dpkg -l|grep chef
ii  chef-server                      11.0.12-1.ubuntu.12.04            The full stack of chef-server


Tomasz Chmielewski

(Continue reading)

fabien.delpierre | 21 Apr 15:34 2014

Re: Re: Re: Re: Trouble getting chef-client to run automatically

Quick update: on Friday I set up a CentOS VM (not in Vagrant) and applied the
same run list as my Vagrant VM (including the chef-client cookbook), left it
alone all weekend and it's been checking in every few minutes automatically
like a champ. So I don't know what's wrong with Vagrant and I'd need to do more
testing in other, different VMs to say for sure that it's something to do with

Morgan Blackthorne | 21 Apr 12:08 2014

Ohai EC2 hints/facts

Is anyone using an ohai plugin that probes the AWS tags assigned to a given EC2 instance? ISTR that it's not something exposed in the base metadata URLs, but it would be handy for us. Basically, any EC2 node that is part of an ElasticBeanstalk has a tag set on the EC2 instance with the name of the ElasticBeanstalk application. Being able to add this information to our hoptoad error reports, and ideally to our syslog lines, would be very helpful rather than constantly needing to look up and match a generic EC2 hostname to a given service stack.


~*~ StormeRider ~*~

"Every world needs its heroes [...] They inspire us to be better than we are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS

Peter Loron | 19 Apr 01:39 2014

Ohai error when running knife configure

I have an Ubuntu 13.10 x64 machine on which I have installed the 
chef_11.12.2-1_amd64.deb package. I have a user created in the Chef 
server, which is an admin. I grabbed that pem file and the validator 
pem. When I run "knife configure -i" on the client, I get this:

ERROR: Ohai::Exceptions::DependencyNotFound: Can not find a plugin for 
dependency os

I can run ohai by itself and get a pile of data back.

Any clues?



Fabien Delpierre | 18 Apr 21:28 2014

Data bags and 'users' community cookbook

Hi there,
I need to start managing user accounts for a number of Linux VMs, so I set up a data bag with just one user (me), to start. I'm new to data bags, just started messing around with them earlier today, but I think I get the hang of it as it's pretty simple.

I'm also trying to use this community cookbook:

I got it working fine and it created the user from my data bag, with but one problem: in the JSON file containing my user's data, I said that my user should be a member of the wheel group, but the user was not added to the wheel group. There's no warning or error that I can see when I run chef-client, it just doesn't do anything with the groups I listed in the JSON file.

Here's my JSON file:
"id": "fd1",
"password": "<snip>",
"ssh_keys": [ "<snip>" ],
"groups": [ "sysadmin", "wheel", "test" ],
"shell": "/bin/bash",
"comment": "Fabien Delpierre",
"email": "<snip>",
"uid": "2001",
"home": "/home/fdelpierre"

As you can see I tried adding the user to a "test" group but nothing happened either, although I can imagine that's because there is no group called "test" on the system. Of course the wheel group does exist.

Looking at the README for the cookbook, there are bits that seem relevant to what I'm trying to do but I just don't understand what I'm supposed to do. Here's the excerpt from the docs that I'm struggling with:
If you have different requirements, for example:
  • You want to search a different data bag specific to a role such as mail. You may change the data_bag searched.
    • data_bag mail
  • You want to search for a different group attribute named postmaster. You may change the search_group attribute. This attribute defaults to the LWRP resource name.
    • search_group postmaster
  • You want to add the users to a security group other than the lightweight resource name. You may change the group_name attribute. This attribute also defaults to the LWRP resource name.
    • group_name wheel

Putting these requirements together our recipe might look like this:

ruby users_manage "postmaster" do data_bag "mail" group_name "wheel" group_id 10 end


So looking at the default recipe of the users cookbook, it looks like it's saying it's the place to add this sort of stuff -- so I added the following bits to it:

users_manage "sysadmin" do
data_bag "users"
group_name "wheel"
group_id 10

But of course that also did nothing.

It's probably something dumb but I've been messing around with this all afternoon today and I can't figure it out. Every time I get what I think is a bright idea, I make my tweak, re-run chef-client and nothing happens, it's rather frustrating.

Eric Herot | 17 Apr 23:20 2014

Still having a problem with Ohai plugins after upgrading to 7.0.2

Hey Chefs,

I’m posting this here hoping to find out if it’s just me. I noticed that upgrading to Chef 11.12.0 caused this problem to crop up:

Ohai::Exceptions::AttributeNotFound ----------------------------------- No such attribute: ‘passwd' Resource Declaration: --------------------- # In /tmp/kitchen/cache/cookbooks/et_users/recipes/reloadohai.rb 1: ohai 'reload' do 2: action :nothing 3: plugin 'passwd' 4: end

This was supposedly fixed in Chef 11.12.2/Ohai 7.0.2 (in response to OHAI–562) however I am still encountering this issue in the new version with this particular plugin, and constraining my test environment to Chef 11.10.4 seems to make the issue go away.

Can anyone tell me if this is the same issue discussed in OHAI–562 or if they are also still having this issue on the latest version of Chef?

– Eric

PS. #ChefConf2014 ftw!

Steve Hummingbird | 16 Apr 19:40 2014

How to configure opscode nginx properly

I have been running into some issues when configuring nginx using the opscode cookbook.
I have created a wrapper cookbook, which replaces the default config by putting my config into /etc/nginx/sites-available/default
However, the opscode cookbook always replaces that config with the default sample config. So, on every
chef run the nginx cookbook notices that the default config is no longer there and replaces my config, then
my wrapper cookbook notices that the config is not correct and replaces that file with my config again.
I was having the same issues when installing from source as well as using the ubuntu package installation.
So, in the end I am getting the feeling that I might be missing something fundamentally or a lot of other
people must have been running into the same issue. How do I configure nginx the right way using the opscode cookbook?


Brian Hatfield | 16 Apr 18:55 2014

Service Resource broken on OSX as of 11.12


I upgraded to 11.12 due to the heartbleed vulnerability and omnibus's embedded openssl - unfortunately, 11.12 has some service changes on OSX that break Chef (specifically, any time a service resource is re-opened, the chef run blows up).

I realize that many people are at Chef-Conf, but this is a major regression that has made Chef unusable on OSX. I'm hoping to get help/attention on this?

I'd be happy to submit a PR that reverts the service resource change, but I'm not sure if that's the right choice here.



S Ahmed | 16 Apr 17:09 2014

RE: rails, nginx, unicorn


Is there a rails,nginx, unicorn cookbook out there in chef land that is maintained by a web 3.0 company out there? :)

For some reason I see most people are still stuck with apache.

I know I can build my own (that's the beauty of chef hehe) but just curious if there any any cookbooks that are rails/ruby specific that are maintained by a company that just so happens to open source their devops.

Thanks for your guidance.
Christian Fröstl | 16 Apr 13:16 2014

Logging and references questions

Hi there,

I have problems with understanding the logging procedure with chef. 

I can log some information by using the following syntax:
         log „foo" do
        level :debug

Now I find in some cookbooks the following spelling:
Chef::Log.debug("Node has Chef Server Recipe? #{node.recipe?("chef-server")}“)

What does Chef::Log.debug exactly do?
I do not get any output if i run the chef-client in normal or in debug mode. What is the STDOUT from Chef::Log?

By the way, I am not really sure what Chef:: represents. Where can I find the class or module Chef?
In some scripts I the other references like Chef::Client::SANE_PATHS. Where can I find the content of such references?

Sorry if the questions are a litte bit stupid, but I am right new in writing Code.

Thank you very much,