Bug 1295677

Summary: Couldn't run oadm/oc commands with space character in options on a containerized environment
Product: OpenShift Container Platform Reporter: Gaoyun Pei <gpei>
Component: InstallerAssignee: Scott Dodson <sdodson>
Status: CLOSED ERRATA QA Contact: Ma xiaoqiang <xiama>
Severity: high Docs Contact:
Priority: high    
Version: 3.1.0CC: aos-bugs, bleanhar, jokerman, mmccomas, xtian
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: 2016-01-27 19:43:55 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 Gaoyun Pei 2016-01-05 08:32:00 UTC
Description of problem:
After setting up a containerized environment, run oadm/oc command on the master host, if there's spaces in the option, the command couldn't get executed properly. 

Version-Release number of selected component (if applicable):
https://github.com/openshift/openshift-ansible -b master

How reproducible:
Always

Steps to Reproduce:
1.Setting up a containerized environment using latest openshift-ansible
 
2.Create a new project on the master host
[root@openshift-145 ~]# oadm new-project test --display-name="Web Team Development" --description="Development project for the web team."

error: you must specify one argument: project name
See 'oadm new-project -h' for help and examples.


Actual results:
Create project failed.

Expected results:
Should run successfully

Additional info:
This issue is also blocking the normal containerized installation, ansible would create "management-infra" project with "--description=Management Infrastructure"  during the master setup, but failed on this step.

Comment 1 Scott Dodson 2016-01-06 15:17:00 UTC
Proposed fix in this PR

https://github.com/openshift/openshift-ansible/pull/1115

You may try it by :

git checkout -b bz1295677
git pull https://github.com/sdodson/openshift-ansible bz1295677

Comment 2 Gaoyun Pei 2016-01-07 04:10:47 UTC
Install a containerized env with https://github.com/sdodson/openshift-ansible -b bz1295677

[root@openshift-v3 ~]# oadm new-project test --display-name="test prject"
Created project test
[root@openshift-v3 ~]# oc get project
NAME               DISPLAY NAME           STATUS
default                                   Active
management-infra                          Active
openshift                                 Active
openshift-infra                           Active
test               test prject            Active

The issue is fixed, thanks!

Comment 4 errata-xmlrpc 2016-01-27 19:43:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:0075