Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trident attempts to start CSI pods on windows nodes after upgrade to 19.07 #264

Closed
cprivitere opened this issue Aug 2, 2019 · 3 comments

Comments

@cprivitere
Copy link

cprivitere commented Aug 2, 2019

After upgrading from 19.04.1 to 19.07 on a Rancher RKE deployed cluster that has both linux and windows nodes, trident is trying to start a csi pod on the windows node. Obviously this won't work so the pod sits forever at "ContainerCreating."

Should just need to edit the deployment yaml to only try to start on linux nodes to avoid this for future customers.

Here's the get po output for the stuck pod. tst-k8s-wm-01 is our windows node.

kubectl get po -n trident
NAME                           READY   STATUS              RESTARTS   AGE
trident-csi-867d54588b-6xsqv   4/4     Running             0          13m
trident-csi-rhlp9              2/2     Running             0          13m
trident-csi-xqlz5              0/2     ContainerCreating   0          13m
{
    "apiVersion": "v1",
    "kind": "Pod",
    "metadata": {
        "creationTimestamp": "2019-08-02T13:32:40Z",
        "generateName": "trident-csi-",
        "labels": {
            "app": "node.csi.trident.netapp.io",
            "controller-revision-hash": "6d47dd5cb9",
            "pod-template-generation": "1"
        },
        "name": "trident-csi-xqlz5",
        "namespace": "trident",
        "ownerReferences": [
            {
                "apiVersion": "apps/v1",
                "blockOwnerDeletion": true,
                "controller": true,
                "kind": "DaemonSet",
                "name": "trident-csi",
                "uid": "fff847f7-b529-11e9-a7ab-0050568b16e6"
            }
        ],
        "resourceVersion": "2867644",
        "selfLink": "/api/v1/namespaces/trident/pods/trident-csi-xqlz5",
        "uid": "fffc402d-b529-11e9-b1d7-0050568b6601"
    },
    "spec": {
        "affinity": {
            "nodeAffinity": {
                "requiredDuringSchedulingIgnoredDuringExecution": {
                    "nodeSelectorTerms": [
                        {
                            "matchFields": [
                                {
                                    "key": "metadata.name",
                                    "operator": "In",
                                    "values": [
                                        "tst-k8s-wm-01"
                                    ]
                                }
                            ]
                        }
                    ]
                }
            }
        },
        "containers": [
            {
                "args": [
                    "--no_persistence",
                    "--rest=false",
                    "--csi_node_name=$(KUBE_NODE_NAME)",
                    "--csi_endpoint=$(CSI_ENDPOINT)",
                    "--csi_role=node"
                ],
                "command": [
                    "/usr/local/bin/trident_orchestrator"
                ],
                "env": [
                    {
                        "name": "KUBE_NODE_NAME",
                        "valueFrom": {
                            "fieldRef": {
                                "apiVersion": "v1",
                                "fieldPath": "spec.nodeName"
                            }
                        }
                    },
                    {
                        "name": "CSI_ENDPOINT",
                        "value": "unix://plugin/csi.sock"
                    },
                    {
                        "name": "PATH",
                        "value": "/netapp:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
                    }
                ],
                "image": "netapp/trident:19.07.0",
                "imagePullPolicy": "IfNotPresent",
                "name": "trident-main",
                "resources": {},
                "securityContext": {
                    "allowPrivilegeEscalation": true,
                    "capabilities": {
                        "add": [
                            "SYS_ADMIN"
                        ]
                    },
                    "privileged": true,
                    "procMount": "Default"
                },
                "terminationMessagePath": "/dev/termination-log",
                "terminationMessagePolicy": "File",
                "volumeMounts": [
                    {
                        "mountPath": "/plugin",
                        "name": "plugin-dir"
                    },
                    {
                        "mountPath": "/var/lib/kubelet/plugins",
                        "name": "plugins-mount-dir"
                    },
                    {
                        "mountPath": "/var/lib/kubelet/pods",
                        "mountPropagation": "Bidirectional",
                        "name": "pods-mount-dir"
                    },
                    {
                        "mountPath": "/dev",
                        "name": "dev-dir"
                    },
                    {
                        "mountPath": "/sys",
                        "name": "sys-dir"
                    },
                    {
                        "mountPath": "/host",
                        "mountPropagation": "Bidirectional",
                        "name": "host-dir"
                    },
                    {
                        "mountPath": "/certs",
                        "name": "certs",
                        "readOnly": true
                    },
                    {
                        "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
                        "name": "trident-csi-token-9ppl5",
                        "readOnly": true
                    }
                ]
            },
            {
                "args": [
                    "--v=9",
                    "--csi-address=$(ADDRESS)",
                    "--kubelet-registration-path=$(REGISTRATION_PATH)"
                ],
                "env": [
                    {
                        "name": "ADDRESS",
                        "value": "/plugin/csi.sock"
                    },
                    {
                        "name": "REGISTRATION_PATH",
                        "value": "/var/lib/kubelet/plugins/csi.trident.netapp.io/csi.sock"
                    },
                    {
                        "name": "KUBE_NODE_NAME",
                        "valueFrom": {
                            "fieldRef": {
                                "apiVersion": "v1",
                                "fieldPath": "spec.nodeName"
                            }
                        }
                    }
                ],
                "image": "quay.io/k8scsi/csi-node-driver-registrar:v1.1.0",
                "imagePullPolicy": "IfNotPresent",
                "name": "driver-registrar",
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "terminationMessagePolicy": "File",
                "volumeMounts": [
                    {
                        "mountPath": "/plugin",
                        "name": "plugin-dir"
                    },
                    {
                        "mountPath": "/registration",
                        "name": "registration-dir"
                    },
                    {
                        "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
                        "name": "trident-csi-token-9ppl5",
                        "readOnly": true
                    }
                ]
            }
        ],
        "dnsPolicy": "ClusterFirstWithHostNet",
        "enableServiceLinks": true,
        "hostIPC": true,
        "hostNetwork": true,
        "nodeName": "tst-k8s-wm-01",
        "priority": 0,
        "restartPolicy": "Always",
        "schedulerName": "default-scheduler",
        "securityContext": {},
        "serviceAccount": "trident-csi",
        "serviceAccountName": "trident-csi",
        "terminationGracePeriodSeconds": 30,
        "tolerations": [
            {
                "effect": "NoExecute",
                "key": "node.kubernetes.io/not-ready",
                "operator": "Exists"
            },
            {
                "effect": "NoExecute",
                "key": "node.kubernetes.io/unreachable",
                "operator": "Exists"
            },
            {
                "effect": "NoSchedule",
                "key": "node.kubernetes.io/disk-pressure",
                "operator": "Exists"
            },
            {
                "effect": "NoSchedule",
                "key": "node.kubernetes.io/memory-pressure",
                "operator": "Exists"
            },
            {
                "effect": "NoSchedule",
                "key": "node.kubernetes.io/pid-pressure",
                "operator": "Exists"
            },
            {
                "effect": "NoSchedule",
                "key": "node.kubernetes.io/unschedulable",
                "operator": "Exists"
            },
            {
                "effect": "NoSchedule",
                "key": "node.kubernetes.io/network-unavailable",
                "operator": "Exists"
            }
        ],
        "volumes": [
            {
                "hostPath": {
                    "path": "/var/lib/kubelet/plugins/csi.trident.netapp.io/",
                    "type": "DirectoryOrCreate"
                },
                "name": "plugin-dir"
            },
            {
                "hostPath": {
                    "path": "/var/lib/kubelet/plugins_registry/",
                    "type": "Directory"
                },
                "name": "registration-dir"
            },
            {
                "hostPath": {
                    "path": "/var/lib/kubelet/plugins",
                    "type": "DirectoryOrCreate"
                },
                "name": "plugins-mount-dir"
            },
            {
                "hostPath": {
                    "path": "/var/lib/kubelet/pods",
                    "type": "DirectoryOrCreate"
                },
                "name": "pods-mount-dir"
            },
            {
                "hostPath": {
                    "path": "/dev",
                    "type": "Directory"
                },
                "name": "dev-dir"
            },
            {
                "hostPath": {
                    "path": "/sys",
                    "type": "Directory"
                },
                "name": "sys-dir"
            },
            {
                "hostPath": {
                    "path": "/",
                    "type": "Directory"
                },
                "name": "host-dir"
            },
            {
                "name": "certs",
                "secret": {
                    "defaultMode": 420,
                    "secretName": "trident-csi"
                }
            },
            {
                "name": "trident-csi-token-9ppl5",
                "secret": {
                    "defaultMode": 420,
                    "secretName": "trident-csi-token-9ppl5"
                }
            }
        ]
    },
    "status": {
        "conditions": [
            {
                "lastProbeTime": null,
                "lastTransitionTime": "2019-08-02T13:32:40Z",
                "status": "True",
                "type": "Initialized"
            },
            {
                "lastProbeTime": null,
                "lastTransitionTime": "2019-08-02T13:32:40Z",
                "message": "containers with unready status: [trident-main driver-registrar]",
                "reason": "ContainersNotReady",
                "status": "False",
                "type": "Ready"
            },
            {
                "lastProbeTime": null,
                "lastTransitionTime": "2019-08-02T13:32:40Z",
                "message": "containers with unready status: [trident-main driver-registrar]",
                "reason": "ContainersNotReady",
                "status": "False",
                "type": "ContainersReady"
            },
            {
                "lastProbeTime": null,
                "lastTransitionTime": "2019-08-02T13:32:40Z",
                "status": "True",
                "type": "PodScheduled"
            }
        ],
        "containerStatuses": [
            {
                "image": "quay.io/k8scsi/csi-node-driver-registrar:v1.1.0",
                "imageID": "",
                "lastState": {},
                "name": "driver-registrar",
                "ready": false,
                "restartCount": 0,
                "state": {
                    "waiting": {
                        "reason": "ContainerCreating"
                    }
                }
            },
            {
                "image": "netapp/trident:19.07.0",
                "imageID": "",
                "lastState": {},
                "name": "trident-main",
                "ready": false,
                "restartCount": 0,
                "state": {
                    "waiting": {
                        "reason": "ContainerCreating"
                    }
                }
            }
        ],
        "hostIP": "10.142.67.246",
        "phase": "Pending",
        "podIP": "10.142.67.246",
        "qosClass": "BestEffort",
        "startTime": "2019-08-02T13:32:40Z"
    }
}
@innergy
Copy link
Contributor

innergy commented Aug 2, 2019

Thanks. We'll need to add a node selector to anything that schedules a container, like our Deployments and DaemonSets. At least this: beta.kubernetes.io/os=linux.

@innergy
Copy link
Contributor

innergy commented Aug 2, 2019

While we're at it, should add beta.kubernetes.io/arch: amd64 too.

@cprivitere
Copy link
Author

cprivitere commented Aug 2, 2019

Just FYI, the beta.* labels you've listed have been deprecated.
https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/#kubernetes-io-os

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants