owncloud-archive / acceptance-testing

User stories and virtual machine configurations
9 stars 5 forks source link

Cheff error in php recipe #26

Closed DeepDiver1975 closed 11 years ago

DeepDiver1975 commented 11 years ago
master_on_apache_with_sqlite] Running chef-solo...
stdin: is not a tty
[2013-07-30T15:20:27+00:00] INFO: *** Chef 11.4.0 ***
[2013-07-30T15:20:30+00:00] INFO: Setting the run_list to ["recipe[owncloud]"] from JSON
[2013-07-30T15:20:30+00:00] INFO: Run List is [recipe[owncloud]]
[2013-07-30T15:20:30+00:00] INFO: Run List expands to [owncloud]
[2013-07-30T15:20:30+00:00] INFO: Starting Chef Run for apache01.local
[2013-07-30T15:20:30+00:00] INFO: Running start handlers
[2013-07-30T15:20:30+00:00] INFO: Start handlers complete.
[2013-07-30T15:20:31+00:00] WARN: found a directory ldapknife in the cookbook path, but it contains no cookbook files. skipping.

================================================================================

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

================================================================================

NoMethodError
-------------
undefined method `[]' for nil:NilClass

Cookbook Trace:
---------------
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/php/recipes/default.rb:22:in `from_file'
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/owncloud/recipes/default.rb:41:in `from_file'

Relevant File Content:
----------------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/php/recipes/default.rb:

 15:  # Unless required by applicable law or agreed to in writing, software
 16:  # distributed under the License is distributed on an "AS IS" BASIS,
 17:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 18:  # See the License for the specific language governing permissions and
 19:  # limitations under the License.
 20:  #
 21:  
 22>> include_recipe "php::#{node['php']['install_method']}"
 23:  
 24:  # update the main channels
 25:  php_pear_channel 'pear.php.net' do
 26:    action :update
 27:  end
 28:  
 29:  php_pear_channel 'pecl.php.net' do
 30:    action :update
 31:  end
DeepDiver1975 commented 11 years ago

@jakobsack what am I missing? FYI: I switched the base box to Debian 7

Gomez commented 11 years ago

I fixed it here:

https://github.com/Gomez/acceptance-testing/commit/0996f2afcc0db98e755a32f29792c31bae35332d

I am a chef noob, discuss it on the dev meeting. This is just for docu...

DeepDiver1975 commented 11 years ago

Can you please submit a pull request?  I'll test this asap thx

-------- Ursprüngliche Nachricht -------- Von: Steffen Lindner notifications@github.com Datum:
An: owncloud/acceptance-testing acceptance-testing@noreply.github.com Cc: Thomas Müller thomas.mueller@tmit.eu Betreff: Re: [acceptance-testing] Cheff error in php recipe (#26)

I fixed it here:

Gomez@0996f2a

I am a chef noob, discuss it on the dev meeting. This is just for docu...

— Reply to this email directly or view it on GitHub.

DeepDiver1975 commented 11 years ago

@Gomez I gave it a quick try and this is not working I'll clone your repo - maybe this is working and the fix is to update the php recipe

DeepDiver1975 commented 11 years ago

I have the same behavior running a clone of your repo - strange

Gomez commented 11 years ago

I pushed the rest of my work. Runs here nearly to the end, fails on a http_request.

Which machine you build? I test with master_on_apache_with_mysql.

Please paste me the full traceback

DeepDiver1975 commented 11 years ago
~/Development/owncloud/acceptance-test-suite-gomez/Vagrant [master]$ vagrant up  master_on_apache_with_mysql
[master_on_apache_with_mysql] Importing base box 'debian-70rc1'...
[master_on_apache_with_mysql] No guest additions were detected on the base box for this VM! Guest
additions are required for forwarded ports, shared folders, host only
networking, and more. If SSH fails on this machine, please install
the guest additions and repackage the box to continue.

This is not an error message; everything may continue to work properly,
in which case you may ignore this message.
[master_on_apache_with_mysql] Matching MAC address for NAT networking...
[master_on_apache_with_mysql] Clearing any previously set forwarded ports...
[master_on_apache_with_mysql] Fixed port collision for 22 => 2222. Now on port 2201.
[master_on_apache_with_mysql] Forwarding ports...
[master_on_apache_with_mysql] -- 22 => 2201 (adapter 1)
[master_on_apache_with_mysql] Creating shared folders metadata...
[master_on_apache_with_mysql] Clearing any previously set network interfaces...
[master_on_apache_with_mysql] Preparing network interfaces based on configuration...
[master_on_apache_with_mysql] Booting VM...
[master_on_apache_with_mysql] Waiting for VM to boot. This can take a few minutes.
[master_on_apache_with_mysql] VM booted and ready for use!
[master_on_apache_with_mysql] Configuring and enabling network interfaces...
[master_on_apache_with_mysql] Setting host name...
[master_on_apache_with_mysql] Mounting shared folders...
[master_on_apache_with_mysql] -- v-root: /vagrant
[master_on_apache_with_mysql] -- v-csc-1: /tmp/vagrant-chef-1/chef-solo-1/cookbooks
[master_on_apache_with_mysql] Running provisioner: Vagrant::Provisioners::ChefSolo...
[master_on_apache_with_mysql] Generating chef JSON and uploading...
[master_on_apache_with_mysql] Running chef-solo...
stdin: is not a tty
[2013-08-14T08:30:49+00:00] INFO: *** Chef 11.4.0 ***
[2013-08-14T08:30:49+00:00] INFO: Setting the run_list to ["recipe[owncloud]"] from JSON
[2013-08-14T08:30:49+00:00] INFO: Run List is [recipe[owncloud]]
[2013-08-14T08:30:49+00:00] INFO: Run List expands to [owncloud]
[2013-08-14T08:30:49+00:00] INFO: Starting Chef Run for apache02.local
[2013-08-14T08:30:49+00:00] INFO: Running start handlers
[2013-08-14T08:30:49+00:00] INFO: Start handlers complete.
[2013-08-14T08:30:49+00:00] WARN: found a directory ldapknife in the cookbook path, but it contains no cookbook files. skipping.
[2013-08-14T08:30:50+00:00] WARN: Cloning resource attributes for directory[/var/cache/local/preseeding] from prior resource (CHEF-3694)
[2013-08-14T08:30:50+00:00] WARN: Previous directory[/var/cache/local/preseeding]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/recipes/default.rb:62:in `block in from_file'
[2013-08-14T08:30:50+00:00] WARN: Current  directory[/var/cache/local/preseeding]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/server.rb:47:in `from_file'
[2013-08-14T08:30:50+00:00] WARN: Cloning resource attributes for directory[/etc/mysql/conf.d] from prior resource (CHEF-3694)
[2013-08-14T08:30:50+00:00] WARN: Previous directory[/etc/mysql/conf.d]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/server.rb:108:in `block in from_file'
[2013-08-14T08:30:50+00:00] WARN: Current  directory[/etc/mysql/conf.d]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/server.rb:108:in `block in from_file'
[2013-08-14T08:30:50+00:00] WARN: Cloning resource attributes for directory[/var/lib/mysql] from prior resource (CHEF-3694)
[2013-08-14T08:30:50+00:00] WARN: Previous directory[/var/lib/mysql]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/server.rb:108:in `block in from_file'
[2013-08-14T08:30:50+00:00] WARN: Current  directory[/var/lib/mysql]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/server.rb:108:in `block in from_file'
[2013-08-14T08:30:50+00:00] INFO: Could not find previously defined grants.sql resource
[2013-08-14T08:30:50+00:00] WARN: Cloning resource attributes for service[mysql] from prior resource (CHEF-3694)
[2013-08-14T08:30:50+00:00] WARN: Previous service[mysql]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/server.rb:154:in `from_file'
[2013-08-14T08:30:50+00:00] WARN: Current  service[mysql]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/server.rb:218:in `from_file'
[2013-08-14T08:30:50+00:00] WARN: Cloning resource attributes for execute[apt-get update] from prior resource (CHEF-3694)
[2013-08-14T08:30:50+00:00] WARN: Previous execute[apt-get update]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/recipes/default.rb:29:in `from_file'
[2013-08-14T08:30:50+00:00] WARN: Current  execute[apt-get update]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/ruby.rb:23:in `from_file'
[2013-08-14T08:30:50+00:00] INFO: Processing execute[apt-get update] action run (mysql::ruby line 23)
[2013-08-14T08:31:53+00:00] INFO: execute[apt-get update] ran successfully
[2013-08-14T08:31:53+00:00] INFO: Processing execute[apt-get-update-build-essentials] action run (build-essential::default line 30)
[2013-08-14T08:32:00+00:00] INFO: execute[apt-get-update-build-essentials] ran successfully
[2013-08-14T08:32:00+00:00] INFO: Processing package[build-essential] action install (build-essential::default line 51)
[2013-08-14T08:32:46+00:00] INFO: Processing package[binutils-doc] action install (build-essential::default line 51)
[2013-08-14T08:32:55+00:00] INFO: Processing package[autoconf] action install (build-essential::default line 58)
l[2013-08-14T08:33:09+00:00] INFO: Processing package[flex] action install (build-essential::default line 58)
[2013-08-14T08:33:17+00:00] INFO: Processing package[bison] action install (build-essential::default line 58)
[2013-08-14T08:33:29+00:00] INFO: Processing package[mysql-client] action install (mysql::client line 46)
[2013-08-14T08:34:02+00:00] INFO: Processing package[libmysqlclient-dev] action install (mysql::client line 46)
[2013-08-14T08:34:16+00:00] INFO: Processing chef_gem[mysql] action install (mysql::ruby line 36)

================================================================================

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

================================================================================

NameError

---------

Cannot find a resource for mysql_database on debian version 7.0

Cookbook Trace:
---------------
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/owncloud/recipes/default.rb:57:in `from_file'

Relevant File Content:
----------------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/owncloud/recipes/default.rb:

 50:    # Install mysql
 51:    include_recipe "mysql::server"
 52:    include_recipe "mysql::client"
 53:    include_recipe "php::module_mysql"
 54:    include_recipe "database::mysql"
 55:  
 56:    # drop old database and user
 57>>   mysql_database "owncloud" do
 58:      connection mysql_connection_info
 59:      action :drop
 60:    end
 61:    mysql_database_user "owncloud" do
 62:      connection mysql_connection_info
 63:      action :drop
 64:    end
 65:  
 66:    # create new database

[2013-08-14T08:34:51+00:00] ERROR: Running exception handlers
[2013-08-14T08:34:51+00:00] ERROR: Exception handlers complete
[2013-08-14T08:34:51+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-08-14T08:34:51+00:00] FATAL: NameError: Cannot find a resource for mysql_database on debian version 7.0
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
Gomez commented 11 years ago

Ok, thats fixed here:

https://github.com/Gomez/acceptance-testing/commit/f52e204dab66d3ab949e3e8a766f8c8270ce3d6b

But its still not working. I will report if i am done!

DeepDiver1975 commented 11 years ago

Awesome!

Gomez commented 11 years ago

Working now :) Lets merge it after @jakobsack checked the changes. We can discuss it on the dev meeting.

