Bug 1027058 - oo-admin-upgrade with 0 gears breaks
oo-admin-upgrade with 0 gears breaks
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Dan Mace
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-11-05 22:05 EST by Dan McPherson
Modified: 2015-05-14 20:22 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-01-23 22:28:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dan McPherson 2013-11-05 22:05:56 EST
Description of problem:

oo-admin-upgrade upgrade-node with 0 gears fails with:

Couldn't find node queue at /tmp/oo-upgrade/node_queue
/usr/sbin/oo-admin-upgrade:254:in `upgrade'
/usr/sbin/oo-admin-upgrade:1026:in `block in upgrade_node'
/usr/sbin/oo-admin-upgrade:953:in `with_upgrader'
/usr/sbin/oo-admin-upgrade:1015:in `upgrade_node'
/opt/rh/ruby193/root/usr/share/gems/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
/opt/rh/ruby193/root/usr/share/gems/gems/thor-0.15.4/lib/thor.rb:275:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
/usr/sbin/oo-admin-upgrade:1031:in `<main>'
/usr/sbin/oo-admin-upgrade:254:in `upgrade': Couldn't find node queue at /tmp/oo-upgrade/node_queue (RuntimeError)
	from /usr/sbin/oo-admin-upgrade:1026:in `block in upgrade_node'
	from /usr/sbin/oo-admin-upgrade:953:in `with_upgrader'
	from /usr/sbin/oo-admin-upgrade:1015:in `upgrade_node'
	from /opt/rh/ruby193/root/usr/share/gems/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
	from /opt/rh/ruby193/root/usr/share/gems/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
	from /opt/rh/ruby193/root/usr/share/gems/gems/thor-0.15.4/lib/thor.rb:275:in `dispatch'
	from /opt/rh/ruby193/root/usr/share/gems/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
	from /usr/sbin/oo-admin-upgrade:1031:in `<main>'

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. run oo-admin-upgrade with 0 gears

Actual results:
Fails with above error

Expected results:
No error
Comment 2 openshift-github-bot 2013-11-06 11:23:53 EST
Commit pushed to master at https://github.com/openshift/origin-server

Bug 1027058: Gracefully handle upgrading zero gears on a node
Comment 3 Jianwei Hou 2013-11-06 21:05:05 EST
Verified on devenv_3998

/tmp/oo-upgrade/node_queue will be created even if there is 0 gears, and hence bypassed the error.

[root@ip-10-154-156-111 ~]# oo-admin-upgrade upgrade-node --version 2.0.36 
Upgrader started with options: {:version=>"2.0.36", :ignore_cartridge_version=>false, :target_server_identity=>nil, :upgrade_position=>1, :num_upgraders=>1, :max_threads=>12, :gear_whitelist=>[]}
Building new upgrade queues and cluster metadata
Getting all active gears...
Getting all logins...
Writing node queue to /tmp/oo-upgrade/node_queue
Writing cluster metadata to /tmp/oo-upgrade/cluster_metadata
Loading cluster metadata from /tmp/oo-upgrade/cluster_metadata
Loading node queue from /tmp/oo-upgrade/node_queue
Node queue is empty; there's nothing for the upgrader to do. Exiting.

Note You need to log in before you can comment on or make changes to this bug.