9

以前に何億回も使用したレシピを実行していますが、シェフとナイフを使用して新しい EC2 インスタンスをスピンアップすると、これらのエラーが発生します。

[2013-01-30T23:44:48+00:00] INFO: Processing user[dan] action create (/var/chef/cache/cookbooks/users/providers/manage.rb line 65)

 [2013-01-30T23:44:48+00:00] INFO: user[dan] created

 [2013-01-30T23:44:48+00:00] INFO: Processing directory[/home/dan/.ssh] action create (/var/chef/cache/cookbooks/users/providers/manage.rb line 81)

 [2013-01-30T23:44:48+00:00] INFO: directory[/home/dan/.ssh] created directory /home/dan/.ssh

 [2013-01-30T23:44:48+00:00] INFO: directory[/home/dan/.ssh] owner changed to 2003

 [2013-01-30T23:44:48+00:00] INFO: directory[/home/dan/.ssh] group changed to 2003

 [2013-01-30T23:44:48+00:00] INFO: directory[/home/dan/.ssh] mode changed to 700

 [2013-01-30T23:44:48+00:00] INFO: Processing template[/home/dan/.ssh/authorized_keys] action create (/var/chef/cache/cookbooks/users/providers/manage.rb line 88)

 [2013-01-30T23:44:48+00:00] FATAL: Could not load Moneta back end "BasicFile"


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

 Error executing action `create` on resource 'template[/home/dan/.ssh/authorized_keys]'

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


 LoadError

 ---------

 cannot load such file -- moneta/basic_file


 Resource Declaration:

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

 # In /var/chef/cache/cookbooks/users/providers/manage.rb


  88:         template "#{home_dir}/.ssh/authorized_keys" do

  89:           source "authorized_keys.erb"

  90:           cookbook new_resource.cookbook

  91:           owner u['id']

  92:           group u['gid'] || u['id']

  93:           mode "0600"

  94:           variables :ssh_keys => u['ssh_keys']

  95:         end

  96:       end


 Compiled Resource:

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

 # Declared in /var/chef/cache/cookbooks/users/providers/manage.rb:88:in `block (2 levels) in class_from_file'


 template("/home/dan/.ssh/authorized_keys") do

   provider Chef::Provider::Template

   action "create"

   retries 0

   retry_delay 2

   path "/home/dan/.ssh/authorized_keys"

   backup 5

   source "authorized_keys.erb"

   cookbook "users"

   variables {:ssh_keys=>"ssh-rsa <REPLACED BECAUSE SHUTUP>!"}

   cookbook_name "users"

   mode "0600"

   owner "dan"

   group "dan"

 end


 [2013-01-30T23:44:48+00:00] ERROR: Running exception handlers

 [2013-01-30T23:44:48+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json

 [2013-01-30T23:44:48+00:00] ERROR: Exception handlers complete

 [2013-01-30T23:44:48+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out

 [2013-01-30T23:44:48+00:00] FATAL: LoadError: template[/home/dan/.ssh/authorized_keys] (/var/chef/cache/cookbooks/users/providers/manage.rb line 88) had an error: LoadError: cannot load such file -- moneta/basic_file

何が起こっているのか、moneta とは何か、なぜそのテンプレートから構築できないのか、私にはわかりません。テンプレはtemplates/default/authorized_keys.erb期待通り。

4

1 に答える 1

10

最近アップグレードされた「moneta」gem です。幸いなことに、その gem 内で新しい機能を使用していない限り、簡単な修正方法があります (元に戻してください!)。以下を実行します。

gem install moneta --version=0.6.0
gem uninstall moneta
...そして、moneta >= 0.7.0 のすべてのバージョンをアンインストールします

参考シェフチケット

于 2013-02-02T03:51:38.487 に答える