Description of problem: Gears using the ruby cartridge fail to upgrade in INT Version-Release number of selected component (if applicable): openshift-origin-cartridge-ruby-1.25.3-1.el6oso.noarch How reproducible: 100% Steps to Reproduce: 1. Create a ruby app prior to upgrading to openshift-origin-cartridge-ruby-1.25.3-1.el6oso.noarch 2. Run gear upgrades Actual results: Unhandled shell exception performing step: Shell command '/bin/cp -ad /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/run /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/bin /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/lib /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/logs /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/COPYRIGHT /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/env /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/LICENSE /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/metadata /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/versions /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/README.md /var/lib/openshift/5385e3836cec0e279700009e/ruby' returned an error. rc=1\nreturn code: 1\nstdout: \nstderr: /bin/cp: cannot overwrite directory `/var/lib/openshift/5385e3836cec0e279700009e/ruby/versions/1.9/template/.openshift' with non-directory\n/bin/cp: cannot overwrite directory `/var/lib/openshift/5385e3836cec0e279700009e/ruby/versions/1.8/template/.openshift' with non-directory\n Expected results: No errors Additional info: The fix for https://bugzilla.redhat.com/show_bug.cgi?id=1101779 only fixed the directories in the cartridge repository. It did not fix live gears on the nodes. I believe we'll need to create an upgrade script for ruby that performs similar logic to https://github.com/openshift/origin-server/commit/33b149e66f8dda2f593b4779066766f514ff4344, but have it work on gears instead of the cartridge repository.
Seems like I can't use the upgrade script to fix this, as it's run after the new version of the cartridge is overlaid in the gear (that's where the `cp' error comes from). http://openshift.github.io/documentation-latest/oo_cartridge_developers_guide.html#compatible-upgrades I think I need to mark the upgrade incompatible and put the affected directories into setup_rewritten section of the cartridge's managed_files.yml for it's removal.
https://github.com/openshift/origin-server/pull/5461
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/b759b4537047f3db4dc6caab40421b475fd95ed7 Fix bug 1102428 Remove directories that are to be replaced by symlinks when the new version of cartridge is overlaid into gear. Note: Mark ruby for incompatible upgrade. https://bugzilla.redhat.com/show_bug.cgi?id=1102428
Checked it when upgrading from devenv_stage_837 to devenv_stage_861, the issue is fixed, so mark it as VERIFIED. FYI: After upgrading, the latest ruby cartridge package version is openshift-origin-cartridge-ruby-1.25.4-1.el6oso.noarch