2017-11-30 10 views
0

こんにちは私はchef daemontool cookbookを使ってWebサーバーを再起動しようとしています。しかし、自分のローカルまたはドッカーに同じものをデプロイしようとしているとき、私は以下のエラーを受けています。私は、オープンソースコミュニティが、これまで運に同じを検索しようとしたんでしたシェフ/ミックスイン/コマンドはそのようなファイルを読み込めません - シェフ/ mixin /コマンド

-

は、このようなファイルをロードすることはできません。以下はスタックトレースです。 スタックトレース:

Chef: 13.5.3 
[email protected]:~/chef-repo/cookbooks/app# lsb_release -a 
No LSB modules are available. 
Distributor ID: Ubuntu 
Description: Ubuntu 16.04 LTS 
Release: 16.04 
Codename: xenial 

[email protected]:~/chef-repo/cookbooks/app# docker build -t app . 
Sending build context to Docker daemon 115.2kB 
Step 1/4 : FROM zuazo/chef-local:debian-7 
---> 8f87bff9cf1b 
Step 2/4 : COPY . /tmp/app 
---> Using cache 
---> 6c12ba0aa8da 
Step 3/4 : RUN berks vendor -b /tmp/app/Berksfile $COOKBOOK_PATH 
---> Using cache 
---> 0eeeb94403e6 

Step 4/4 : RUN chef-client -r "recipe[apt],recipe[app::steup.rb],recipe[daemontools],recipe[app::deploy.rb]" 
---> Running in 5e3de78d56db 
Starting Chef Client, version 13.4.19 
resolving cookbooks for run list: ["apt", "app::steup.rb", "daemontools", "app::deploy.rb"] 
Synchronizing Cookbooks: 

- apt (6.1.4) 
- app (0.1.0) 
- daemontools (1.5.0) 
- application (5.2.0) 
- poise-python (1.6.0) 
- build-essential (8.0.3) 
- pacman (1.1.1) 
- poise (2.8.1) 
- poise-service (1.5.2) 
- poise-languages (2.1.1) 
- seven_zip (2.0.2) 
- mingw (2.0.1) 
- poise-archive (1.5.0) 
- windows (3.2.0) 
- ohai (5.2.0) 
Installing Cookbook Gems: 
Compiling Cookbooks... 

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

Recipe Compile Error in /etc/chef/local-mode-cache/cache/cookbooks/daemontools/providers/service.rb 

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

LoadError 
--------- 
cannot load such file -- chef/mixin/command 
Cookbook Trace: 
--------------- 
/etc/chef/local-mode-cache/cache/cookbooks/daemontools/providers/service.rb:20:in `class_from_file' 
Relevant File Content: 
---------------------- 
/etc/chef/local-mode-cache/cache/cookbooks/daemontools/providers/service.rb: 
13: # Unless required by applicable law or agreed to in writing, software 
14: # distributed under the License is distributed on an "AS IS" BASIS, 
15: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
16: # See the License for the specific language governing permissions and 
17: # limitations under the License. 
18: # 
19: 
20>> require 'chef/mixin/command' 
21: require 'chef/mixin/language' 
22: include Chef::Mixin::Command 
23: 
24: def load_current_resource 
25: @svc = Chef::Resource::DaemontoolsService.new(new_resource.name) 
26: @svc.service_name(new_resource.service_name) 
27: 
28: Chef::Log.debug("Checking status of service #{new_resource.service_name}") 
29: 
System Info: 
------------ 
chef_version=13.4.19 
platform=debian 
platform_version=7.11 
ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux] 
program_name=chef-client worker: ppid=7;start=06:05:22; 
executable=/opt/chefdk/bin/chef-client 
Running handlers: 
[2017-11-30T06:05:24+00:00] ERROR: Running exception handlers 
Running handlers complete 
[2017-11-30T06:05:24+00:00] ERROR: Exception handlers complete 
Chef Client failed. 0 resources updated in 02 seconds 
[2017-11-30T06:05:24+00:00] FATAL: Stacktrace dumped to /etc/chef/local-mode-cache/cache/chef-stacktrace.out 
[2017-11-30T06:05:24+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report 
[2017-11-30T06:05:24+00:00] ERROR: cannot load such file -- chef/mixin/command 
[2017-11-30T06:05:24+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) 
The command '/bin/sh -c chef-client -r "recipe[apt],recipe[app::steup.rb],recipe[daemontools],recipe[app::deploy.rb]"' returned a non-zero code: 1 
+0

Daemontoolsの料理本はもはや管理されていません。シェフ13でもubuntu 16.04とも互換性がありません。あなたのユースケースがわからない - ウェブサーバーを再起動するのはかなり曖昧です。もしあなたがあなたの問題を説明するなら、誰かがdaemontools cookbookなしで助けることができるかもしれません。 –

+0

@SzymonSzypulskiありがとうございました、今我々は実現し、代用品を探します。 もう一度ありがとうございます。 –

答えて

0

。これはコメントでアップ答えましたが、答えネスのために繰り返す:料理は、使用しているシェフのバージョンと互換性がありません。そのミックスインはChef :: Mixin :: ShellOutのために廃止されました。

無関係:ドッカー画像を構築するためにシェフを使用したい場合は、docker buildの代わりにパッカーを使用してください(実際にはそうではありませんが、ひどく非効率な画像になります)。

+0

ありがとうございます@コーデンジャー –