ERROR: Cookbook loaded at path(s) has invalid metadata
ERROR: Cookbook loaded at path(s) has invalid metadata
当我 运行:
:$ vagrant provision
或
:$ vagrant up
我有一个错误:
nisevi@localhost processor (master):$ vagrant provision
Using ssh deploy key of: /home/nisevi/.ssh/id_rsa
==> default: Chef 12.0.3 Omnibus package is already installed.
==> default: Running provisioner: shell...
default: Running: inline script
==> default: W
==> default: :
==> default: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/multiverse amd64 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_multiverse_binary-amd64_Packages)
==> default: W
==> default: : Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/multiverse i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_multiverse_binary-i386_Packages)
==> default: W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_multiverse_binary-amd64_Packages)
==> default: W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty/multiverse i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_multiverse_binary-i386_Packages)
==> default: W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_multiverse_binary-amd64_Packages)
==> default: W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_multiverse_binary-i386_Packages)
==> default: W: You may want to run apt-get update to correct these problems
==> default: Running provisioner: chef_solo...
==> default: Detected Chef (latest) is already installed
Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: [2015-01-07T03:09:42+00:00] INFO: Forking chef instance to converge...
==> default: [2015-01-07T03:09:42+00:00] INFO: *** Chef 12.0.3 ***
==> default: [2015-01-07T03:09:42+00:00] INFO: Chef-client pid: 1224
==> default: [2015-01-07T03:09:50+00:00] INFO: Setting the run_list to ["role[processor]"] from CLI options
==> default: [2015-01-07T03:09:50+00:00] INFO: Run List is [role[processor]]
==> default: [2015-01-07T03:09:50+00:00] INFO: Run List expands to [opsworks_initial_setup, mysql::client, dependencies, opsworks_ganglia::client, deploy::default, ba-processor::setup, ba-processor::deploy, sidekiq::deploy, opsworks_ganglia::configure-client]
==> default: [2015-01-07T03:09:50+00:00] INFO: Starting Chef Run for ubuntu1404-opsworks
==> default: [2015-01-07T03:09:50+00:00] INFO: Running start handlers
==> default: [2015-01-07T03:09:50+00:00] INFO: Start handlers complete.
==> default: [2015-01-07T03:09:51+00:00] WARN: found a directory vendor in the cookbook path, but it contains no cookbook files. skipping.
==> default: [2015-01-07T03:09:51+00:00] ERROR: Running exception handlers
==> default: [2015-01-07T03:09:51+00:00] ERROR: Exception handlers complete
==> default: [2015-01-07T03:09:51+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-01-07T03:09:51+00:00] ERROR: Cookbook loaded at path(s) [/tmp/vagrant-chef-3/chef-solo-2/cookbooks/tad-server] has invalid metadata: The `name' attribute is required in cookbook metadata
==> default: [2015-01-07T03:09:51+00: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.
有谁知道导致此错误的原因或与之相关的原因?
如错误所述,您 必须 添加 name 'tad-server'
此说明书中的 metadata.rb
文件。在很久以前,这是可选的,所以很多人根本没有在他们的食谱中加入 metadata.rb,但现在有些工具至少需要这样做。元数据中的所有其他字段仍然是可选的,但强烈建议 version
。
您需要将您的食谱名称添加到食谱目录中的 metadata.rb 文件中。
我只是 运行 与厨师-客户食谱有关。上传失败,直到我将以下行添加到 chef-client/metadata.rb
name "chef-client"
当我 运行:
:$ vagrant provision
或
:$ vagrant up
我有一个错误:
nisevi@localhost processor (master):$ vagrant provision
Using ssh deploy key of: /home/nisevi/.ssh/id_rsa
==> default: Chef 12.0.3 Omnibus package is already installed.
==> default: Running provisioner: shell...
default: Running: inline script
==> default: W
==> default: :
==> default: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/multiverse amd64 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_multiverse_binary-amd64_Packages)
==> default: W
==> default: : Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/multiverse i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_multiverse_binary-i386_Packages)
==> default: W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_multiverse_binary-amd64_Packages)
==> default: W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty/multiverse i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_multiverse_binary-i386_Packages)
==> default: W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_multiverse_binary-amd64_Packages)
==> default: W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_multiverse_binary-i386_Packages)
==> default: W: You may want to run apt-get update to correct these problems
==> default: Running provisioner: chef_solo...
==> default: Detected Chef (latest) is already installed
Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: [2015-01-07T03:09:42+00:00] INFO: Forking chef instance to converge...
==> default: [2015-01-07T03:09:42+00:00] INFO: *** Chef 12.0.3 ***
==> default: [2015-01-07T03:09:42+00:00] INFO: Chef-client pid: 1224
==> default: [2015-01-07T03:09:50+00:00] INFO: Setting the run_list to ["role[processor]"] from CLI options
==> default: [2015-01-07T03:09:50+00:00] INFO: Run List is [role[processor]]
==> default: [2015-01-07T03:09:50+00:00] INFO: Run List expands to [opsworks_initial_setup, mysql::client, dependencies, opsworks_ganglia::client, deploy::default, ba-processor::setup, ba-processor::deploy, sidekiq::deploy, opsworks_ganglia::configure-client]
==> default: [2015-01-07T03:09:50+00:00] INFO: Starting Chef Run for ubuntu1404-opsworks
==> default: [2015-01-07T03:09:50+00:00] INFO: Running start handlers
==> default: [2015-01-07T03:09:50+00:00] INFO: Start handlers complete.
==> default: [2015-01-07T03:09:51+00:00] WARN: found a directory vendor in the cookbook path, but it contains no cookbook files. skipping.
==> default: [2015-01-07T03:09:51+00:00] ERROR: Running exception handlers
==> default: [2015-01-07T03:09:51+00:00] ERROR: Exception handlers complete
==> default: [2015-01-07T03:09:51+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-01-07T03:09:51+00:00] ERROR: Cookbook loaded at path(s) [/tmp/vagrant-chef-3/chef-solo-2/cookbooks/tad-server] has invalid metadata: The `name' attribute is required in cookbook metadata
==> default: [2015-01-07T03:09:51+00: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.
有谁知道导致此错误的原因或与之相关的原因?
如错误所述,您 必须 添加 name 'tad-server'
此说明书中的 metadata.rb
文件。在很久以前,这是可选的,所以很多人根本没有在他们的食谱中加入 metadata.rb,但现在有些工具至少需要这样做。元数据中的所有其他字段仍然是可选的,但强烈建议 version
。
您需要将您的食谱名称添加到食谱目录中的 metadata.rb 文件中。 我只是 运行 与厨师-客户食谱有关。上传失败,直到我将以下行添加到 chef-client/metadata.rb
name "chef-client"