kubernetes-csi / csi-driver-smb

This driver allows Kubernetes to access SMB Server on both Linux and Windows nodes.
Apache License 2.0
458 stars 126 forks source link

Sporadic failure due to Workstation service not started on Windows, service had been started all along #754

Open doctorpangloss opened 4 months ago

doctorpangloss commented 4 months ago

What happened: Pod stuck in creation phase with:

NewSmbGlobalMapping failed. output: "New-SmbGlobalMapping : The Workstation service has not been started. \r\nAt line:1 char:190\r\n+ ... ser, $PWord;New-SmbGlobalMapping -RemotePath $Env:smbremotepath -Cred ...\r\n+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : NotSpecified: (MSFT_SmbGlobalMapping:ROOT/Microsoft/...mbGlobalMapping) [New-SmbGlobalMa \r\n   pping], CimException\r\n    + FullyQualifiedErrorId : Windows System Error 2138,New-SmbGlobalMapping\r\n \r\n", err: exit status 1

SSH-ing into the node showed the service had started.

nssm restart LanmanWorkstation nonetheless resolved the issue.

What you expected to happen:

If this error appears, the driver should restart the service.

How to reproduce it: Use the Feb 2024 Windows 2022 release and the latest 1.14 csi-driver-smb, perhaps... It's hard to say why this occurs.

FWIW the daemonset was failing to start in about 1 in 3 Windows nodes with 1.13 and the latest Windows patches.

Anything else we need to know?:

Environment:

doctorpangloss commented 4 months ago

I reverted from Feb 2024 Windows 2022 because it also breaks Calico. Perhaps these are related.

doctorpangloss commented 4 months ago

Cropped up again:

  Warning  FailedMount  2m (x10 over 8m21s)  kubelet            MountVolume.MountDevice failed for volume "pvc-365af285-dd45-4376-86a8-64fa28c78f49" : rpc error: code = Internal desc = volume(appmana-017-ds.i.appmana.com/appmana-cluster-03#pvc-365af285-dd45-4376-86a8-64fa28c78f49#) mount "//appmana-017-ds.i.appmana.com/appmana-cluster-03/pvc-365af285-dd45-4376-86a8-64fa28c78f49" on "\\var\\lib\\kubelet\\plugins\\kubernetes.io\\csi\\smb.csi.k8s.io\\1d50cf8e540807f9541f7d297b25d00fdb89a19cc7d7ede4e23fc87f89034f5c\\globalmount" failed with NewSmbGlobalMapping(\\appmana-017-ds.i.appmana.com\appmana-cluster-03\pvc-365af285-dd45-4376-86a8-64fa28c78f49, c:\var\lib\kubelet\plugins\kubernetes.io\csi\smb.csi.k8s.io\1d50cf8e540807f9541f7d297b25d00fdb89a19cc7d7ede4e23fc87f89034f5c\globalmount) failed with error: rpc error: code = Unknown desc = NewSmbGlobalMapping failed. output: "New-SmbGlobalMapping : The Workstation service has not been started. \r\nAt line:1 char:190\r\n+ ... ser, $PWord;New-SmbGlobalMapping -RemotePath $Env:smbremotepath -Cred ...\r\n+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : NotSpecified: (MSFT_SmbGlobalMapping:ROOT/Microsoft/...mbGlobalMapping) [New-SmbGlobalMa \r\n   pping], CimException\r\n    + FullyQualifiedErrorId : Windows System Error 2138,New-SmbGlobalMapping\r\n \r\n", err: exit status 1
  Warning  FailedMount  110s                 kubelet            Unable to attach or mount volumes: unmounted volumes=[comfyui-volume], unattached volumes=[kube-api-access-md2wm comfyui-volume workdir-volume]: timed out waiting for the condition
k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 weeks ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten