Bug 1274130 - Can not get openshift version with installed openshift package
Can not get openshift version with installed openshift package
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Jason DeTiberus
Ma xiaoqiang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-21 23:22 EDT by Ma xiaoqiang
Modified: 2016-07-03 20:45 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-20 10:41:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ma xiaoqiang 2015-10-21 23:22:22 EDT
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 16:06:27 EDT
https://github.com/openshift/openshift-ansible/pull/727
Comment 2 Ma xiaoqiang 2015-10-22 21:06:22 EDT
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.