Bug 1771358
| Summary: | Unable to provision the cinder volume in OCP 4.2 on OSP 13 | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Sudarshan Chaudhari <suchaudh> | |
| Component: | Installer | Assignee: | Mike Fedosin <mfedosin> | |
| Installer sub component: | OpenShift on OpenStack | QA Contact: | David Sanz <dsanzmor> | |
| Status: | CLOSED ERRATA | Docs Contact: | ||
| Severity: | urgent | |||
| Priority: | urgent | CC: | andcosta, aos-bugs, chuffman, jialiu, lxia, mfedosin, mfojtik, openshift-bugs-escalate, peli, pprinett, rhowe, rsunog | |
| Version: | 4.2.z | |||
| Target Milestone: | --- | |||
| Target Release: | 4.2.z | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1772002 (view as bug list) | Environment: | ||
| Last Closed: | 2020-01-07 17:55:10 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: | ||||
| Bug Depends On: | 1772002 | |||
| Bug Blocks: | ||||
|
Description
Sudarshan Chaudhari
2019-11-12 09:07:13 UTC
Taking a guess it seems as thought our cloud credentials are not set right
openstack.go:295] Cannot initialize cloud provider using data from the secret.
Cloud config is seen here:
# oc get cm -n openshift-config cloud-provider-config -o yaml
Copied here for the api to use:
# ocs get cm -n openshift-kube-apiserver cloud-config -o yaml
By default the openstack credentials are set via a secret:
secret-name = openstack-credentials
secret-namespace = kube-system
# oc get secret -n kube-system openstack-credentials --template='{{index .data "clouds.yaml"}}' | base64 -d
# oc get secret -n kube-system openstack-credentials --template='{{index .data "clouds.conf"}}' | base64 -d
If those are not correct then you will likely need to update them with the correct credentials and auth to make api calls to OpenStack.
In the StorageClass description I see a typo in "type" section: parameters: availability: nova type: standarad I think it should be standarad -> standard Maybe that's not the reason for the bug, but you probably want to fix it. As Ryan Howe said this error happens when kube-controller-manager tries to authenticate in OpenStack using the auth data from the secret. Looks like it happens here: https://github.com/openshift/origin/blob/release-4.2/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/openstack.go#L420 Please, compare data from clouds.conf with clouds.yaml, probably there are some differences # oc get secret -n kube-system openstack-credentials --template='{{index .data "clouds.yaml"}}' | base64 -d # oc get secret -n kube-system openstack-credentials --template='{{index .data "clouds.conf"}}' | base64 -d Also my thoughts: now it's not clear what's exactly the cause of the failure, because the original bug is hidden under the message https://github.com/openshift/origin/blob/release-4.2/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/openstack.go#L296 I'm going to create a bz for this and propose a pr to wrap the original err. As I promised, I've proposed a patch that gives a clearer understanding of the initial error https://github.com/openshift/origin/pull/24136 and its 4.2 version https://github.com/openshift/origin/pull/24137 $ oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE myclaim Bound pvc-3a4d4c56-1516-11ea-996d-fa163eb648be 8Gi RWO standard 47s $ oc get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-3a4d4c56-1516-11ea-996d-fa163eb648be 8Gi RWO Delete Bound default/myclaim standard 46s $ openstack volume list | grep -i morenod-ocp | 29f2ad31-4e11-4c53-b251-c71f02c55031 | morenod-ocp-79sdx-dynamic-pvc-3a4d4c56-1516-11ea-996d-fa163eb648be | in-use | 8 | Attached to morenod-ocp-79sdx-worker-fx4cb on /dev/vdb | Verified on 4.2.0-0.nightly-2019-12-15-230238 (overcloud) [stack@undercloud-0 4.2]$ oc get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-b3556846-2279-11ea-9e5c-fa163e5e17e3 3Gi RWO Delete Bound default/task-pv-claim standard 55s (overcloud) [stack@undercloud-0 4.2]$ oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE task-pv-claim Bound pvc-b3556846-2279-11ea-9e5c-fa163e5e17e3 3Gi RWO standard 4m13s 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-2020:0014 |