{"action":"created","issue":{"url":"https://api.github.com/repos/digitalocean/csi-digitalocean/issues/93","repository_url":"https://api.github.com/repos/digitalocean/csi-digitalocean","labels_url":"https://api.github.com/repos/digitalocean/csi-digitalocean/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/digitalocean/csi-digitalocean/issues/93/comments","events_url":"https://api.github.com/repos/digitalocean/csi-digitalocean/issues/93/events","html_url":"https://github.com/digitalocean/csi-digitalocean/issues/93","id":373568828,"node_id":"MDU6SXNzdWUzNzM1Njg4Mjg=","number":93,"title":"Able to create volume, but unable to mount it to pod","user":{"login":"badri","id":41959,"node_id":"MDQ6VXNlcjQxOTU5","avatar_url":"https://avatars1.githubusercontent.com/u/41959?v=4","gravatar_id":"","url":"https://api.github.com/users/badri","html_url":"https://github.com/badri","followers_url":"https://api.github.com/users/badri/followers","following_url":"https://api.github.com/users/badri/following{/other_user}","gists_url":"https://api.github.com/users/badri/gists{/gist_id}","starred_url":"https://api.github.com/users/badri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/badri/subscriptions","organizations_url":"https://api.github.com/users/badri/orgs","repos_url":"https://api.github.com/users/badri/repos","events_url":"https://api.github.com/users/badri/events{/privacy}","received_events_url":"https://api.github.com/users/badri/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-24T16:27:14Z","updated_at":"2018-11-05T13:44:35Z","closed_at":"2018-11-05T13:44:35Z","author_association":"NONE","body":"### What did you do? (required. The issue will be **closed** when not provided.)\r\n\r\nI tried to create a new DO storage class using this plugin for my OpenShift 3.10 cluster.\r\n\r\n### What did you expect to happen?\r\n\r\nA new volume gets created and mounted to the pod.\r\n\r\n### Configuration (**MUST** fill this out):\r\n\r\n\r\n```\r\nkind: StorageClass\r\napiVersion: storage.k8s.io/v1\r\nmetadata:\r\n  name: do-block-storage\r\n  annotations:\r\n    storageclass.kubernetes.io/is-default-class: \"true\"\r\nprovisioner: com.digitalocean.csi.dobs\r\n\r\n\r\n---\r\n\r\nkind: ClusterRole\r\napiVersion: rbac.authorization.k8s.io/v1\r\nmetadata:\r\n  name: digitalocean-csi-role\r\nrules:\r\n  - apiGroups: [\"\"]\r\n    resources: [\"persistentvolumes\"]\r\n    verbs: [\"create\", \"delete\", \"get\", \"list\", \"watch\", \"update\", \"patch\"]\r\n  - apiGroups: [\"\"]\r\n    resources: [\"events\"]\r\n    verbs: [\"create\", \"get\", \"list\", \"watch\", \"update\", \"patch\"]\r\n  - apiGroups: [\"\"]\r\n    resources: [\"persistentvolumeclaims\"]\r\n    verbs: [\"get\", \"list\", \"watch\", \"update\", \"patch\"]\r\n  - apiGroups: [\"\"]\r\n    resources: [\"nodes\"]\r\n    verbs: [\"get\", \"list\", \"watch\", \"update\", \"patch\"]\r\n  - apiGroups: [\"storage.k8s.io\"]\r\n    resources: [\"storageclasses\"]\r\n    verbs: [\"get\", \"list\", \"watch\"]\r\n  - apiGroups: [\"storage.k8s.io\"]\r\n    resources: [\"volumeattachments\"]\r\n    verbs: [\"get\", \"list\", \"watch\", \"update\", \"patch\"]\r\n  - apiGroups: [\"\"]\r\n    resources: [\"configmaps\"]\r\n    verbs: [\"get\", \"list\", \"watch\", \"create\", \"update\", \"patch\"]\r\n\r\n---\r\n\r\nkind: ClusterRoleBinding\r\napiVersion: rbac.authorization.k8s.io/v1\r\nmetadata:\r\n  name: digitalocean-csi-role\r\nsubjects:\r\n  - kind: ServiceAccount\r\n    name: digitalocean-csi\r\n    namespace: kube-system\r\nroleRef:\r\n  kind: ClusterRole\r\n  name: digitalocean-csi-role\r\n  apiGroup: rbac.authorization.k8s.io\r\n\r\n---\r\n\r\nkind: Secret\r\napiVersion: v1\r\ntype: Opaque\r\nstringData:\r\n  access-token: \"xyz\"\r\nmetadata:\r\n  name: digitalocean\r\n\r\n---\r\n\r\nkind: Deployment\r\napiVersion: apps/v1\r\nmetadata:\r\n  name: digitalocean-csi-controller\r\nspec:\r\n  replicas: 2\r\n  selector:\r\n    matchLabels:\r\n      app: digitalocean-csi-controllers\r\n  template:\r\n    metadata:\r\n      labels:\r\n        app: digitalocean-csi-controllers\r\n    spec:\r\n      serviceAccount: digitalocean-csi\r\n      containers:\r\n        - name: csi-attacher\r\n          image: lakshminp/csi-attacher:v3.10\r\n          args:\r\n            - \"--v=5\"\r\n            - \"--csi-address=$(ADDRESS)\"\r\n            - \"--leader-election\"\r\n            - \"--leader-election-namespace=$(MY_NAMESPACE)\"\r\n            - \"--leader-election-identity=$(MY_NAME)\"\r\n          env:\r\n            - name: MY_NAME\r\n              valueFrom:\r\n                fieldRef:\r\n                  fieldPath: metadata.name\r\n            - name: MY_NAMESPACE\r\n              valueFrom:\r\n                fieldRef:\r\n                  fieldPath: metadata.namespace\r\n            - name: ADDRESS\r\n              value: /csi/csi.sock\r\n          volumeMounts:\r\n            - name: socket-dir\r\n              mountPath: /csi\r\n        - name: csi-provisioner\r\n          image: lakshminp/csi-provisioner:v3.10\r\n          args:\r\n            - \"--v=5\"\r\n            - \"--provisioner=com.digitalocean.csi.dobs\"\r\n            - \"--csi-address=$(ADDRESS)\"\r\n          env:\r\n            - name: ADDRESS\r\n              value: /csi/csi.sock\r\n          volumeMounts:\r\n            - name: socket-dir\r\n              mountPath: /csi\r\n        - name: digitalocean-driver\r\n          image: digitalocean/do-csi-plugin:v0.2.0\r\n          args :\r\n            - \"--endpoint=unix://$(ADDRESS)\"\r\n            - \"--token=$(DIGITALOCEAN_ACCESS_TOKEN)\"\r\n            - \"--url=$(DIGITALOCEAN_API_URL)\"\r\n          env:\r\n            - name: NODEID\r\n              valueFrom:\r\n                fieldRef:\r\n                  fieldPath: spec.nodeName            \r\n            - name: ADDRESS\r\n              value: /csi/csi.sock\r\n            - name: DIGITALOCEAN_API_URL\r\n              value: https://api.digitalocean.com/\r\n            - name: DIGITALOCEAN_ACCESS_TOKEN\r\n              valueFrom:\r\n                secretKeyRef:\r\n                  name: digitalocean\r\n                  key: access-token\r\n          volumeMounts:\r\n            - name: socket-dir\r\n              mountPath: /csi\r\n      volumes:\r\n        - name: socket-dir\r\n          emptyDir:\r\n\r\n---\r\n\r\nkind: DaemonSet\r\napiVersion: apps/v1\r\nmetadata:\r\n  name: digitalocean-csi-ds\r\nspec:\r\n  selector:\r\n    matchLabels:\r\n      app: digitalocean-csi-driver\r\n  template:\r\n    metadata:\r\n      labels:\r\n        app: digitalocean-csi-driver\r\n    spec:\r\n      nodeSelector:\r\n          role: node\r\n      serviceAccount: digitalocean-csi\r\n      containers:\r\n        - name: csi-driver-registrar\r\n          image: registry.access.redhat.com/openshift3/csi-driver-registrar:v3.10\r\n          securityContext:\r\n            privileged: true\r\n          args:\r\n            - \"--v=5\"\r\n            - \"--csi-address=$(ADDRESS)\"\r\n          env:\r\n            - name: ADDRESS\r\n              value: /csi/csi.sock\r\n            - name: KUBE_NODE_NAME\r\n              valueFrom:\r\n                fieldRef:\r\n                  fieldPath: spec.nodeName\r\n          volumeMounts:\r\n            - name: socket-dir\r\n              mountPath: /csi\r\n        - name: digitalocean-driver\r\n          securityContext:\r\n            privileged: true\r\n            capabilities:\r\n              add: [\"SYS_ADMIN\"]\r\n            allowPrivilegeEscalation: true\r\n          image: digitalocean/do-csi-plugin:v0.2.0\r\n          args :\r\n            - \"--endpoint=unix://$(ADDRESS)\"\r\n            - \"--token=$(DIGITALOCEAN_ACCESS_TOKEN)\"\r\n            - \"--url=$(DIGITALOCEAN_API_URL)\"\r\n          env:\r\n            - name: NODEID\r\n              valueFrom:\r\n                fieldRef:\r\n                  fieldPath: spec.nodeName\r\n            - name: ADDRESS\r\n              value: /csi/csi.sock\r\n            - name: DIGITALOCEAN_API_URL\r\n              value: https://api.digitalocean.com/\r\n            - name: DIGITALOCEAN_ACCESS_TOKEN\r\n              valueFrom:\r\n                secretKeyRef:\r\n                  name: digitalocean\r\n                  key: access-token\r\n          volumeMounts:\r\n            - name: socket-dir\r\n              mountPath: /csi\r\n            - name: mountpoint-dir\r\n              mountPath: /var/lib/origin/openshift.local.volumes/pods/\r\n              mountPropagation: \"Bidirectional\"\r\n            - name: cloud-metadata\r\n              mountPath: /var/lib/cloud/data/\r\n            - name: dev\r\n              mountPath: /dev\r\n      volumes:\r\n        - name: cloud-metadata\r\n          hostPath:\r\n            path: /var/lib/cloud/data/\r\n        - name: socket-dir\r\n          hostPath:\r\n            path: /var/lib/kubelet/plugins/com.digitalocean.csi.dobs\r\n            type: DirectoryOrCreate\r\n        - name: mountpoint-dir\r\n          hostPath:\r\n            path: /var/lib/origin/openshift.local.volumes/pods/\r\n            type: Directory\r\n        - name: dev\r\n          hostPath:\r\n            path: /dev\r\n\r\n```\r\n\r\n* system logs:\r\n\r\nfrom pod:\r\n\r\n```\r\nI1024 16:04:13.418610       1 csi_handler.go:330] Saved attach error to \"csi-c8af0f7c0ba46bafd1a40b16396a1f03edaeeb51acdc7da1666c2a0db8d6e2b6\"\r\nI1024 16:04:13.418658       1 csi_handler.go:86] Error processing \"csi-c8af0f7c0ba46bafd1a40b16396a1f03edaeeb51acdc7da1666c2a0db8d6e2b6\": failed to attach: node \"openshift-master\" has no NodeID annotation\r\n```\r\n\r\nfrom web console:\r\n\r\n```\r\n\r\n \r\n--\r\n12:09:43 PM | postgresql-2-1-9ll8k | Pod | Warning | Failed Mount | Unable to mount volumes for pod \"postgresql-2-1-9ll8k_validate(fac2a09e-d7a5-11e8-8c1a-1a5063441dd8)\": timeout expired waiting for volumes to attach or mount for pod \"validate\"/\"postgresql-2-1-9ll8k\". list of unmounted volumes=[postgresql-2-data]. list of unattached volumes=[postgresql-2-data default-token-fbws6]4 times in the last 21 minutes\r\n12:09:09 PM | postgresql-2-1-9ll8k | Pod | Warning | Failed Attach Volume | AttachVolume.Attach failed for volume \"kubernetes-dynamic-pv-f8864c5ed7a511e8\" : node \"openshift-master\" has no NodeID annotation\r\n\r\n```\r\n\r\n\r\nPlease provide the following logs:\r\n\r\n```\r\n\r\nkubectl cluster-info dump > kubernetes-dump.log\r\n```\r\n\r\nThis will output everthing from your cluster.  Please use a private gist via\r\nhttps://gist.github.com/ to share this dump with us\r\n\r\n* manifests, such as pvc, deployments, etc.. you used to reproduce:\r\n\r\nPlease provide the **total** set of manifests that are needed to reproduce the\r\nissue. Just providing the `pvc` is not helpful. If you cannot provide it due\r\nprivacy concerns, please try creating a reproducible case.\r\n\r\n\r\n* CSI Version:\r\n\r\nv0.2.0\r\n\r\n* Kubernetes Version:\r\n\r\n```\r\nkubectl version\r\nClient Version: version.Info{Major:\"1\", Minor:\"10+\", GitVersion:\"v1.10.0+b81c8f8\", GitCommit:\"b81c8f8\", GitTreeState:\"clean\", BuildDate:\"2018-08-03T07:21:49Z\", GoVersion:\"go1.9.2\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"10+\", GitVersion:\"v1.10.0+b81c8f8\", GitCommit:\"b81c8f8\", GitTreeState:\"clean\", BuildDate:\"2018-10-12T17:04:15Z\", GoVersion:\"go1.10.3\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n```\r\n\r\n* Cloud provider/framework version, if applicable (such as Rancher):\r\n\r\nDigitalOcean with OpenShift 3.10.\r\n\r\nI followed the same instructions as in [OpenShift CSI configuration document](https://docs.openshift.com/container-platform/3.10/install_config/persistent_storage/persistent_storage_csi.html).\r\n"},"comment":{"url":"https://api.github.com/repos/digitalocean/csi-digitalocean/issues/comments/435878096","html_url":"https://github.com/digitalocean/csi-digitalocean/issues/93#issuecomment-435878096","issue_url":"https://api.github.com/repos/digitalocean/csi-digitalocean/issues/93","id":435878096,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTg3ODA5Ng==","user":{"login":"fatih","id":438920,"node_id":"MDQ6VXNlcjQzODkyMA==","avatar_url":"https://avatars1.githubusercontent.com/u/438920?v=4","gravatar_id":"","url":"https://api.github.com/users/fatih","html_url":"https://github.com/fatih","followers_url":"https://api.github.com/users/fatih/followers","following_url":"https://api.github.com/users/fatih/following{/other_user}","gists_url":"https://api.github.com/users/fatih/gists{/gist_id}","starred_url":"https://api.github.com/users/fatih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatih/subscriptions","organizations_url":"https://api.github.com/users/fatih/orgs","repos_url":"https://api.github.com/users/fatih/repos","events_url":"https://api.github.com/users/fatih/events{/privacy}","received_events_url":"https://api.github.com/users/fatih/received_events","type":"User","site_admin":false},"created_at":"2018-11-05T13:44:35Z","updated_at":"2018-11-05T13:44:35Z","author_association":"MEMBER","body":"This seems to be an issue with your k8s version. It's very old and not supported by this driver (the error `failed to attach: node \"openshift-master\" has no NodeID annotation` is because the node couldn't be registered to be used by CSI) . \r\n\r\nPlease upgrade it to v1.12.1 at least minimum. Happy to debug if it's still happening for you."}}
{"actor":{"display_login":"fatih"}}