Closed b27cs closed 2 years ago
Closing this issue. We plan to remove the update script in an upcoming release. Please follow our recommended, supported approaches to update CodeDeploy agent on your fleet.
https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-update.html
The install script includes support for ruby >= 2.5, but in the update script which runs periodically after the agent has been installed, the ruby version list is only >= 2.4.
As a result, when codedeploy-agent is installed on a system with ruby 2.5, the service is stopped everytime after the update script runs since it gives an error due to the unsupported ruby version.
In the install script, see line 88-90: def supported_ruby_versions ['2.5', '2.4', '2.3', '2.2', '2.1', '2.0'] end
and here is the update script, lines 99-101:
def supported_ruby_versions ['2.4', '2.3', '2.2', '2.1', '2.0'] end
So basically, when the update script runs, we see:
/opt/codedeploy-agent/bin/update --sanity-check --downgrade deb I, [2019-05-23T07:32:44.988327 #16683] INFO -- : Starting Ruby version check. E, [2019-05-23T07:32:44.988606 #16683] ERROR -- : Current running Ruby version for root is 2.5.1, but Ruby version 2.x needs to be installed. E, [2019-05-23T07:32:44.988739 #16683] ERROR -- : If you already have the proper Ruby version installed, please either create a symlink to /usr/bin/ruby2.x, E, [2019-05-23T07:32:44.988891 #16683] ERROR -- : or run this install script with right interpreter. Otherwise please install Ruby 2.x for root user. E, [2019-05-23T07:32:44.989015 #16683] ERROR -- : You can get more information by running the script with --help option.