Hide Forgot
Description of problem: Upgrade the gear may be fail with partial migration, when trying to re-run upgrade gear with haproxy cartridge exist will always report fail since the haproxy/conf/gear-registry.db does not exist. We should skip the "migrate_gear_registry" if the haproxy cartridge was already upgraded. Version-Release number of selected component (if applicable): devenv_3901 How reproducible: always Steps to Reproduce: 1. Create apps on devenv-stage_496 2. Upgrade the server and migrate the datastore 3. Upgrade gears with oo-admin-upgrade #oo-admin-upgrade upgrade-node --version 2.0.35 --ignore-cartridge-version 4. Re-run upgrade on the gears with haproxy cartridge Actual results: # oo-admin-upgrade upgrade-gear --version 2.0.35 --login bmeng --app-name php1s --ignore-cartridge-version --upgrade-gear 525e328bb39175ead6000063 ... "upgrade_gear_registry": { "context": {}, "errors": [ "Unhandled exception performing step: No such file or directory - /var/lib/openshift/525e328bb39175ead6000063/haproxy/conf/gear-registry.db\n/usr/libexec/openshift/lib/gear_upgrade_extension.rb:131:in `read'\n/usr/libexec/openshift/lib/gear_upgrade_extension.rb:131:in `block in migrate_gear_registry'\n/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.16.0/lib/openshift-origin-node/utils/upgrade_progress.rb:32:in `step'\n/usr/libexec/openshift/lib/gear_upgrade_extension.rb:126:in `migrate_gear_registry'\n/usr/libexec/openshift/lib/gear_upgrade_extension.rb:53:in `pre_cartridge_upgrade'\n/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.16.0/lib/openshift-origin-node/model/upgrade.rb:345:in `block in pre_cartridge_upgrade'\n/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.16.0/lib/openshift-origin-node/utils/upgrade_progress.rb:32:in `step'\n/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.16.0/lib/openshift-origin-node/model/upgrade.rb:344:in `pre_cartridge_upgrade'\n/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.16.0/lib/openshift-origin-node/model/upgrade.rb:381:in `upgrade_cartridges'\n/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.16.0/lib/openshift-origin-node/model/upgrade.rb:159:in `execute'\n/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/agent/openshift.rb:243:in `upgrade_action'\n/opt/rh/ruby193/root/usr/share/ruby/mcollective/rpc/agent.rb:86:in `handlemsg'\n/opt/rh/ruby193/root/usr/share/ruby/mcollective/agents.rb:126:in `block (2 levels) in dispatch'\n/opt/rh/ruby193/root/usr/share/ruby/timeout.rb:69:in `timeout'\n/opt/rh/ruby193/root/usr/share/ruby/mcollective/agents.rb:125:in `block in dispatch'" ], "status": "incomplete" ... Expected results: Should skip the upgrade_gear_registry if the haproxy cartridge was already upgraded. Additional info:
https://github.com/openshift/li/pull/2008
Commit pushed to master at https://github.com/openshift/li https://github.com/openshift/li/commit/0030213145cafb26f17a4f38ce98963781a6e491 Bug 1019749: Make migrate_gear_registry reentrant
Tested on devenv_3921, on the 2nd time upgrade gears after archived. It will not check the gear_registry.db. Move bug to verified.