Bug 1027058 - oo-admin-upgrade with 0 gears breaks
Summary: oo-admin-upgrade with 0 gears breaks
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Dan Mace
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-06 03:05 UTC by Dan McPherson
Modified: 2015-05-15 00:22 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:28:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dan McPherson 2013-11-06 03:05:56 UTC
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:
100%

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 16:23:53 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/290cae15c5024918236c4a3674808e7dfd57a4a2
Bug 1027058: Gracefully handle upgrading zero gears on a node

Comment 3 Jianwei Hou 2013-11-07 02:05:05 UTC
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.