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

Add text about using multiple PVCs on a pod with the annotation. #41

Merged

Conversation

awels
Copy link
Member

@awels awels commented Feb 11, 2020

Signed-off-by: Alexander Wels [email protected]

What this PR does / why we need it:
Explain that using the annotation together with multiple PVCs for a single pod can lead to issues if you don't annotate all the PVCs used with the pod.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Release note:

NONE

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/XS labels Feb 11, 2020
README.md Outdated
@@ -14,6 +14,8 @@ The main differences between this provisioner and the standard hostpath provisio
3. Or if you do not want to specify the node on the claim, you can specify `volumeBindingMode: WaitForFirstConsumer` in the storage class. Then the PV will be created only when the first Pod using this PVC is scheduled. The PV will be created on the node that the Pod is scheduled on.
Still, the annotation `kubevirt.io/provisionOnNode` can be used in this mode, though it will not wait for the first consumer.

_There is on caveat with using the annotation, if you have a pod that uses multiple PVCs and you annotate one, you should annotate all of them otherwise there can be a race condition where the Kubernetes scheduler can decide to schedule the pod on a node you did not specify in your annotation._
Copy link
Member

Choose a reason for hiding this comment

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

...There is one caveat...

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 this could be clarified...

In cases where multiple PVCs are to be used with a Pod it is not recommended to mix the WaitForFirstConsumer binding mode with the provisionOnNode annotation. All of a Pod's PVCs should carry the annotation or none should. Mixing modes can result in PVCs being allocated from different nodes leaving your Pod unschedulable.

@awels awels force-pushed the document_multiple_pvcs_per_pod_with_ann branch from 8369cb4 to 73f997b Compare February 12, 2020 18:44
@awels
Copy link
Member Author

awels commented Feb 12, 2020

/retest

@awels awels force-pushed the document_multiple_pvcs_per_pod_with_ann branch from 73f997b to f2ff491 Compare February 21, 2020 17:06
@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 11, 2020
@awels
Copy link
Member Author

awels commented Mar 11, 2020

/approve

@kubevirt-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awels

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

The pull request process is described 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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 11, 2020
@kubevirt-bot kubevirt-bot merged commit c16f7a0 into kubevirt:master Mar 11, 2020
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants