mysql – Chef认为不符合依赖关系
作者:互联网
我有一个使用Opscode’数据库’食谱的厨师定制食谱.我在Opsworks堆栈中使用Chef 11.10和Berkshelf 3.1.3,并在Berksfile中指定了’database‘cookbook.它正确地下拉了依赖项,我可以在日志中看到它.运行安装程序后,我遇到了一些错误;一个关于未找到的文件(并且路径确实不存在),另一个关于“mysql”的依赖性前提条件未满足的另一个412.
我不知道足够的厨师知道第一个错误是否会导致第二次失败,但确定似乎正在满足所需的mysql cookbook的版本.有人知道这有什么已知的问题吗?这是setup命令失败的输出日志:
[2014-09-29T07:32:17+00:00] INFO: Starting chef-zero on port 8889 with repository at repository at /opt/aws/opsworks/current
One version per cookbook
data_bags at /var/lib/aws/opsworks/data/data_bags
nodes at /var/lib/aws/opsworks/data/nodes
[2014-09-29T07:32:18+00:00] INFO: Forking chef instance to converge...
[2014-09-29T07:32:18+00:00] INFO: *** Chef 11.10.4 ***
[2014-09-29T07:32:18+00:00] INFO: Chef-client pid: 2695
[2014-09-29T07:32:19+00:00] INFO: Setting the run_list to ["opsworks_custom_cookbooks::load", "opsworks_custom_cookbooks::execute"] from JSON
[2014-09-29T07:32:19+00:00] WARN: Run List override has been provided.
[2014-09-29T07:32:19+00:00] WARN: Original Run List: [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
[2014-09-29T07:32:19+00:00] WARN: Overridden Run List: [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
[2014-09-29T07:32:19+00:00] INFO: Run List is [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
[2014-09-29T07:32:19+00:00] INFO: Run List expands to [opsworks_custom_cookbooks::load, opsworks_custom_cookbooks::execute]
[2014-09-29T07:32:19+00:00] INFO: Starting Chef Run for www-prod-migration-3.localdomain
[2014-09-29T07:32:19+00:00] INFO: Running start handlers
[2014-09-29T07:32:19+00:00] INFO: Start handlers complete.
[2014-09-29T07:32:19+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: /reports/nodes/www-prod-migration-3.localdomain/runs
[2014-09-29T07:32:34+00:00] INFO: Loading cookbooks [apache2, dependencies, deploy, gem_support, mod_php5_apache2, mysql, nginx, opsworks_agent_monit, opsworks_aws_flow_ruby, opsworks_berkshelf, opsworks_bundler, opsworks_commons, opsworks_custom_cookbooks, opsworks_initial_setup, opsworks_java, opsworks_nodejs, opsworks_rubygems, packages, passenger_apache2, php, rails, ruby, scm_helper, ssh_users, unicorn]
[2014-09-29T07:32:36+00:00] INFO: Not needed with Chef 11.x (x >= 8) anymore.
[2014-09-29T07:32:36+00:00] INFO: Processing package[git] action install (opsworks_custom_cookbooks::checkout line 11)
[2014-09-29T07:32:38+00:00] INFO: Processing directory[/root/.ssh] action create (opsworks_custom_cookbooks::checkout line 8)
[2014-09-29T07:32:38+00:00] INFO: Processing file[/root/.ssh/config] action touch (opsworks_custom_cookbooks::checkout line 16)
[2014-09-29T07:32:38+00:00] INFO: file[/root/.ssh/config] updated atime and mtime to 2014-09-29 07:32:38 +0000
[2014-09-29T07:32:38+00:00] INFO: Processing execute[echo 'StrictHostKeyChecking no' > /root/.ssh/config] action run (opsworks_custom_cookbooks::checkout line 23)
[2014-09-29T07:32:38+00:00] INFO: Processing template[/root/.ssh/id_dsa] action create (opsworks_custom_cookbooks::checkout line 27)
[2014-09-29T07:32:38+00:00] INFO: Processing git[Download Custom Cookbooks] action checkout (opsworks_custom_cookbooks::checkout line 29)
[2014-09-29T07:32:38+00:00] INFO: Processing ruby_block[Move single cookbook contents into appropriate subdirectory] action run (opsworks_custom_cookbooks::checkout line 64)
[2014-09-29T07:32:38+00:00] INFO: Processing opsworks_berkshelf_runner[Install berkshelf cookbooks] action berks_install (opsworks_berkshelf::install line 54)
[2014-09-29T07:32:38+00:00] INFO: Processing directory[/opt/aws/opsworks/current/berkshelf-cookbooks] action delete (/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb line 2)
[2014-09-29T07:32:38+00:00] INFO: directory[/opt/aws/opsworks/current/berkshelf-cookbooks] deleted /opt/aws/opsworks/current/berkshelf-cookbooks recursively
[2014-09-29T07:32:38+00:00] INFO: Processing ruby_block[Install the cookbooks specified in the Berksfile and their dependencies] action run (/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb line 11)
[2014-09-29T07:32:39+00:00] INFO:
Resolving cookbook dependencies...
Using apt (2.6.0)
Using aws (2.4.0)
Using build-essential (2.0.6)
Using chef-sugar (2.3.0)
Using database (2.3.0) from https://github.com/opscode-cookbooks/database.git (at master)
Using mysql (5.5.3)
Using mysql-chef_gem (0.0.5)
Using openssl (2.0.0)
Using postgresql (3.4.6)
Using xfs (1.1.0)
Using yum (3.3.2)
Using yum-mysql-community (0.1.10)
Vendoring apt (2.6.0) to /opt/aws/opsworks/current/berkshelf-cookbooks/apt
Vendoring aws (2.4.0) to /opt/aws/opsworks/current/berkshelf-cookbooks/aws
Vendoring build-essential (2.0.6) to /opt/aws/opsworks/current/berkshelf-cookbooks/build-essential
Vendoring chef-sugar (2.3.0) to /opt/aws/opsworks/current/berkshelf-cookbooks/chef-sugar
Vendoring database (2.3.0) to /opt/aws/opsworks/current/berkshelf-cookbooks/database
Vendoring mysql (5.5.3) to /opt/aws/opsworks/current/berkshelf-cookbooks/mysql
Vendoring mysql-chef_gem (0.0.5) to /opt/aws/opsworks/current/berkshelf-cookbooks/mysql-chef_gem
Vendoring openssl (2.0.0) to /opt/aws/opsworks/current/berkshelf-cookbooks/openssl
Vendoring postgresql (3.4.6) to /opt/aws/opsworks/current/berkshelf-cookbooks/postgresql
Vendoring xfs (1.1.0) to /opt/aws/opsworks/current/berkshelf-cookbooks/xfs
Vendoring yum (3.3.2) to /opt/aws/opsworks/current/berkshelf-cookbooks/yum
Vendoring yum-mysql-community (0.1.10) to /opt/aws/opsworks/current/berkshelf-cookbooks/yum-mysql-community
[2014-09-29T07:32:39+00:00] INFO: ruby_block[Install the cookbooks specified in the Berksfile and their dependencies] called
[2014-09-29T07:32:39+00:00] INFO: Processing execute[ensure correct permissions of custom cookbooks] action run (opsworks_custom_cookbooks::checkout line 82)
[2014-09-29T07:32:39+00:00] INFO: execute[ensure correct permissions of custom cookbooks] ran successfully
[2014-09-29T07:32:39+00:00] INFO: Processing ruby_block[merge all cookbooks sources] action run (opsworks_custom_cookbooks::load line 12)
[2014-09-29T07:32:40+00:00] INFO: ruby_block[merge all cookbooks sources] called
[2014-09-29T07:32:40+00:00] WARN: Skipping final node save because override_runlist was given
[2014-09-29T07:32:40+00:00] INFO: Chef Run complete in 20.634821643 seconds
[2014-09-29T07:32:40+00:00] INFO: Running report handlers
[2014-09-29T07:32:40+00:00] INFO: Report handlers complete
---
[2014-09-29T07:32:42+00:00] INFO: Starting chef-zero on port 8889 with repository at repository at /opt/aws/opsworks/current
One version per cookbook
data_bags at /var/lib/aws/opsworks/data/data_bags
nodes at /var/lib/aws/opsworks/data/nodes
[2014-09-29T07:32:42+00:00] INFO: Forking chef instance to converge...
[2014-09-29T07:32:42+00:00] INFO: *** Chef 11.10.4 ***
[2014-09-29T07:32:42+00:00] INFO: Chef-client pid: 2868
[2014-09-29T07:32:44+00:00] INFO: Setting the run_list to ["opsworks_custom_cookbooks::load", "opsworks_custom_cookbooks::execute"] from JSON
[2014-09-29T07:32:44+00:00] WARN: Run List override has been provided.
[2014-09-29T07:32:44+00:00] WARN: Original Run List: [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
[2014-09-29T07:32:44+00:00] WARN: Overridden Run List: [recipe[opsworks_initial_setup], recipe[ssh_host_keys], recipe[ssh_users], recipe[mysql::client], recipe[dependencies], recipe[ebs], recipe[opsworks_ganglia::client], recipe[opsworks_stack_state_sync], recipe[mycustom-setup::nginx], recipe[mycustom-setup::php], recipe[mycustom-setup::nfs], recipe[mycustom-setup::framework], recipe[mycustom-setup::timezone], recipe[mycustom-setup::logrotate], recipe[newrelic::default], recipe[newrelic::php-agent], recipe[database::mysql], recipe[deploy::default], recipe[mycustom-deploy::repository], recipe[mycustom-deploy::nginx-site], recipe[mycustom-deploy::php-site], recipe[test_suite], recipe[opsworks_cleanup]]
[2014-09-29T07:32:44+00:00] INFO: Run List is [recipe[opsworks_initial_setup], recipe[ssh_host_keys], recipe[ssh_users], recipe[mysql::client], recipe[dependencies], recipe[ebs], recipe[opsworks_ganglia::client], recipe[opsworks_stack_state_sync], recipe[mycustom-setup::nginx], recipe[mycustom-setup::php], recipe[mycustom-setup::nfs], recipe[mycustom-setup::framework], recipe[mycustom-setup::timezone], recipe[mycustom-setup::logrotate], recipe[newrelic::default], recipe[newrelic::php-agent], recipe[database::mysql], recipe[deploy::default], recipe[mycustom-deploy::repository], recipe[mycustom-deploy::nginx-site], recipe[mycustom-deploy::php-site], recipe[test_suite], recipe[opsworks_cleanup]]
[2014-09-29T07:32:44+00:00] INFO: Run List expands to [opsworks_initial_setup, ssh_host_keys, ssh_users, mysql::client, dependencies, ebs, opsworks_ganglia::client, opsworks_stack_state_sync, mycustom-setup::nginx, mycustom-setup::php, mycustom-setup::nfs, mycustom-setup::framework, mycustom-setup::timezone, mycustom-setup::logrotate, newrelic::default, newrelic::php-agent, database::mysql, deploy::default, mycustom-deploy::repository, mycustom-deploy::nginx-site, mycustom-deploy::php-site, test_suite, opsworks_cleanup]
[2014-09-29T07:32:44+00:00] INFO: Starting Chef Run for www-prod-migration-3.localdomain
[2014-09-29T07:32:44+00:00] INFO: Running start handlers
[2014-09-29T07:32:44+00:00] INFO: Start handlers complete.
[2014-09-29T07:32:44+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: /reports/nodes/www-prod-migration-3.localdomain/runs
[2014-09-29T07:32:54+00:00] INFO: HTTP Request Returned 412 Precondition Failed: Could not satisfy version constraints for: mysql
================================================================================
Error Resolving Cookbooks for Run List:
================================================================================
Missing Cookbooks:
------------------
Could not satisfy version constraints for: mysql
Expanded Run List:
------------------
* opsworks_initial_setup
* ssh_host_keys
* ssh_users
* mysql::client
* dependencies
* ebs
* opsworks_ganglia::client
* opsworks_stack_state_sync
* mycustom-setup::nginx
* mycustom-setup::php
* mycustom-setup::nfs
* mycustom-setup::framework
* mycustom-setup::timezone
* mycustom-setup::logrotate
* newrelic::default
* newrelic::php-agent
* database::mysql
* deploy::default
* mycustom-deploy::repository
* mycustom-deploy::nginx-site
* mycustom-deploy::php-site
* test_suite
* opsworks_cleanup
[2014-09-29T07:32:55+00:00] ERROR: Running exception handlers
[2014-09-29T07:32:55+00:00] ERROR: Exception handlers complete
[2014-09-29T07:32:55+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out
[2014-09-29T07:32:55+00:00] ERROR: 412 "Precondition Failed"
[2014-09-29T07:32:55+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
这是Berksfile:
source "https://supermarket.getchef.com"
cookbook "database" , "= 2.3.0" , git: "https://github.com/opscode-cookbooks/database.git"
这是食谱元数据的有趣部分:
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1'
recipe 'mycustom-deploy::cron', 'Set up cron jobs'
recipe 'mycustom::default', 'Returns a fatal error'
recipe 'mycustom::nginx-site', 'configures Nginx for the new site'
recipe 'mycustom::p4ucron', '???'
recipe 'mycustom::php-site', 'Configures php for the new site'
recipe 'mycustom::service', 'Defines services with their allowed parameters'
recipe 'mycustom::repository', '???'
%w{ amazon }.each do |os|
supports os
end
depends 'mycustom-setup'
depends 'database'
还有一些其他自定义烹饪书,例如’mycustom-setup’,它是这个的依赖.我认为我应该查看所有这些冲突?
解决方法:
检查您的metadata.rb vs Berksfile cookbooks与依赖项.
我有同样的问题,但在AWS OpsWorks(有效的Chef Solo)中,主要问题在于在metadata.rb中包含了一本cookbook.删除它解决了问题.该主题在this post中进行了介绍/评论.
标签:mysql,amazon-web-services,chef,berkshelf 来源: https://codeday.me/bug/20190708/1403408.html