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

Fix share name generation in azure file provisioner. #48326

Merged
merged 1 commit into from
Jul 15, 2017

Conversation

karataliu
Copy link
Contributor

What this PR does / why we need it:
Azure file share name has a length limit of 63, but currently the code is using data volume's limit 75.

Which issue this PR fixes
With current implementation, when the cluster name is long, the resulting file share name could have a length of 75.

Also function GenerateVolumeName would produce double '-' when clusterName containing '-' is to be truncated.

In both cases, service would reject the creating file share request.

Special notes for your reviewer:
Please refer to:
https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata#share-names

  • Share names must be from 3 through 63 characters long.
  • The name cannot contain two consecutive hyphens.

@rootfs @colemickens

Release note:

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 30, 2017
@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed labels Jun 30, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @karataliu. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 30, 2017
@spiffxp
Copy link
Member

spiffxp commented Jun 30, 2017

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 30, 2017
@karataliu
Copy link
Contributor Author

/retest

1 similar comment
@karataliu
Copy link
Contributor Author

/retest

@brendandburns brendandburns added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Jul 14, 2017
@brendandburns
Copy link
Contributor

/lgtm
/approve no-issue

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 14, 2017
@brendandburns brendandburns added this to the v1.8 milestone Jul 14, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, karataliu

Associated issue requirement bypassed by: brendandburns

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 14, 2017
@karataliu
Copy link
Contributor Author

/retest

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit f736f31 into kubernetes:master Jul 15, 2017
@karataliu karataliu deleted the afd.dev branch July 15, 2017 02:54
@jdumars
Copy link
Member

jdumars commented Aug 15, 2017

/sig azure

k8s-github-robot pushed a commit that referenced this pull request Nov 15, 2017
…8326-upstream-release-1.7-1506563999

Automatic merge from submit-queue.

Automated cherry pick of #48326

**What this PR does / why we need it**:
Azure file share name has a length limit of 63, but currently the code is using data volume's limit 75.

**Which issue this PR fixes**
cherry-pick fix of #48326
With current implementation, when the cluster name is long, the resulting file share name could have a length of 75.

Also function GenerateVolumeName would produce double '-' when clusterName containing '-' is to be truncated.

In both cases, service would reject the creating file share request.

**Special notes for your reviewer**:
Please refer to:
https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata#share-names

Share names must be from 3 through 63 characters long.
The name cannot contain two consecutive hyphens.

**Release note**:

```
Fix the issue: could not create an azure file when k8s cluster name lenght > 15 
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants