2017-02-14 50 views
2

今天部署我們的堆棧後,我們得到了這個錯誤。 有沒有辦法讓opsworks使用較低版本的yum?Opsworks廚師11.10和百勝5.0衝突

現在,我們正在使用的廚師11.10,它在默認情況下服用百勝5.0.0,我試圖限制metadata.rb使用百勝4.1.0,但我得到這個錯誤太 不能滿足版本約束:yum

堆棧跟蹤下方======================================== ======================================== 配方編譯錯誤 /var/lib /aws/opsworks/cache.stage2/cookbooks/yum/resources/globalconfig.rb =============================== =================================================

NoMethodError 
    ------------- 
    undefined method `property' for #<Class:0x007eff00deaf20> 


    Cookbook Trace: 
    --------------- 
    /var/lib/aws/opsworks/cache.stage2/cookbooks/yum/resources/globalconfig.rb:22:in 
    `class_from_file' 


    Relevant File Content: 
    ---------------------- 
    /var/lib/aws/opsworks/cache.stage2/cookbooks/yum/resources/globalconfig.rb: 

    15: # distributed under the License is distributed on an "AS IS" BASIS, 
    16: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    17: # See the License for the specific language governing permissions and 
    18: # limitations under the License. 
    19: # 
    20: 
    21: # http://linux.die.net/man/5/yum.conf 
    22>> property :alwaysprompt, [TrueClass, FalseClass] 
    23: property :assumeyes, [TrueClass, FalseClass] 
    24: property :bandwidth, String, regex: /^\d+/ 
    25: property :bugtracker_url, String, regex: /.*/ 
    26: property :clean_requirements_on_remove, [TrueClass, FalseClass] 
    27: property :cachedir, String, regex: /.*/, default: 
    '/var/cache/yum/$basearch/$releasever' 
    28: property :color, String, equal_to: %w(always never) 
    29: property :color_list_available_downgrade, String, regex: /.*/ 
    30: property :color_list_available_install, String, regex: /.*/ 
    31: property :color_list_available_reinstall, String, regex: /.*/ 



[2017-02-14T00:12:24+00:00] ERROR: Running exception handlers 
[2017-02-14T00:12:24+00:00] ERROR: Exception handlers complete 
[2017-02-14T00:12:24+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out 
[2017-02-14T00:12:24+00:00] ERROR: undefined method `property' for #<Class:0x007eff00deaf20> 
[2017-02-14T00:12:24+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) 

回答

3

支持廚師11 was removed with 4.0。應該在廚師11上工作的最新版本是3.13.0

+0

確實是這個問題,實際上我忘了在Berksfile上添加該約束,因爲我只更新了metadata.rb – raul782

相關問題