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

Change fsType to vhdFsType. Remove fsType in parameter support #486

Closed
wants to merge 1 commit into from

Conversation

Jiawei0227
Copy link
Contributor

What type of PR is this?
/kind cleanup
/kind api-change

What this PR does / why we need it:
This PR remove fsType in the parameter supports as we also have 'csi.k8s.io/fstype' field in storageclass which can be confusing to users.
Instead, we rename it to vhdFsType.

Also, this PR remove fsType: nfs supports so whoever wants to use it need to set protocol instead of fsType.

Add mfsymlinks as the default mountOptions

Which issue(s) this PR fixes:

Fixes # #485 #484

Special notes for your reviewer:
This is a breaking change so we might need to be more cautious about this! fsType in parameters will not be supported anymore.

Release note:

Rename fsType in parameters to vhdFsType. For filer fsType, Azurefile only supports cifs for now with different protocols(nfs, smb).

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 3, 2020
@Jiawei0227
Copy link
Contributor Author

/cc @msau42
/assign @andyzhangx

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Jiawei0227
To complete the pull request process, please assign feiskyer after the PR has been reviewed.
You can assign the PR to them by writing /assign @feiskyer in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Jiawei0227
Copy link
Contributor Author

This might only be compatible with csi-provisioner:v2.0 because you can specify default-fsType there...

@Jiawei0227
Copy link
Contributor Author

This is more of a POC. I think we need to at least rename it before GA

@@ -90,8 +90,8 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
fileShareName = v
case diskNameField:
diskName = v
case fsTypeField:
fsType = v
case vhdFsTypeField:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may still need to support the original fstype parameter if backwards compatibility is important. Will let @andyzhangx decide.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think we need to get rid of them before it goes to 1.0, but yeah... let's see

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we still need to make backwards compatibility, is it possible to keep this fsType, e.g. we have two places to set this field: 1) csi.k8s.io/fstype 2) fstype: ext4

if `csi.k8s.io/fstype` != "" {
  fsType = `csi.k8s.io/fstype` setting
} esle {
  fsType = `fstype` setting
}

Azure disk driver also has same issue, it's better not rename or remove existing parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, so I think at least one thing important is that we should read fsType from VolumeCapability instead of parameters.

And I feel like use fsType to decide when to use VHD over normal Azure file can be confusing. Would it possible to add a field vhdFsType and put that as the recommended field to set? And we can support fsType at the same time. But remove it once the driver wants to promote GA

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we have 3 parameters now:

  • parametes.fsType
  • parametes.vhdFsType
  • csi.k8s.io/fstype

if we want to use parametes.vhdFsType, then had better not use csi.k8s.io/fstype since the naming is different, another option is only use:

  • parametes.fsType
  • csi.k8s.io/fstype

It's still open to discuss. Thanks.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately because of kubernetes-csi/external-provisioner#328, any PV's fstype is going to default to ext4 even if nothing was specified in the StorageClass.

That means existing PVs are going to have fstype ext4 by default, even if they were using cifs. So I think to retain backwards compatibility, we cannot use 'csi.k8s.io/fstype' to determine if something should be vhd or not. We need a specific parameter for vhd which then determines how we interpret the 'csi.k8s.io/fstype' field.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I think my point is that regardless how fsType are passing from parameters. The fsType should only be decided by VolumeCapabilities. And that is the way moving forward for CSI spec compatibility. Currently Azuredisk and Azurefile does not seem to read from VolumeCapabilities to get fsType.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's better that only add vhdFsType in this PR, and keep fsType as compatible, and due to this issue(kubernetes-csi/external-provisioner#328), csi.k8s.io/fstype could be useless now since it's always ext4 by default.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The external provisioner issue has been fixed in 2.0. However existing PVs are going to have PV.fstype set to ext4

@@ -117,16 +121,13 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
enableHTTPSTrafficOnly := true
shareProtocol := storage.SMB
var vnetResourceIDs []string
if fsType == nfs || protocol == nfs {
protocol = nfs
if protocol == nfs {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for my own learning, when should nfs be used vs cifs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andyzhangx I also want to learn :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Azure file provides both SMB(by default) and NFS protocols

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but is there a recommendation on when to use NFS over cifs? Normally how should user decides which one to use?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently cifs is the default protocol

@k8s-ci-robot
Copy link
Contributor

@Jiawei0227: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 31, 2020
@fejta-bot
Copy link

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-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 Apr 8, 2021
@k8s-ci-robot
Copy link
Contributor

@Jiawei0227: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-azurefile-csi-driver-e2e-migration 963f6bc link /test pull-azurefile-csi-driver-e2e-migration
pull-azurefile-csi-driver-windows-build 963f6bc link /test pull-azurefile-csi-driver-windows-build
pull-azurefile-csi-driver-integration 963f6bc link /test pull-azurefile-csi-driver-integration
pull-azurefile-csi-driver-unit 963f6bc link /test pull-azurefile-csi-driver-unit
pull-azurefile-csi-driver-sanity 963f6bc link /test pull-azurefile-csi-driver-sanity
pull-azurefile-csi-driver-e2e-windows 963f6bc link /test pull-azurefile-csi-driver-e2e-windows
pull-azurefile-csi-driver-e2e 963f6bc link /test pull-azurefile-csi-driver-e2e
pull-azurefile-csi-driver-e2e-vmss 963f6bc link /test pull-azurefile-csi-driver-e2e-vmss
pull-azurefile-csi-driver-external-e2e 963f6bc link /test pull-azurefile-csi-driver-external-e2e
pull-azurefile-csi-driver-external-e2e-smb 963f6bc link /test pull-azurefile-csi-driver-external-e2e-smb
pull-azurefile-csi-driver-external-e2e-nfs 963f6bc link /test pull-azurefile-csi-driver-external-e2e-nfs

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@fejta-bot
Copy link

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-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 Jun 28, 2021
@k8s-triage-robot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

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

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

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

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants