kubernetes / mount-utils

Package mount defines an interface to mounting filesystems.
Apache License 2.0
57 stars 30 forks source link

diskMount: formatAndMount failed, err: disk number out of range: "101" #2

Closed axelgMS closed 2 years ago

axelgMS commented 3 years ago

CRI 234511173

Error from Windows node pool on Azure AKS 1.18.14. Windows node image = AKSWindows-2019-17763.1817.210310

kubelet error says:

I0402 14:47:59.657678    6416 operation_generator.go:567] MountVolume.WaitForAttach succeeded for volume "pvc-1e3a8013-0797-4823-8931-cb4b568d20f4" (UniqueName: "kubernetes.io/azure-disk//subscriptions/XYZ/resourceGroups/XYZ/providers/Microsoft.Compute/disks/kubernetes-dynamic-pvc-1e3a8013-0797-4823-8931-cb4b568d20f4") pod "mssql-cd44fcc5d-sh5kf" (UID: "ec1b4004-5006-47b1-87eb-0781696bf510") DevicePath "/dev/disk101"
…
E0402 14:47:59.658685    6416 mount_windows.go:222] diskMount: formatAndMount failed, err: disk number out of range: "101"

“formatAndMount failed” error comes from here, and is happening after the ValidateDiskNumber() defined here, which says:

// ValidateDiskNumber : disk number should be a number in [0, 99]
func ValidateDiskNumber(disk string) error {
      diskNum, err := strconv.Atoi(disk)
      if err != nil {
            return fmt.Errorf("wrong disk number format: %q, err:%v", disk, err)
      }

      if diskNum < 0 || diskNum > 99 {
            return fmt.Errorf("disk number out of range: %q", disk)
      }

      return nil
}

Not yet sure why Windows reports the disk with an ID / LUN of 101 - as there was only a few Data Disks attached to the VM when the issue occurred.

jingxu97 commented 3 years ago

cc @ddebroy

fejta-bot commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale

k8s-triage-robot commented 3 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten

k8s-triage-robot commented 3 years ago

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

This bot triages issues and PRs according to the following rules:

You can:

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

/close

k8s-ci-robot commented 3 years ago

@k8s-triage-robot: Closing this issue.

In response to [this](https://github.com/kubernetes/mount-utils/issues/2#issuecomment-912781491): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues and PRs according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue or PR with `/reopen` >- Mark this issue or PR as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
lizhuqi commented 2 years ago

This issue is also seen in GKE

mauriciopoppe commented 2 years ago

/reopen

k8s-ci-robot commented 2 years ago

@mauriciopoppe: Reopened this issue.

In response to [this](https://github.com/kubernetes/mount-utils/issues/2#issuecomment-942788762): >/reopen Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
lizhuqi commented 2 years ago

/assign @andyzhangx as Andy's PR will fix this issue

andyzhangx commented 2 years ago

@axelgMS I will port code change(https://github.com/kubernetes/kubernetes/pull/105673) to this repo. off the topic: Just curious, why there is 101 disk num in Azure Windows node, as I could remember, Azure VM could only support 64 data disks at most.

andyzhangx commented 2 years ago

@axelgMS I will port code change(kubernetes/kubernetes#105673) to this repo. off the topic: Just curious, why there is 101 disk num in Azure Windows node, as I could remember, Azure VM could only support 64 data disks at most.

not necessary for porting now since this repo is a mirror of kubernetes/kubernetes/staging/mount-utils

andyzhangx commented 2 years ago

/close

k8s-ci-robot commented 2 years ago

@andyzhangx: Closing this issue.

In response to [this](https://github.com/kubernetes/mount-utils/issues/2#issuecomment-943960340): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.