Bug 1021369

Summary: undefined local variable or method `deployment' error is seen when running oo-install with "-w enterprise_add_node" option
Product: OpenShift Container Platform Reporter: Johnny Liu <jialiu>
Component: NodeAssignee: N. Harrison Ripps <hripps>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0.0CC: hripps, libra-onpremise-devel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-16 09:11:15 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 Johnny Liu 2013-10-21 07:47:22 UTC
Description of problem:
When trying to add a new node in unattended way, error is seen:
$ sh <(curl -s http://oo-install.rhcloud.com/) "-w enterprise_add_node"
Checking for necessary tools...
...looks good.
Reusing existing installer assets.
Extracting oo-install to temporary directory...
Starting oo-install...
Please wait while your deployment configuration is validated.
The deployment looks good. Checking workflow responses.
/tmp/oo-install-20131019-1312/lib/installer/question.rb:79:in `valid?': undefined local variable or method `deployment' for #<Installer::Question:0x0000000126ba78> (NameError)
	from /tmp/oo-install-20131019-1312/lib/installer/assistant.rb:88:in `block in workflow_cfg_complete?'
	from /tmp/oo-install-20131019-1312/lib/installer/assistant.rb:87:in `each'
	from /tmp/oo-install-20131019-1312/lib/installer/assistant.rb:87:in `workflow_cfg_complete?'
	from /tmp/oo-install-20131019-1312/lib/installer/assistant.rb:54:in `run'
	from /tmp/oo-install-20131019-1312/bin/oo-install:140:in `block in <main>'
	from /tmp/oo-install-20131019-1312/bin/oo-install:138:in `loop'
	from /tmp/oo-install-20131019-1312/bin/oo-install:138:in `<main>'
oo-install exited; keeping temporary assets in /tmp/


Version-Release number of selected component (if applicable):
oo-install-20131019-1312

How reproducible:
Always

Steps to Reproduce:
1. Prepare ~/.openshift/oo-install-cfg.yml for unattended installation.
2. Run the following command to add a new node in unattended way.
$ ./oo-install-bootstrap.sh "-w enterprise_add_node"
3.

Actual results:
undefined local variable or method `deployment' error is seen.

Expected results:
No error is seen, new node is installed successfully.

Additional info:
The following command is working fine.
sh <(curl -s http://oo-install.rhcloud.com/) "-w enterprise_deploy"

Comment 2 N. Harrison Ripps 2013-10-21 12:55:41 UTC
Assigned

Comment 3 N. Harrison Ripps 2013-10-21 14:26:57 UTC
Addressed in pull request #90: https://github.com/openshift/openshift-extras/pull/90

Comment 4 Johnny Liu 2013-10-22 06:56:12 UTC
Verified this bug with oo-install-20131021-2047, and PASS.

$ sh <(curl -s http://oo-install.rhcloud.com/) "-e -w enterprise_add_node -c ~/oo-install-cfg.yml-rhn-add_node"
Checking for necessary tools...
...looks good.
Reusing existing installer assets.
Extracting oo-install to temporary directory...
Starting oo-install...
Please wait while your deployment configuration is validated.
The deployment looks good. Checking workflow responses.

Checking broker.my-ose.com.cn:
* SSH connection succeeded
* Located yum

Checking node1.my-ose.com.cn:
* SSH connection succeeded
* Located yum

Checking node.my-ose.com.cn:
* SSH connection succeeded
* Located yum

Everything looks good. Launching workflow.
Preparing to add this node to an OpenShift Enterprise system:
  * 10.4.59.174: node
Copying deployment script to target 10.4.59.174.
openshift.sh                                                                                                                                           100%   85KB  84.9KB/s   00:00    
Running deployment
The following components should be installed:
	node.
Configuring with broker with hostname broker.my-ose.com.cn.
Configuring node with hostname node.my-ose.com.cn.
Configuring with named with IP address 192.168.59.177.
Configuring with activemq with hostname msgserver.my-ose.com.cn.
<--snip-->