2017-11-30 2 views
0

안녕하세요 저는 웹 서버를 다시 시작하기위한 요리사 daemontool 요리 책을 사용하려고합니다. 그러나 내가 로컬 또는 도커에 같은 것을 배포하려고 할 때 아래 오류가 발생합니다.이러한 파일을로드 할 수 없습니다 - chef/mixin/command

는 파일을로드 할 수 없습니다 - 요리사/믹스 인/명령 나는 오픈 소스 커뮤니티하지만 지금까지 행운의 동일한 검색 시도 않았다

. 아래는 스택 추적입니다. 스택 추적은 :

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도 우분투 16.04와 호환되지 않습니다. 나는 당신의 유스 케이스가 무엇인지 확신하지 못한다. '웹 서버를 재시작하는 것'은 매우 모호하다. 누군가가 daemontools 요리 책없이 도울 수 있을지 모른다. –

+0

@SzymonSzypulski 감사합니다, 이제 우리는 실현하고 대체품을 찾습니다. 다시 한번 감사드립니다. –

답변

0

이 대답 다움에 대한 반복하지만 의견에 대답했다 : 요리 책은 당신이 사용하는 요리사의 버전과 호환되지 않습니다. 믹스 인은 Chef : Mixin :: ShellOut에 찬성하여 삭제되었습니다.

관련 없음 : 요리사를 사용하여 도커 이미지를 작성하려는 경우 (실제로는 좋지 않지만 비현실적으로 비효율적 인 이미지를 만듭니다) docker build 대신 패커를 사용하십시오.

+0

감사합니다 @ 코데 너 –