Skip to content
New issue

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

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

Already on GitHub? # to your account

Standard_ZRS will silently create a LRS share instead with NFS protocol #1480

Closed
davidkarlsen opened this issue Oct 10, 2023 · 9 comments · Fixed by #1745
Closed

Standard_ZRS will silently create a LRS share instead with NFS protocol #1480

davidkarlsen opened this issue Oct 10, 2023 · 9 comments · Fixed by #1745
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@davidkarlsen
Copy link

What happened:

Requesting a Standard_ZRS sku share will silently create a Premium_LRS instead

What you expected to happen:
Fail if not supported, create a Standard_ZRS if supported.

How to reproduce it:
See yamls below.
Go into portal, observe:

Performance
:
Premium
Replication
:
Locally-redundant storage (LRS)
Account kind
:
FileStorage
Provisioning state
:
Succeeded
Created
:
09/08/2023, 12:19:25

Anything else we need to know?:

Environment:
sc:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: azurefile-csi-standard-zrs-nfs
provisioner: file.csi.azure.com
parameters:
  # skuName: Premium_ZRS - The sku Sku: Premium_ZRS, Kind: FileStorage is not available in zone.
  skuName: Standard_ZRS
  protocol: nfs
allowVolumeExpansion: true
reclaimPolicy: Delete
volumeBindingMode: Immediate
mountOptions:
  - nconnect=4

pvc:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: disktest
  namespace: disktest
spec:
  storageClassName: azurefile-csi-standard-zrs-nfs
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  • CSI Driver version: v1.21.0
  • Kubernetes version (use kubectl version): 1.25.12
  • OS (e.g. from /etc/os-release): RHCOS
  • Kernel (e.g. uname -a): 4.18.0-372.73.1.el8_6.x86_64
  • Install tools:
  • Others:
@andyzhangx
Copy link
Member

the driver would search Standard_ZRS account first, from below info, it's got a Premium_LRS account, @davidkarlsen have you got a wrong account?

Performance
:
Premium
Replication
:
Locally-redundant storage (LRS)
Account kind
:
FileStorage
Provisioning state
:
Succeeded
Created
:
09/08/2023, 12:19:25

@davidkarlsen
Copy link
Author

But the driver should search for existing accounts, use one if a match is there, else create a new one? https://docs.openshift.com/container-platform/4.12/storage/container_storage_interface/persistent-storage-csi-azure.html#persistent-storage-csi-azure-disk-sc-zrs_persistent-storage-csi-azure
At least that is what happened for my other LRS disks.

@andyzhangx
Copy link
Member

I see where the problem is, since NFS protocol only supports Premium storage, it would enforce to use Premium_LRS if you are using standard storage

@davidkarlsen
Copy link
Author

exactly - wouldn't it make sens to raise an error for this - rather than silently provisioning another sku type?

@andyzhangx
Copy link
Member

unfortunately that's the way now, if we raise error now, it may break existing users. if you set "skuName: Premium_ZRS", it should work.

@frank-m
Copy link

frank-m commented Oct 25, 2023

Just ran into this issue. I would say it is pretty much unacceptable to keep it this way as it may lead to unrecoverable data loss if people expect this to be zone redundant.

Also sounds like a huge logic error in the code..

@k8s-triage-robot
Copy link

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

This bot triages un-triaged issues 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:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 31, 2024
@k8s-triage-robot
Copy link

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:

  • 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:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

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

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 1, 2024
@andyzhangx
Copy link
Member

I will work out a PR to raise error with NFS + Standard account combination.

@andyzhangx andyzhangx added kind/bug Categorizes issue or PR as related to a bug. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Mar 7, 2024
@andyzhangx andyzhangx changed the title Standard_ZRS will silently create a LRS share instead Standard_ZRS will silently create a LRS share instead with NFS protocol Mar 7, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants