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)
确实是这个问题,实际上我忘了在Berksfile上添加该约束,因为我只更新了metadata.rb – raul782