Bug 1274130 - Can not get openshift version with installed openshift package
Summary: Can not get openshift version with installed openshift package
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact: Ma xiaoqiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-22 03:22 UTC by Ma xiaoqiang
Modified: 2016-07-04 00:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-20 15:41:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ma xiaoqiang 2015-10-22 03:22:22 UTC
Description of problem:
Can not get openshift version with installed openshift package


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

How reproducible:
100%


Steps to Reproduce:
1. Install env via ansible after install atomic-openshfit package


Actual results:
TASK: [openshift_master_ca | Reload generated facts] ************************** 
failed: [10.66.79.140] => {"failed": true, "parsed": false}
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-tmp-1445475674.69-106728913290451/openshift_facts", line 5818, in <module>
    main()
  File "/root/.ansible/tmp/ansible-tmp-1445475674.69-106728913290451/openshift_facts", line 1001, in main
    openshift_facts = OpenShiftFacts(role, fact_file, local_facts)
  File "/root/.ansible/tmp/ansible-tmp-1445475674.69-106728913290451/openshift_facts", line 789, in __init__
    self.facts = self.generate_facts(local_facts)
  File "/root/.ansible/tmp/ansible-tmp-1445475674.69-106728913290451/openshift_facts", line 816, in generate_facts
    facts = set_deployment_facts_if_unset(facts)
  File "/root/.ansible/tmp/ansible-tmp-1445475674.69-106728913290451/openshift_facts", line 504, in set_deployment_facts_if_unset
    facts['common']['version'] = get_openshift_version()
  File "/root/.ansible/tmp/ansible-tmp-1445475674.69-106728913290451/openshift_facts", line 639, in get_openshift_version
    versions = dict(e.split(' v') for e in output.splitlines())
ValueError: dictionary update sequence element #2 has length 1; 2 is required

Expected results:
get the openshift version successfully

Additional info:
$ openshift version
openshift v3.0.2.902
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
etcd 2.1.2
>>>[e.split(' v') for e in test.splitlines()]
[['openshift', '3.0.2.902'], ['kubernetes', '1.2.0-alpha.1-1107-g4c8e6f4'], ['etcd 2.1.2']]
The last array only have one item, can not convert it to dict

Comment 1 Jason DeTiberus 2015-10-22 20:06:27 UTC
https://github.com/openshift/openshift-ansible/pull/727

Comment 2 Ma xiaoqiang 2015-10-23 01:06:22 UTC
Install env successfully with installed atomic-openshift package, move this issue to VERIFIED.


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