cyberark / conjur-service-broker

Implementation of the Open Service Broker API for Conjur

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Service broker fails to deploy if Ruby buildpack defaults Ruby version to 2.4.x

izgeri opened this issue · comments

Summary

At current, when you deploy the service broker it displays a warning "WARNING You have not declared a Ruby version in your Gemfile."

If the Ruby buildpack is v1.8.15 or older, then the default Ruby version is 2.4.x and your service broker installation will actually fail:

              2021-01-14T23:04:14.18+0000 [STG/0] OUT        Running: bundle install --without development:test --jobs=4 --retry=4 --path /tmp/contents262779919/deps/0/vendor_bundle --binstubs /tmp/contents262779919/deps/0/binstubs --deployment
              2021-01-14T23:04:15.34+0000 [STG/0] OUT        nokogiri-1.11.1-x86_64-linux requires ruby version >= 2.5, < 3.1.dev, which is
              2021-01-14T23:04:15.34+0000 [STG/0] OUT        incompatible with the current version, ruby 2.4.9p362
              2021-01-14T23:04:15.34+0000 [STG/0] OUT        [31;1m**ERROR**[0m Unable to install gems: exit status 5
              2021-01-14T23:04:15.62+0000 [STG/0] ERR Failed to compile droplet: Failed to run all supply scripts: exit status 15
              2021-01-14T23:04:15.66+0000 [STG/0] OUT Exit status 223
              2021-01-14T23:04:16.10+0000 [STG/0] OUT Cell b5ef2a69-b87f-4049-85d2-0d845352f2b5 stopping instance 550289e5-a7d2-4bde-8ff7-3076c12f7960
              2021-01-14T23:04:16.10+0000 [STG/0] OUT Cell b5ef2a69-b87f-4049-85d2-0d845352f2b5 destroying container for instance 550289e5-a7d2-4bde-8ff7-3076c12f7960
              2021-01-14T23:04:16.19+0000 [API/0] ERR Failed to stage build: staging failed

Steps to Reproduce

Edit features/support/cf_helper.rb to add puts "Install logs: #{cf.log}" after the line where the service broker is started:

cf.execute("cf start conjur-service-broker")

Run ./dev/build and cd dev && summon ./test_e2e

See the WARNING in the logs and note that the Ruby version is determined by the Ruby buildpack.

Note: In our CI, the Ruby buildpack is new enough that it chooses Ruby v2.7.x, and it does not have the incompatibility issue with nokogiri-1.11.1-x86_64-linux - so the install will not fail. We have seen it fail in a TAS 2.8 vsphere environment, however.

Expected Results

There is no warning and the configured Ruby version is used, and the service broker is able to deploy.

Actual Results (including error logs, if applicable)

The warning is in the startup logs for the service broker, and if the Ruby buildpack is old enough the service broker installation fails.

Reproducible

  • Always
  • Sometimes
  • Non-Reproducible

Version/Tag number

Version v1.1.4 is impacted.