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

If multiple default StorageClasses exist, pvc request fails #34549

Closed
screeley44 opened this issue Oct 11, 2016 · 44 comments
Closed

If multiple default StorageClasses exist, pvc request fails #34549

screeley44 opened this issue Oct 11, 2016 · 44 comments
Labels
area/kubectl lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/storage Categorizes an issue or PR as relevant to SIG Storage.

Comments

@screeley44
Copy link
Contributor

screeley44 commented Oct 11, 2016

Do we want to stop the creation of a StorageClass with the "is-default" annotation, if one already exists on the cluster?

If I create multiple "default" storage classes

[root@screeley-sc1 gce]# kubectl get storageclass
NAME            TYPE                   ISDEFAULT
another-class   kubernetes.io/gce-pd   NO        
generic1-slow   kubernetes.io/gce-pd   YES       
generic2-fast   kubernetes.io/gce-pd   YES       

and then try to submit a PVC, I get this error

[root@screeley-sc1 gce]# kubectl create -f gce-pvc-multidefault.yaml 
Error from server (Forbidden): error when creating "gce-pvc-multidefault.yaml": persistentvolumeclaims "pvc-default" is forbidden: Internal error occurred: 2 default StorageClasses were found

@kubernetes/sig-storage

@screeley44
Copy link
Contributor Author

@saad-ali - any thoughts on this? Do we want to not allow this to happen?

@jsafrane
Copy link
Member

@kubernetes/sig-storage-misc, shall we update our admission controller to prevent two classes to be marked as default at the same time?

@msau42
Copy link
Member

msau42 commented Jan 10, 2017

Sounds reasonable to me

@thockin
Copy link
Member

thockin commented Jan 11, 2017 via email

@lavalamp
Copy link
Member

@smarterclayton is working on a proposal to move admission controllers out of process, which we talked about a lot during today's API Machinery SIG.

If you really want to provide a guarantee like this, you need some sort of locking mechanism around the check. The naive implementation where the admission controller lists all storageclasses and checks for uniqueness is actually quite broken (I'll leave this as an exercise for the reader), possibly worse than not doing the check at all because other components won't realize they have to handle the case where two get in.

I would consider making the controller implementing this thing responsible for demoting one class if it finds two defaults. This is the model that we use for Kubelet to reject a pod if it actually doesn't fit. I'm personally more of a fan of this approach because it means the cluster state is eventually correct. If the only defense against invalid state is an admission control check, then a bug there is potentially disastrous since the system can't self-heal. Of course if there's no bugs then it's probably not a problem...

@msau42
Copy link
Member

msau42 commented Jan 18, 2017

My only concern about making it out of process is that it's not as easy to notify the user that they made a mistake. By automatically demoting classes, then the user may not realize that their volume is not using their intended default class since the provisioning will succeed with a different default class.

@thockin
Copy link
Member

thockin commented Jan 18, 2017 via email

@msau42
Copy link
Member

msau42 commented May 22, 2017

/sig storage

@k8s-ci-robot k8s-ci-robot added the sig/storage Categorizes an issue or PR as relevant to SIG Storage. label May 22, 2017
@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.

Prevent issues from auto-closing with an /lifecycle frozen comment.

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

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/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 Dec 24, 2017
@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-testing, kubernetes/test-infra and/or @fejta.
/lifecycle rotten
/remove-lifecycle stale

@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 Jan 24, 2018
@fejta-bot
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-testing, kubernetes/test-infra and/or fejta.
/close

@ashishranjan738
Copy link
Contributor

/reopen

@k8s-ci-robot
Copy link
Contributor

@ashishranjan738: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

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.

@j-griffith
Copy link
Contributor

/reopen

@k8s-ci-robot
Copy link
Contributor

@j-griffith: Reopened this issue.

In response to this:

/reopen

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.

@fejta-bot
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-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

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-testing, kubernetes/test-infra and/or fejta.
/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.

@yashbhutwala
Copy link

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Oct 25, 2019
@yashbhutwala
Copy link

/reopen

@k8s-ci-robot
Copy link
Contributor

@screeley44: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-triage-robot
Copy link

The Kubernetes project currently lacks enough 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:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR 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 Mar 15, 2022
@immae1
Copy link

immae1 commented Apr 6, 2022

/remove-lifecycle stale
still there the issue...

@k8s-triage-robot
Copy link

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:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR 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 May 6, 2022
@k8s-triage-robot
Copy link

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

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

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

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

Please 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.

@altitude1326
Copy link

The bug still exists need to re-open it.

/reopen

@k8s-ci-robot
Copy link
Contributor

@altitude1326: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

The bug still exists need to re-open it.

/reopen

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.

@altitude1326
Copy link

@msau42 can you do somthing for reopen and treat this bug please ?

@QJoly
Copy link

QJoly commented Sep 5, 2022

the problem is still here

@lavalamp
Copy link
Member

lavalamp commented Sep 6, 2022

/reopen
/lifecycle frozen
/uncc

@k8s-ci-robot
Copy link
Contributor

@lavalamp: Reopened this issue.

In response to this:

/reopen
/lifecycle frozen
/uncc

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 reopened this Sep 6, 2022
@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Sep 6, 2022
@jsafrane
Copy link
Member

This should be fixed by #110559

@khteh
Copy link

khteh commented Nov 23, 2022

Still happen!

@aojea
Copy link
Member

aojea commented Nov 23, 2022

Still happen!

in 1.26?

@khteh
Copy link

khteh commented Nov 24, 2022

Due to them being annotated as default. There can only be ONE default sc.

@xing-yang
Copy link
Contributor

This should be fixed now by the RetroActive Default Storage Class feature.

@xing-yang
Copy link
Contributor

/close

@k8s-ci-robot
Copy link
Contributor

@xing-yang: Closing this issue.

In response to this:

/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
area/kubectl lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/storage Categorizes an issue or PR as relevant to SIG Storage.
Projects
None yet
Development

No branches or pull requests