Bug 1476672
| Summary: | Error encountered when creating storageclass during installation | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Gaoyun Pei <gpei> |
| Component: | Installer | Assignee: | Kenny Woodson <kwoodson> |
| Status: | CLOSED ERRATA | QA Contact: | Gaoyun Pei <gpei> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.6.0 | CC: | aos-bugs, jokerman, mmccomas |
| Target Milestone: | --- | ||
| Target Release: | 3.6.z | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-10 05:32:16 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: | |
| Embargoed: | |||
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. Backport to 3.6 here: https://github.com/openshift/openshift-ansible/pull/4955 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>
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 |
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: