Bug 1048685

Summary: [fork] oo-admin-repair with options '--removed-nodes' will be broken.
Product: OpenShift Online Reporter: zhaozhanqi <zzhao>
Component: PodAssignee: Ravi Sankar <rpenta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 2.xCC: xtian
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-26 19:09:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description zhaozhanqi 2014-01-06 06:37:17 UTC
Description of problem:
Run oo-admin-reapir --removed-nodes will be broken with error 'should be a string
["/opt/rh/ruby193/root/usr/share/ruby/mcollective/rpc/helpers.rb:31:in `block in extract_hosts_from_array'"

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

How reproducible:
always

Steps to Reproduce:
1. Launch one instance and make broker and node in this instance.create one district and add one node into it
2. Create one any type app
3. Stop ruby193-mcollective service
  /etc/init.d/ruby193-mcollective stop
4. Delete the no response node 
oo-admin-repair --removed-nodes

Actual results:
oo-admin-repair --removed-nodes
Started at: 2014-01-06 05:40:10 UTC
Total gears found in mongo: 1
 should be a string
["/opt/rh/ruby193/root/usr/share/ruby/mcollective/rpc/helpers.rb:31:in `block in extract_hosts_from_array'", "/opt/rh/ruby193/root/usr/share/ruby/mcollective/rpc/helpers.rb:30:in `map'", "/opt/rh/ruby193/root/usr/share/ruby/mcollective/rpc/helpers.rb:30:in `extract_hosts_from_array'", "/opt/rh/ruby193/root/usr/share/ruby/mcollective/rpc/client.rb:472:in `discover'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-msg-broker-mcollective-1.19.3/lib/openshift/mcollective_application_container_proxy.rb:2328:in `rpc_exec'", "/usr/sbin/oo-admin-repair:336:in `find_unresponsive_servers'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.19.5/app/helpers/admin_helper.rb:42:in `run'", "/usr/sbin/oo-admin-repair:742:in `<main>'"]

undefined method `empty?' for nil:NilClass
["/usr/sbin/oo-admin-repair:521:in `repair_removed_nodes'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.19.5/app/helpers/admin_helper.rb:42:in `run'", "/usr/sbin/oo-admin-repair:756:in `<main>'"]

Finished at: 2014-01-06 05:40:11 UTC
Total time: 0.57s
FAILED


Expected results:

no this error and could delete the node or gear in this node.

Additional info:

Comment 1 Ravi Sankar 2014-01-07 05:11:23 UTC
Fixed in fork_ami_broker_admin_repair_refactor_975

Comment 2 zhaozhanqi 2014-01-07 07:42:52 UTC
Tested this issue on fork_ami_broker_admin_repair_refactor_975, it has been fixed. 

oo-admin-repair --removed-nodes
Started at: 2014-01-07 07:37:47 UTC
Total gears found in mongo: 1
Servers that are unresponsive:
	Server: ip-10-141-185-239 (district: d1), Confirm [yes/no]: yes

Some servers are unresponsive: ip-10-141-185-239
Do you want to delete unresponsive servers from their respective districts [yes/no]: no

Found 1 unresponsive unscalable apps:
zqpy27 (id: 52cba3f4a42063759800005a)

These apps can not be recovered. Do you want to delete all of them [yes/no]: yes


Finished at: 2014-01-07 07:39:13 UTC
Total time: 85.849s
SUCCESS