New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing name in package declaration (pkg_php_mbstring) #2

chrludwig opened this Issue Mar 9, 2014 · 1 comment


None yet
2 participants

chrludwig commented Mar 9, 2014


I want to set up Postfix & Dovecot in a Vagrant VM using chef-solo. The VM is based on an Ubuntu 12.04 image with the Chef Omnibus 11.10.4 package installed.

However, when I provision the VM, Chef fails with the following error:

cludwig$ vagrant provision
[default] Chef 11.10.4 Omnibus package is already installed.
[default] Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...
stdin: is not a tty
[2014-03-09T15:18:51+01:00] INFO: Forking chef instance to converge...
[2014-03-09T15:18:51+01:00] INFO: *** Chef 11.10.4 ***                                                                                                                                                                                       
[2014-03-09T15:18:51+01:00] INFO: Chef-client pid: 1793                                                                                                                                                                                      
[2014-03-09T15:18:52+01:00] INFO: Setting the run_list to ["recipe[bullinger::default]"] from JSON                                                                                                                                           
[2014-03-09T15:18:52+01:00] INFO: Run List is [recipe[bullinger::default]]                                                                                                                                                                   
[2014-03-09T15:18:52+01:00] INFO: Run List expands to [bullinger::default]                                                                                                                                                                   
[2014-03-09T15:18:52+01:00] INFO: Starting Chef Run for precise32                                                                                                                                                                            
[2014-03-09T15:18:52+01:00] INFO: Running start handlers                                                                                                                                                                                     
[2014-03-09T15:18:52+01:00] INFO: Start handlers complete.                                                                                                                                                                                   
[2014-03-09T15:18:54+01:00] INFO: Missing gem 'sequel'                                                                                                                                                                                       
[2014-03-09T15:18:55+01:00] WARN: Cloning resource attributes for package[postfix] from prior resource (CHEF-3694)                                                                                                                           
[2014-03-09T15:18:55+01:00] WARN: Previous package[postfix]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix-dovecot/recipes/postfix-full.rb:20:in `from_file'                                                                             
[2014-03-09T15:18:55+01:00] WARN: Current  package[postfix]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix-full/recipes/default.rb:22:in `from_file'                                                                                     
[2014-03-09T15:18:55+01:00] WARN: Cloning resource attributes for service[postfix] from prior resource (CHEF-3694)                                                                                                                           
[2014-03-09T15:18:55+01:00] WARN: Previous service[postfix]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix-full/recipes/default.rb:24:in `from_file'                                                                                     
[2014-03-09T15:18:55+01:00] WARN: Current  service[postfix]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix-full/recipes/default.rb:74:in `from_file'                                                                                     
[2014-03-09T15:18:55+01:00] WARN: Cloning resource attributes for service[apache2] from prior resource (CHEF-3694)                                                                                                                           
[2014-03-09T15:18:55+01:00] WARN: Previous service[apache2]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/recipes/default.rb:24:in `from_file'                                                                                          
[2014-03-09T15:18:55+01:00] WARN: Current  service[apache2]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/recipes/default.rb:210:in `from_file'                                                                                         
[2014-03-09T15:18:56+01:00] WARN: Cloning resource attributes for directory[/var/cache/local/preseeding] from prior resource (CHEF-3694)                                                                                                     
[2014-03-09T15:18:56+01:00] WARN: Previous directory[/var/cache/local/preseeding]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/recipes/default.rb:75:in `block in from_file'                                                               
[2014-03-09T15:18:56+01:00] WARN: Current  directory[/var/cache/local/preseeding]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/_server_debian.rb:4:in `from_file'                                                                
[2014-03-09T15:18:56+01:00] WARN: Cloning resource attributes for directory[/var/lib/mysql] from prior resource (CHEF-3694)                                                                                                                  
[2014-03-09T15:18:56+01:00] WARN: Previous directory[/var/lib/mysql]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/_server_debian.rb:34:in `block in from_file'                                                                   
[2014-03-09T15:18:56+01:00] WARN: Current  directory[/var/lib/mysql]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/_server_debian.rb:78:in `from_file'

Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/bullinger/recipes/default.rb

You must supply a name when declaring a package resource

Cookbook Trace:
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfixadmin/recipes/default.rb:60:in `from_file'
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix-dovecot/recipes/postfixadmin.rb:22:in `from_file'
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix-dovecot/recipes/default.rb:23:in `from_file'
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/bullinger/recipes/_postfix-dovecot.rb:24:in `from_file'
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/bullinger/recipes/default.rb:16:in `from_file'

Relevant File Content:

 53:    action :install
 54:  end
 56:  package pkg_php_imap do
 57:    action :install
 58:  end
 60>> package pkg_php_mbstring do
 61:    not_if do pkg_php_mbstring.nil? end
 62:    action :install
 63:  end
 65:  chef_gem 'sequel'
 67:  mysql_connection_info = {
 68:    :host => node['postfixadmin']['database']['host'],
 69:    :username => 'root',

[2014-03-09T15:18:56+01:00] ERROR: Running exception handlers
[2014-03-09T15:18:56+01:00] ERROR: Exception handlers complete
[2014-03-09T15:18:56+01:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-03-09T15:18:56+01:00] ERROR: You must supply a name when declaring a package resource
[2014-03-09T15:18:56+01:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Looking at the default postfixadmin recipe, I see pkg_php_mbstring is assigned nil on an Ubuntu system; the guard in line 61 seems to come too late, though.



This comment has been minimized.

Show comment
Hide comment

zuazo Mar 10, 2014


Fixed in issue #3.


zuazo commented Mar 10, 2014

Fixed in issue #3.

@zuazo zuazo closed this Mar 10, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment