Description of problem: $ sudo yum -y update --rpmverbosity=debug [sudo] password for admiller: Loaded plugins: amazon-id, downloadonly, post-transaction-actions, rhui-lb, security Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package openshift-origin-cartridge-ruby.noarch 0:1.25.1-1.el6oso will be updated ---> Package openshift-origin-cartridge-ruby.noarch 0:1.25.2-1.el6oso will be an update --> Finished Dependency Resolution Dependencies Resolved ====================================================================================================================== Package Arch Version Repository Size ====================================================================================================================== Updating: openshift-origin-cartridge-ruby noarch 1.25.2-1.el6oso li-candidate 47 k Transaction Summary ====================================================================================================================== Upgrade 1 Package(s) Total download size: 47 k Downloading Packages: openshift-origin-cartridge-ruby-1.25.2-1.el6oso.noarch.rpm | 47 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Updating : openshift-origin-cartridge-ruby-1.25.2-1.el6oso [###### ] 1/2XZDIO: 4 reads, 32768 total bytes in 0.001601 secs Updating : openshift-origin-cartridge-ruby-1.25.2-1.el6oso.noarch 1/2 Error unpacking rpm package openshift-origin-cartridge-ruby-1.25.2-1.el6oso.noarch D: closed db index /var/lib/rpm/Conflictname D: closed db index /var/lib/rpm/Providename D: closed db index /var/lib/rpm/Requirename D: closed db index /var/lib/rpm/Basenames D: closed db index /var/lib/rpm/Name D: closed db index /var/lib/rpm/Packages D: closed db environment /var/lib/rpm D: opening db environment /var/lib/rpm cdb:mpool:joinenv D: opening db index /var/lib/rpm/Packages create mode=0x42 D: sanity checking 2 elements D: opening db index /var/lib/rpm/Name create mode=0x42 D: read h# 2190 Header SHA1 digest: OK (ecba00c6fb7470401205233d858244d284c07b57) D: running pre-transaction scripts D: computing 219 file fingerprints D: computing file dispositions D: opening db index /var/lib/rpm/Basenames create mode=0x42 D: 0x0000ca41 4096 587769 216378 / D: ========== +++ openshift-origin-cartridge-ruby-1.25.2-1.el6oso noarch-linux 0x0 D: Expected size: 48240 = lead(96)+sigs(180)+pad(4)+data(47960) D: Actual size: 48240 D: openshift-origin-cartridge-ruby-1.25.2-1.el6oso.noarch: Header SHA1 digest: OK (a3a4298162bee92f5c60bcd7c7d644838fbd9196) D: install: openshift-origin-cartridge-ruby-1.25.2-1.el6oso has 90 files, test = 0 D: opening db index /var/lib/rpm/Triggername create mode=0x42 D: ========== Directories not explicitly included in package: D: 0 /etc/openshift/cart.conf.d/httpd/ D: 1 /usr/libexec/openshift/cartridges/ D: ========== D: fini 040755 2 ( 0, 0) 0 /etc/openshift/cart.conf.d/httpd/ruby D: fini 040755 9 ( 0, 0) 0 /usr/libexec/openshift/cartridges/ruby D: fini 100644 1 ( 0, 0) 52 /usr/libexec/openshift/cartridges/ruby/COPYRIGHT;5385013d D: fini 100644 1 ( 0, 0) 523 /usr/libexec/openshift/cartridges/ruby/LICENSE;5385013d D: fini 100644 1 ( 0, 0) 153 /usr/libexec/openshift/cartridges/ruby/README.md;5385013d D: fini 040755 2 ( 0, 0) 0 /usr/libexec/openshift/cartridges/ruby/bin D: fini 100755 1 ( 0, 0) 8752 /usr/libexec/openshift/cartridges/ruby/bin/control;5385013d D: fini 100755 1 ( 0, 0) 952 /usr/libexec/openshift/cartridges/ruby/bin/install;5385013d D: fini 100755 1 ( 0, 0) 1397 /usr/libexec/openshift/cartridges/ruby/bin/setup;5385013d D: fini 100755 1 ( 0, 0) 635 /usr/libexec/openshift/cartridges/ruby/bin/upgrade;5385013d D: fini 040755 2 ( 0, 0) 0 /usr/libexec/openshift/cartridges/ruby/env D: fini 100644 1 ( 0, 0) 32 /usr/libexec/openshift/cartridges/ruby/env/OPENSHIFT_RUBY_LOG_DIR.erb;5385013d D: fini 100644 1 ( 0, 0) 15 /usr/libexec/openshift/cartridges/ruby/env/PASSENGER_TEMP_DIR;5385013d D: fini 040755 2 ( 0, 0) 0 /usr/libexec/openshift/cartridges/ruby/lib D: fini 100644 1 ( 0, 0) 858 /usr/libexec/openshift/cartridges/ruby/lib/ruby_context;5385013d D: fini 100755 1 ( 0, 0) 4565 /usr/libexec/openshift/cartridges/ruby/lib/util;5385013d D: fini 040755 2 ( 0, 0) 0 /usr/libexec/openshift/cartridges/ruby/logs D: fini 040755 2 ( 0, 0) 0 /usr/libexec/openshift/cartridges/ruby/metadata D: fini 100644 1 ( 0, 0) 293 /usr/libexec/openshift/cartridges/ruby/metadata/managed_files.yml;5385013d D: fini 100644 1 ( 0, 0) 1274 /usr/libexec/openshift/cartridges/ruby/metadata/manifest.yml;5385013d D: fini 040755 2 ( 0, 0) 0 /usr/libexec/openshift/cartridges/ruby/run D: fini 040755 6 ( 0, 0) 0 /usr/libexec/openshift/cartridges/ruby/versions D: fini 040755 4 ( 0, 0) 0 /usr/libexec/openshift/cartridges/ruby/versions/1.8 D: fini 040755 3 ( 0, 0) 0 /usr/libexec/openshift/cartridges/ruby/versions/1.8/etc D: fini 120777 1 ( 0, 0) 21 /usr/libexec/openshift/cartridges/ruby/versions/1.8/etc/conf;5385013d D: fini 040755 2 ( 0, 0) 0 /usr/libexec/openshift/cartridges/ruby/versions/1.8/etc/conf.d D: fini 100644 1 ( 0, 0) 861 /usr/libexec/openshift/cartridges/ruby/versions/1.8/etc/conf.d/openshift.conf.erb;5385013d D: fini 120777 1 ( 0, 0) 47 /usr/libexec/openshift/cartridges/ruby/versions/1.8/etc/conf.d/performance.conf.erb;5385013d D: fini 040755 2 ( 0, 0) 0 /usr/libexec/openshift/cartridges/ruby/versions/1.8/template D: fini 120777 1 ( 0, 0) 32 /usr/libexec/openshift/cartridges/ruby/versions/1.8/template/.openshift;5385013d error: unpacking of archive failed on file /usr/libexec/openshift/cartridges/ruby/versions/1.8/template/.openshift: cpio: rename Running post transaction command: /usr/local/bin/ops-run-rkhunter Scheduling rkhunter to run in the future... Done. Verifying : openshift-origin-cartridge-ruby-1.25.2-1.el6oso.noarch 1/2 openshift-origin-cartridge-ruby-1.25.1-1.el6oso.noarch was supposed to be removed but is not! Verifying : openshift-origin-cartridge-ruby-1.25.1-1.el6oso.noarch 2/2 Failed: openshift-origin-cartridge-ruby.noarch 0:1.25.1-1.el6oso openshift-origin-cartridge-ruby.noarch 0:1.25.2-1.el6oso Version-Release number of selected component (if applicable): openshift-origin-cartridge-ruby.noarch 0:1.25.1-1.el6oso openshift-origin-cartridge-ruby.noarch 0:1.25.2-1.el6oso How reproducible: Always. Actual results: Failed to update Expected results: Successful update Additional info: git commit 0aa971c3995bd45ef283503d43e149f717a67809 to origin-server appears to change a directory to a symlink which is causing this issue upon the cpio archive unpacking in the rpm update transaction.
Adding the following to the spec file would fix the directory to link problem during upgrades. %pretrans [ -d %{cartridgedir}/versions/1.8/template/.openshift ] && ! [ -L %{cartridgedir}/versions/1.8/template/.openshift ] && \ rm -rf %{cartridgedir}/versions/1.8/template/.openshift || : [ -d %{cartridgedir}/versions/1.9/template/.openshift ] && ! [ -L %{cartridgedir}/versions/1.9/template/.openshift ] && \ rm -rf %{cartridgedir}/versions/1.9/template/.openshift || :
Can not scale up ruby app in INT.And could not create scalable ruby app sometimes in INT. Both situation shows message: #rhc cartridge-scale -a rubys -c ruby-1.8 --min 2 -l xiuwang+m This operation will run until the application is at the minimum scale and may take several minutes. Setting scale range for ruby-1.8 ... cp: cannot stat `/var/lib/openshift/5385a6b76cec0e9a65000203/ruby//versions/1.8/template/.openshift;5384f5a5/.openshift.save/action_hooks/README.md': No such file or directory cp: cannot stat `/var/lib/openshift/5385a6b76cec0e9a65000203/ruby//versions/1.8/template/.openshift;5384f662/.openshift.save/action_hooks/README.md': No such file or directory cp: cannot stat `/var/lib/openshift/5385a6b76cec0e9a65000203/ruby//versions/1.8/template/.openshift;538505d5/.openshift.save/action_hooks/README.md': No such file or directory Have checked no dirs of openshift;5384f5a5,.openshift;5384f662,.openshift;538505d5 under /var/lib/openshift/5385a6b76cec0e9a65000203/ruby//versions/1.8/template
https://github.com/openshift/origin-server/pull/5454
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/33b149e66f8dda2f593b4779066766f514ff4344 Fix bug 1101779 RPM can't handle directories being replaced by symlinks and thus %pretrans workaround is needed. Credit: Troy Dawson
Tested it by upgrading devenv_stage_837 to devenv_4824, the ruby package can be updated to the latest version now, but it's failed to upgrade/migrate ruby applications, please refer to the following details: # oo-broker oo-admin-upgrade upgrade-gear --login chunchen --app-name <ruby_app_name> --version 2.0.45 --upgrade-gear 5386a21568a7bb0f75000368 <--------------snip--------------> Unhandled shell exception performing step: Shell command '/bin/cp -ad /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/versions /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/run /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/lib /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/bin /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/metadata /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/README.md /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/LICENSE /var/lib/openshift/.cartridge_repository/redhat-ruby/0.0.18/env /var/lib/openshift/5386a21c30a7bb0f75000259/ruby' returned an error. rc=1\nreturn code: 1\nstdout: \nstderr: /bin/cp: cannot overwrite directory `/var/lib/openshift/5386a21c30a7bb0f75000259/ruby/versions/1.8/template/.openshift' with non-directory\n/bin/cp: cannot overwrite directory `/var/lib/openshift/5386a21c30a7bb0f75000259/ruby/versions/1.9/template/.openshift' with non-directory\n <--------------snip--------------> btw, after instance upgrading, the latest ruby package version is openshift-origin-cartridge-ruby-1.25.3-1.git.0.7206a7f.el6.noarch .
The upgrade gear issue will be tracked by https://bugzilla.redhat.com/show_bug.cgi?id=1102428 The rpm issue has been fixed here. Move the bug to verified.