DeepDiver1975 commented 11 years ago

\o/

DeepDiver1975 commented 11 years ago

Can you fix sqlite as well? :wink:

~/Development/owncloud/acceptance-test-suite-gomez/Vagrant [master]$ vagrant provision  master_on_apache_with_sqlite
[master_on_apache_with_sqlite] Running provisioner: Vagrant::Provisioners::ChefSolo...
[master_on_apache_with_sqlite] Generating chef JSON and uploading...
[master_on_apache_with_sqlite] Running chef-solo...
stdin: is not a tty
[2013-08-14T10:20:01+00:00] INFO: *** Chef 11.4.0 ***
[2013-08-14T10:20:01+00:00] INFO: Setting the run_list to ["recipe[owncloud]"] from JSON
[2013-08-14T10:20:01+00:00] INFO: Run List is [recipe[owncloud]]
[2013-08-14T10:20:01+00:00] INFO: Run List expands to [owncloud]
[2013-08-14T10:20:01+00:00] INFO: Starting Chef Run for apache01.local
[2013-08-14T10:20:01+00:00] INFO: Running start handlers
[2013-08-14T10:20:01+00:00] INFO: Start handlers complete.
[2013-08-14T10:20:01+00:00] WARN: found a directory ldapknife in the cookbook path, but it contains no cookbook files. skipping.
[2013-08-14T10:20:02+00:00] WARN: Missing gem 'right_aws'
[2013-08-14T10:20:02+00:00] WARN: Cloning resource attributes for service[apache2] from prior resource (CHEF-3694)
[2013-08-14T10:20:02+00:00] WARN: Previous service[apache2]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/recipes/default.rb:24:in `from_file'
[2013-08-14T10:20:02+00:00] WARN: Current  service[apache2]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/recipes/default.rb:221:in `from_file'
[2013-08-14T10:20:02+00:00] WARN: Cloning resource attributes for execute[a2dissite default] from prior resource (CHEF-3694)
[2013-08-14T10:20:02+00:00] WARN: Previous execute[a2dissite default]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/definitions/apache_site.rb:34:in `block in from_file'
[2013-08-14T10:20:02+00:00] WARN: Current  execute[a2dissite default]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/definitions/apache_site.rb:34:in `block in from_file'
[2013-08-14T10:20:02+00:00] WARN: Cloning resource attributes for service[apache2] from prior resource (CHEF-3694)
[2013-08-14T10:20:02+00:00] WARN: Previous service[apache2]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/recipes/default.rb:221:in `from_file'
[2013-08-14T10:20:02+00:00] WARN: Current  service[apache2]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/owncloud/recipes/default.rb:155:in `from_file'
[2013-08-14T10:20:02+00:00] WARN: Cloning resource attributes for execute[Copy apps folder] from prior resource (CHEF-3694)
[2013-08-14T10:20:02+00:00] WARN: Previous execute[Copy apps folder]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/owncloud/recipes/default.rb:279:in `from_file'
[2013-08-14T10:20:02+00:00] WARN: Current  execute[Copy apps folder]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/owncloud/recipes/default.rb:283:in `from_file'
[2013-08-14T10:20:02+00:00] INFO: Processing execute[apt-get-update] action run (apt::default line 22)
[2013-08-14T10:20:45+00:00] INFO: execute[apt-get-update] ran successfully
[2013-08-14T10:20:45+00:00] INFO: Processing execute[apt-get update] action nothing (apt::default line 29)
[2013-08-14T10:20:45+00:00] INFO: Processing execute[apt-get autoremove] action nothing (apt::default line 36)
[2013-08-14T10:20:45+00:00] INFO: Processing execute[apt-get autoclean] action nothing (apt::default line 42)
[2013-08-14T10:20:45+00:00] INFO: Processing package[update-notifier-common] action install (apt::default line 48)

================================================================================

Error executing action `install` on resource 'package[update-notifier-common]'

================================================================================

Chef::Exceptions::Exec

----------------------

apt-get -q -y install update-notifier-common=0.99.3debian11 returned 100, expected 0

Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/recipes/default.rb

 48: package "update-notifier-common" do
 49:   notifies :run, resources(:execute => "apt-get-update"), :immediately
 50: end
 51: 

Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/recipes/default.rb:48:in `from_file'

package("update-notifier-common") do
  action :install
  retries 0
  retry_delay 2
  package_name "update-notifier-common"
  version "0.99.3debian11"
  cookbook_name :apt
  recipe_name "default"
end

[2013-08-14T10:20:45+00:00] INFO: Running queued delayed notifications before re-raising exception
[2013-08-14T10:20:45+00:00] ERROR: Running exception handlers
[2013-08-14T10:20:45+00:00] ERROR: Exception handlers complete
[2013-08-14T10:20:45+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-08-14T10:20:45+00:00] FATAL: Chef::Exceptions::Exec: package[update-notifier-common] (apt::default line 48) had an error: Chef::Exceptions::Exec: apt-get -q -y install update-notifier-common=0.99.3debian11 returned 100, expected 0
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
jakobsack commented 11 years ago

Hi all, I won't check the changes before the meeting in Berlin. Hope that's fine with you.

Gomez commented 11 years ago

@jakobsack Sure, i just wanna get started to be ready for the meeting :)

Gomez commented 11 years ago

fixed with new master