Version
$ openshift-install version
openshift-install unreleased-master-1438-gf79dc2f55c849a4b4f9db0eba4eb787369913d5d-dirty
built from commit f79dc2f55c849a4b4f9db0eba4eb787369913d5d
release image registry.svc.ci.openshift.org/ocp/release@sha256:2e5e4f396be1815d6f3bf49ddf1a5dce044deae98cb33f4018d85fede6bff73e
Platform:
OpenStack
What happened?
I installed OCP 4.2.0-0.ci-2019-07-26-072516 on OpenStack and default storage class seems to be misconfigured. After I deploy first app with a PVC I see the following error
Failed to provision volume with StorageClass "standard": OpenStack cloud provider was not initialized properly : stat /etc/kubernetes/cloud-config: no such file or directory
What you expected to happen?
Volume is provisioned and application can use it.
How to reproduce it (as minimally and precisely as possible)?
$ openshift-install --dir=beta --log-level debug create cluster
$ oc login ...
$ git clone https://github.com/openshift/nodejs-ex && cd nodejs-ex
$ odo create nodejs
$ odo push
Anything else we need to know?
References
from chat with @Fedosin
okay, I got what happens in your case:
by default we don't configure cloud provider, we just provide basic auth parameters so it will be able to authenticate
so, there is nothing in [Volumes] section when you start using it
when you deploy an application it fails to initialize cloud provider, and tries again with the "default" config file
https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/cinder/cinder.go#L242-L258
I think we should configure cloud provider properly before we can start using it
the whole process happens here https://github.com/openshift/installer/blob/master/pkg/asset/manifests/openstack/cloudproviderconfig.go
also I found that we forgot to enable cloud provider in one place openshift/library-go#488
it also could be a cause of the failure
Version
Platform:
OpenStack
What happened?
I installed OCP 4.2.0-0.ci-2019-07-26-072516 on OpenStack and default storage class seems to be misconfigured. After I deploy first app with a PVC I see the following error
What you expected to happen?
Volume is provisioned and application can use it.
How to reproduce it (as minimally and precisely as possible)?
Anything else we need to know?
References
from chat with @Fedosin