Describe the bug
A clear and concise description of what the bug is.
I attempted to pass in the new rook-ceph v1.5.3 release when I realized it constantly resulted in an error. Once I investigated more it is due to refactoring in rook-ceph in terms of how the custom resource definitions are applied as in prior versions all the custom resource definitions were in the common.yaml
file but in the v1.5.0 release and moving forward there is a particular YAML file, the crds.yaml
that needs to be applied so that all the necessary custom resource definitions exist prior to ceph install.
Attached below is a link to a file from their v1.5.0 tagged release
https://github.com/rook/rook/blob/6b566f192cb814814719babeed5ff8c31ea02e22/cluster/examples/kubernetes/ceph/cluster.yaml#L7
To Reproduce
Steps to reproduce the behavior, code is taken verbatim from Jenkins groovy script:
dir('ansible/csi-cephfs-fyre-play'){
sh 'cp examples/inventory .'
sh 'sed -i -e "s/fyre.root.pw/Ibm123ibm123!/g" inventory'
sh 'sed -i -e "s/fyre.inf.node.9dot.ip/"'+DEPLOY_CLUSTER_IP+'"/g" inventory'
sh 'cat inventory'
sh 'ansible-playbook -i inventory csi-cephfs.yml --extra-vars "rook_cephfs_release=v1.5.3"'
}
Expected behavior
For the installation of csi-cephfs to pass successfully and all rook-ceph pods to be in a good state.
Screenshots
Logs of the pods showed behaviour similar to the below
no matches for kind "CephCluster" in version "ceph.rook.io/v1"
Additional context
Attempting to install on a Quick Burn Openshift 4.6.6 cluster with large configuration
Logs from Jenkins job
TASK [csi-cephfs-fyre : Install csi-cephfs] ************************************ fatal: [9.30.14.148]: FAILED! => {"changed": true, "cmd": "~/setup-files/ceph-setup/csi-ceph.sh v1.5.1 vdb", "delta": "0:00:07.949826", "end": "2020-12-12 08:48:14.306149", "msg": "non-zero return code", "rc": 1, "start": "2020-12-12 08:48:06.356323", "stderr": "Cloning into 'rook'...\nNote: switching to '364989a98645d47e73eddedefcbb55c5a8a2ee82'.\n\nYou are in 'detached HEAD' state. You can look around, make experimental\nchanges and commit them, and you can discard any commits you make in this\nstate without impacting any branches by switching back to a branch.\n\nIf you want to create a new branch to retain commits you create, you may\ndo so (now or later) by using -c with the switch command. Example:\n\n git switch -c <new-branch-name>\n\nOr undo this operation with:\n\n git switch -\n\nTurn off this advice by setting config variable advice.detachedHead to false\n\nerror: unable to recognize \"rook/cluster/examples/kubernetes/ceph/cluster.yaml\": no matches for kind \"CephCluster\" in version \"ceph.rook.io/v1\"\nerror: unable to recognize \"rook/cluster/examples/kubernetes/ceph/filesystem-test.yaml\": no matches for kind \"CephFilesystem\" in version \"ceph.rook.io/v1\"\nerror: unable to recognize \"rook/cluster/examples/kubernetes/ceph/csi/rbd/storageclass-test.yaml\": no matches for kind \"CephBlockPool\" in version \"ceph.rook.io/v1\"", "stderr_lines": ["Cloning into 'rook'...", "Note: switching to '364989a98645d47e73eddedefcbb55c5a8a2ee82'.", "", "You are in 'detached HEAD' state. You can look around, make experimental", "changes and commit them, and you can discard any commits you make in this", "state without impacting any branches by switching back to a branch.", "", "If you want to create a new branch to retain commits you create, you may", "do so (now or later) by using -c with the switch command. Example:", "", " git switch -c <new-branch-name>", "", "Or undo this operation with:", "", " git switch -", "", "Turn off this advice by setting config variable advice.detachedHead to false", "", "error: unable to recognize \"rook/cluster/examples/kubernetes/ceph/cluster.yaml\": no matches for kind \"CephCluster\" in version \"ceph.rook.io/v1\"", "error: unable to recognize \"rook/cluster/examples/kubernetes/ceph/filesystem-test.yaml\": no matches for kind \"CephFilesystem\" in version \"ceph.rook.io/v1\"", "error: unable to recognize \"rook/cluster/examples/kubernetes/ceph/csi/rbd/storageclass-test.yaml\": no matches for kind \"CephBlockPool\" in version \"ceph.rook.io/v1\""], "stdout": "Login successful.\n\nYou have access to 58 projects, the list has been suppressed. You can list all projects with ' projects'\n\nUsing project \"default\".\nWelcome! See 'oc help' to get started.\nDoing clone of rook release v1.5.1\nDoing common.yaml\nnamespace/rook-ceph created\nclusterrolebinding.rbac.authorization.k8s.io/rook-ceph-object-bucket created\nserviceaccount/rook-ceph-admission-controller created\nclusterrole.rbac.authorization.k8s.io/rook-ceph-admission-controller-role created\nclusterrolebinding.rbac.authorization.k8s.io/rook-ceph-admission-controller-rolebinding created\nclusterrole.rbac.authorization.k8s.io/rook-ceph-cluster-mgmt created\nrole.rbac.authorization.k8s.io/rook-ceph-system created\nclusterrole.rbac.authorization.k8s.io/rook-ceph-global created\nclusterrole.rbac.authorization.k8s.io/rook-ceph-mgr-cluster created\nclusterrole.rbac.authorization.k8s.io/rook-ceph-object-bucket created\nserviceaccount/rook-ceph-system created\nrolebinding.rbac.authorization.k8s.io/rook-ceph-system created\nclusterrolebinding.rbac.authorization.k8s.io/rook-ceph-global created\nserviceaccount/rook-ceph-osd created\nserviceaccount/rook-ceph-mgr created\nserviceaccount/rook-ceph-cmd-reporter created\nrole.rbac.authorization.k8s.io/rook-ceph-osd created\nclusterrole.rbac.authorization.k8s.io/rook-ceph-osd created\nclusterrole.rbac.authorization.k8s.io/rook-ceph-mgr-system created\nrole.rbac.authorization.k8s.io/rook-ceph-mgr created\nrole.rbac.authorization.k8s.io/rook-ceph-cmd-reporter created\nrolebinding.rbac.authorization.k8s.io/rook-ceph-cluster-mgmt created\nrolebinding.rbac.authorization.k8s.io/rook-ceph-osd created\nrolebinding.rbac.authorization.k8s.io/rook-ceph-mgr created\nrolebinding.rbac.authorization.k8s.io/rook-ceph-mgr-system created\nclusterrolebinding.rbac.authorization.k8s.io/rook-ceph-mgr-cluster created\nclusterrolebinding.rbac.authorization.k8s.io/rook-ceph-osd created\nrolebinding.rbac.authorization.k8s.io/rook-ceph-cmd-reporter created\npodsecuritypolicy.policy/00-rook-privileged created\nclusterrole.rbac.authorization.k8s.io/psp:rook created\nclusterrolebinding.rbac.authorization.k8s.io/rook-ceph-system-psp created\nrolebinding.rbac.authorization.k8s.io/rook-ceph-default-psp created\nrolebinding.rbac.authorization.k8s.io/rook-ceph-osd-psp created\nrolebinding.rbac.authorization.k8s.io/rook-ceph-mgr-psp created\nrolebinding.rbac.authorization.k8s.io/rook-ceph-cmd-reporter-psp created\nserviceaccount/rook-csi-cephfs-plugin-sa created\nserviceaccount/rook-csi-cephfs-provisioner-sa created\nrole.rbac.authorization.k8s.io/cephfs-external-provisioner-cfg created\nrolebinding.rbac.authorization.k8s.io/cephfs-csi-provisioner-role-cfg created\nclusterrole.rbac.authorization.k8s.io/cephfs-csi-nodeplugin created\nclusterrole.rbac.authorization.k8s.io/cephfs-external-provisioner-runner created\nclusterrolebinding.rbac.authorization.k8s.io/rook-csi-cephfs-plugin-sa-psp created\nclusterrolebinding.rbac.authorization.k8s.io/rook-csi-cephfs-provisioner-sa-psp created\nclusterrolebinding.rbac.authorization.k8s.io/cephfs-csi-nodeplugin created\nclusterrolebinding.rbac.authorization.k8s.io/cephfs-csi-provisioner-role created\nserviceaccount/rook-csi-rbd-plugin-sa created\nserviceaccount/rook-csi-rbd-provisioner-sa created\nrole.rbac.authorization.k8s.io/rbd-external-provisioner-cfg created\nrolebinding.rbac.authorization.k8s.io/rbd-csi-provisioner-role-cfg created\nclusterrole.rbac.authorization.k8s.io/rbd-csi-nodeplugin created\nclusterrole.rbac.authorization.k8s.io/rbd-external-provisioner-runner created\nclusterrolebinding.rbac.authorization.k8s.io/rook-csi-rbd-plugin-sa-psp created\nclusterrolebinding.rbac.authorization.k8s.io/rook-csi-rbd-provisioner-sa-psp created\nclusterrolebinding.rbac.authorization.k8s.io/rbd-csi-nodeplugin created\nclusterrolebinding.rbac.authorization.k8s.io/rbd-csi-provisioner-role created\ncommon.yaml exit 0\nDoing operator-openshift.yaml\nsecuritycontextconstraints.security.openshift.io/rook-ceph created\nsecuritycontextconstraints.security.openshift.io/rook-ceph-csi created\nconfigmap/rook-ceph-operator-config created\ndeployment.apps/rook-ceph-operator created\noperator-openshift.yaml exit 0\nDoing sed of useAllDevices false\nExit from useAllDevice 0\nDoing sed of deviceFilter\nExit from deviceFilter 0\nDoing cluster.yaml create\nExit from cluster.yaml 1\nDoing filessystem-test.yaml\nExit from filesystem-test.yaml 1\nstorageclass.storage.k8s.io/rook-cephfs created\nstorageclass.storage.k8s.io/csi-cephfs created\ndefault_storage_class is \nNo default storage class defined\nSet default storageclass to csi-cephfs\nstorageclass.storage.k8s.io/csi-cephfs patched\nstorageclass.storage.k8s.io/rook-ceph-block created", "stdout_lines": ["Login successful.", "", "You have access to 58 projects, the list has been suppressed. You can list all projects with ' projects'", "", "Using project \"default\".", "Welcome! See 'oc help' to get started.", "Doing clone of rook release v1.5.1", "Doing common.yaml", "namespace/rook-ceph created", "clusterrolebinding.rbac.authorization.k8s.io/rook-ceph-object-bucket created", "serviceaccount/rook-ceph-admission-controller created", "clusterrole.rbac.authorization.k8s.io/rook-ceph-admission-controller-role created", "clusterrolebinding.rbac.authorization.k8s.io/rook-ceph-admission-controller-rolebinding created", "clusterrole.rbac.authorization.k8s.io/rook-ceph-cluster-mgmt created", "role.rbac.authorization.k8s.io/rook-ceph-system created", "clusterrole.rbac.authorization.k8s.io/rook-ceph-global created", "clusterrole.rbac.authorization.k8s.io/rook-ceph-mgr-cluster created", "clusterrole.rbac.authorization.k8s.io/rook-ceph-object-bucket created", "serviceaccount/rook-ceph-system created", "rolebinding.rbac.authorization.k8s.io/rook-ceph-system created", "clusterrolebinding.rbac.authorization.k8s.io/rook-ceph-global created", "serviceaccount/rook-ceph-osd created", "serviceaccount/rook-ceph-mgr created", "serviceaccount/rook-ceph-cmd-reporter created", "role.rbac.authorization.k8s.io/rook-ceph-osd created", "clusterrole.rbac.authorization.k8s.io/rook-ceph-osd created", "clusterrole.rbac.authorization.k8s.io/rook-ceph-mgr-system created", "role.rbac.authorization.k8s.io/rook-ceph-mgr created", "role.rbac.authorization.k8s.io/rook-ceph-cmd-reporter created", "rolebinding.rbac.authorization.k8s.io/rook-ceph-cluster-mgmt created", "rolebinding.rbac.authorization.k8s.io/rook-ceph-osd created", "rolebinding.rbac.authorization.k8s.io/rook-ceph-mgr created", "rolebinding.rbac.authorization.k8s.io/rook-ceph-mgr-system created", "clusterrolebinding.rbac.authorization.k8s.io/rook-ceph-mgr-cluster created", "clusterrolebinding.rbac.authorization.k8s.io/rook-ceph-osd created", "rolebinding.rbac.authorization.k8s.io/rook-ceph-cmd-reporter created", "podsecuritypolicy.policy/00-rook-privileged created", "clusterrole.rbac.authorization.k8s.io/psp:rook created", "clusterrolebinding.rbac.authorization.k8s.io/rook-ceph-system-psp created", "rolebinding.rbac.authorization.k8s.io/rook-ceph-default-psp created", "rolebinding.rbac.authorization.k8s.io/rook-ceph-osd-psp created", "rolebinding.rbac.authorization.k8s.io/rook-ceph-mgr-psp created", "rolebinding.rbac.authorization.k8s.io/rook-ceph-cmd-reporter-psp created", "serviceaccount/rook-csi-cephfs-plugin-sa created", "serviceaccount/rook-csi-cephfs-provisioner-sa created", "role.rbac.authorization.k8s.io/cephfs-external-provisioner-cfg created", "rolebinding.rbac.authorization.k8s.io/cephfs-csi-provisioner-role-cfg created", "clusterrole.rbac.authorization.k8s.io/cephfs-csi-nodeplugin created", "clusterrole.rbac.authorization.k8s.io/cephfs-external-provisioner-runner created", "clusterrolebinding.rbac.authorization.k8s.io/rook-csi-cephfs-plugin-sa-psp created", "clusterrolebinding.rbac.authorization.k8s.io/rook-csi-cephfs-provisioner-sa-psp created", "clusterrolebinding.rbac.authorization.k8s.io/cephfs-csi-nodeplugin created", "clusterrolebinding.rbac.authorization.k8s.io/cephfs-csi-provisioner-role created", "serviceaccount/rook-csi-rbd-plugin-sa created", "serviceaccount/rook-csi-rbd-provisioner-sa created", "role.rbac.authorization.k8s.io/rbd-external-provisioner-cfg created", "rolebinding.rbac.authorization.k8s.io/rbd-csi-provisioner-role-cfg created", "clusterrole.rbac.authorization.k8s.io/rbd-csi-nodeplugin created", "clusterrole.rbac.authorization.k8s.io/rbd-external-provisioner-runner created", "clusterrolebinding.rbac.authorization.k8s.io/rook-csi-rbd-plugin-sa-psp created", "clusterrolebinding.rbac.authorization.k8s.io/rook-csi-rbd-provisioner-sa-psp created", "clusterrolebinding.rbac.authorization.k8s.io/rbd-csi-nodeplugin created", "clusterrolebinding.rbac.authorization.k8s.io/rbd-csi-provisioner-role created", "common.yaml exit 0", "Doing operator-openshift.yaml", "securitycontextconstraints.security.openshift.io/rook-ceph created", "securitycontextconstraints.security.openshift.io/rook-ceph-csi created", "configmap/rook-ceph-operator-config created", "deployment.apps/rook-ceph-operator created", "operator-openshift.yaml exit 0", "Doing sed of useAllDevices false", "Exit from useAllDevice 0", "Doing sed of deviceFilter", "Exit from deviceFilter 0", "Doing cluster.yaml create", "Exit from cluster.yaml 1", "Doing filessystem-test.yaml", "Exit from filesystem-test.yaml 1", "storageclass.storage.k8s.io/rook-cephfs created", "storageclass.storage.k8s.io/csi-cephfs created", "default_storage_class is ", "No default storage class defined", "Set default storageclass to csi-cephfs", "storageclass.storage.k8s.io/csi-cephfs patched", "storageclass.storage.k8s.io/rook-ceph-block created"]}