Bug 1476672 - Error encountered when creating storageclass during installation
Error encountered when creating storageclass during installation
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.6.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.6.z
Assigned To: Kenny Woodson
Gaoyun Pei
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-31 03:24 EDT by Gaoyun Pei
Modified: 2017-08-10 01:32 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-10 01:32:16 EDT
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 Gaoyun Pei 2017-07-31 03:24:33 EDT
Description of problem:
Set the following options in ansible inventory file
openshift_storageclass_name=gp2
openshift_storageclass_parameters={'type': 'gp2', 'encrypted': false}
then run byo/config.yml playbook, installation failed when creating storage class as below:

TASK [openshift_default_storage_class : Ensure storageclass object] ************
fatal: [qe-gpei-36-store-3master-1.0731-zju.qe.rhcloud.com]: FAILED! => {
    "changed": false, 
    "failed": true
}

MSG:

{u'returncode': 1, u'cmd': u'/usr/bin/oc create -f /tmp/gp2-DTblxe', u'results': {}, u'stderr': u'Error from server (BadRequest): error when creating "/tmp/gp2-DTblxe": StorageClass in version "v1" cannot be handled as a StorageClass: [pos 198]: json: expect char \'"\' but got char \'f\'\n', u'stdout': u''}


Version-Release number of the following components:
openshift-ansible-3.6.172.0.1-1.git.0.5bd2286.el7.noarch
ansible-2.2.3.0-1.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. As Description

Actual results:


Expected results:

Additional info:
Comment 1 Kenny Woodson 2017-07-31 09:36:10 EDT
I was able to reproduce this on master.  The issue here is that the 'encrypted' setting needs to be a string rather than a boolean.

I have fixed the doc here:
https://github.com/openshift/openshift-ansible/pull/4954

The correct input parameters should be:
openshift_storageclass_parameters={'type': 'gp2', 'encrypted': 'false'}

Notice the 's on the 'false'.

When I changed the input parameters to be a string this issue was resolved.
Comment 2 Kenny Woodson 2017-07-31 16:20:22 EDT
Backport to 3.6 here:
https://github.com/openshift/openshift-ansible/pull/4955
Comment 4 Gaoyun Pei 2017-08-03 01:55:22 EDT
Verify this bug with openshift-ansible-3.6.173.0.2-1.git.0.f6cbecf.el7.noarch.rpm

Set the following options in ansible inventory file
openshift_storageclass_name=gp2
openshift_storageclass_parameters={"type": "gp2", "encrypted": "false"}

After installation finished, check the default storageclass
[root@qe-gpei-test-bug-master-1 ~]# oc get storageclass
NAME            TYPE
gp2 (default)   kubernetes.io/gce-pd   
[root@qe-gpei-test-bug-master-1 ~]# oc describe storageclass gp2
Name:		gp2
IsDefaultClass:	Yes
Annotations:	storageclass.beta.kubernetes.io/is-default-class=true
Provisioner:	kubernetes.io/gce-pd
Parameters:	encrypted=false,type=gp2
Events:		<none>
Comment 6 errata-xmlrpc 2017-08-10 01:32:16 EDT
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/RHEA-2017:1716

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