简体   繁体   English

厨师:grafana社区食谱错误

[英]Chef: grafana community recipe error

I'm using the following recipe from chef supermarket: https://supermarket.chef.io/cookbooks/grafana 我正在从厨师超市使用以下食谱: https : //supermarket.chef.io/cookbooks/grafana

When I try to execute the following code it crashes: 当我尝试执行以下代码时,它崩溃了:

grafana_user 'lechucico' do
  user(
    name: 'lechucico',
    email: 'lechucico@example.com',
    password: 'lechu',
    isAdmin: true,
    organizations: [
      { name: 'Administration', role: 'Admin' },
      { name: 'Marketing', role: 'Admin' }
    ]
  )
  action :create
end

This error raises: 该错误引发:

Chef::Exceptions::ValidationFailed
==> default: ----------------------------------
==> default: Option user must be a kind of [String]!  You passed {"name"=>"lechucico", "email"=>"lechucico@example.com", "password"=>"lechu", "isAdmin"=>true, "organizations"=>[{"name"=>"Administration", "role"=>"Admin"}, {"name"=>"Marketing", "role"=>"Admin"}]}.
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default:   /var/chef/cache/cookbooks/living-grafana/recipes/default.rb:50:in `block in from_file'
==> default:   /var/chef/cache/cookbooks/living-grafana/recipes/default.rb:49:in `from_file'
==> default:
==> default: Relevant File Content:
==> default: ----------------------
==> default: /var/chef/cache/cookbooks/living-grafana/recipes/default.rb:
==> default:
==> default:  43:  #  )
==> default:  44:  #  action :update
==> default:  45:  #end
==> default:  46:
==> default:  47:  grafana_organization 'Marketing'
==> default:  48:
==> default:  49:  grafana_user 'lechucico' do
==> default:  50>>   user(
==> default:  51:      'name' => 'lechucico',
==> default:  52:      'email' => 'lechucico@example.com',
==> default:  53:      'password' => 'lechu',
==> default:  54:      'isAdmin' => true,
==> default:  55:      'organizations' => [
==> default:  56:        { 'name' =>  'Administration', 'role' =>  'Admin' },
==> default:  57:        { 'name' =>  'Marketing', 'role' =>  'Admin' }
==> default:  58:      ]
==> default:  59:    )
==> default:
==> default: Platform:
==> default: ---------
==> default: x86_64-linux

Why this isn't working? 为什么这不起作用?

Some links with information: 一些信息链接:

https://github.com/JonathanTron/chef-grafana https://github.com/JonathanTron/chef-grafana

https://github.com/JonathanTron/chef-grafana/pull/136 https://github.com/JonathanTron/chef-grafana/pull/136

That's due to the fact that despite the pull request has been merged into master, there was no release of the code within master to supermarket. 这是因为尽管请求请求已合并到主服务器中,但主服务器中没有将代码发布给超级市场。

According to the comments on this issue the ownership of the cookbook is likely to move to the sous-chef group. 根据对此问题的评论,菜谱的所有权可能会转移到sous-chef组。

If you rely on this latest code, you should download it from git, change its version and push to your chef-server. 如果您依赖于此最新代码,则应从git下载它,更改其版本并推送到您的Chef服务器。

You may wish to join Slack #sous-chefs channel on http://community-slack.chef.io/ for more information on the takeover process. 您可能希望在http://community-slack.chef.io/上加入Slack#sous-chefs频道,以获取有关接管过程的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM