Chef infra Opsworks厨师长11.10和百胜5.0冲突

Chef infra Opsworks厨师长11.10和百胜5.0冲突,chef-infra,yum,aws-opsworks,Chef Infra,Yum,Aws Opsworks,今天在部署堆栈之后,我们遇到了这个错误。 有没有办法让opsworks使用较低版本的yum 现在,我们使用的是chef 11.10,默认情况下使用的是yum 5.0.0,我试图将metadata.rb约束为使用yum 4.1.0,但我也遇到了这个错误 无法满足以下内容的版本约束:yum 在堆栈跟踪之下================================================================================ 中的配方编译错误 /var/lib/

今天在部署堆栈之后,我们遇到了这个错误。 有没有办法让opsworks使用较低版本的yum

现在,我们使用的是chef 11.10,默认情况下使用的是yum 5.0.0,我试图将metadata.rb约束为使用yum 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)
nomethoderor
-------------
未定义的方法“属性”#
食谱跟踪:
---------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/yum/resources/globalconfig.rb:22:in
`从_文件'
相关文件内容:
----------------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/yum/resources/globalconfig.rb:
15:#根据许可证分发是按“原样”分发的,
16:#无任何明示或暗示的保证或条件。
17:#请参阅许可证,了解管理权限和权限的特定语言
18:#许可证下的限制。
19:  #
20:  
21:  # http://linux.die.net/man/5/yum.conf
22>>属性:AlwaysCompt[TrueClass,FalseClass]
23:属性:假设是[TrueClass,FalseClass]
24:属性:带宽、字符串、正则表达式:/^\d+/
25:属性:bugtracker\u url,字符串,正则表达式:/*/
26:属性:清除时的清洁要求[TrueClass,FalseClass]
27:属性:cachedir,字符串,正则表达式:/.*/,默认值:
“/var/cache/yum/$basearch/$releasever”
28:属性:颜色,字符串,等于:%w(始终不)
29:属性:颜色\列表\可用\降级,字符串,正则表达式:/*/
30:property:color\u list\u available\u install,String,regex:/*/
31:属性:颜色\u列表\u可用\u重新安装,字符串,正则表达式:/*/
[2017-02-14T00:12:24+00:00]错误:正在运行异常处理程序
[2017-02-14T00:12:24+00:00]错误:异常处理程序已完成
[2017-02-14T00:12:24+00:00]致命:Stacktrace转储到/var/lib/aws/opsworks/cache.stage2/chef-Stacktrace.out
[2017-02-14T00:12:24+00:00]错误:未定义的方法“属性”#
[2017-02-14T00:12:24+00:00]致命:Chef::异常::ChildConverge错误:Chef运行进程退出失败(退出代码1)

对厨师长11的支持。chef 11的最新版本应该是
3.13.0

,这确实是问题所在,实际上我忘记在Berksfile上添加该约束,因为我只更新了metadata.rb