From 36d1365af5ad3c2958988c72912679ee72732e49 Mon Sep 17 00:00:00 2001 From: Yecheng Fu Date: Wed, 20 May 2020 22:23:08 +0800 Subject: [PATCH] update comments in volumescheduling pkg to reflect latest change --- .../volume/scheduling/scheduler_binder.go | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/controller/volume/scheduling/scheduler_binder.go b/pkg/controller/volume/scheduling/scheduler_binder.go index f53f7567fae..d3225515ebc 100644 --- a/pkg/controller/volume/scheduling/scheduler_binder.go +++ b/pkg/controller/volume/scheduling/scheduler_binder.go @@ -71,17 +71,17 @@ type InTreeToCSITranslator interface { TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error) } -// SchedulerVolumeBinder is used by the scheduler to handle PVC/PV binding -// and dynamic provisioning. The binding decisions are integrated into the pod scheduling -// workflow so that the PV NodeAffinity is also considered along with the pod's other -// scheduling requirements. +// SchedulerVolumeBinder is used by the scheduler VolumeBinding plugin to +// handle PVC/PV binding and dynamic provisioning. The binding decisions are +// integrated into the pod scheduling workflow so that the PV NodeAffinity is +// also considered along with the pod's other scheduling requirements. // -// This integrates into the existing default scheduler workflow as follows: +// This integrates into the existing scheduler workflow as follows: // 1. The scheduler takes a Pod off the scheduler queue and processes it serially: -// a. Invokes all predicate functions, parallelized across nodes. FindPodVolumes() is invoked here. -// b. Invokes all priority functions. Future/TBD +// a. Invokes all filter plugins, parallelized across nodes. FindPodVolumes() is invoked here. +// b. Invokes all score plugins. Future/TBD // c. Selects the best node for the Pod. -// d. Cache the node selection for the Pod. AssumePodVolumes() is invoked here. +// d. Invokes all reserve plugins. AssumePodVolumes() is invoked here. // i. If PVC binding is required, cache in-memory only: // * For manual binding: update PV objects for prebinding to the corresponding PVCs. // * For dynamic provisioning: update PVC object with a selected node from c) @@ -89,7 +89,7 @@ type InTreeToCSITranslator interface { // ii. Afterwards, the main scheduler caches the Pod->Node binding in the scheduler's pod cache, // This is handled in the scheduler and not here. // e. Asynchronously bind volumes and pod in a separate goroutine -// i. BindPodVolumes() is called first. It makes all the necessary API updates and waits for +// i. BindPodVolumes() is called first in PreBind phase. It makes all the necessary API updates and waits for // PV controller to fully bind and provision the PVCs. If binding fails, the Pod is sent // back through the scheduler. // ii. After BindPodVolumes() is complete, then the scheduler does the final Pod->Node binding. @@ -832,7 +832,7 @@ func (b *volumeBinder) checkVolumeProvisions(pod *v1.Pod, claimsToProvision []*v provisionedClaims = append(provisionedClaims, claim) } - klog.V(4).Infof("Provisioning for claims of pod %q that has no matching volumes on node %q ...", podName, node.Name) + klog.V(4).Infof("Provisioning for %d claims of pod %q that has no matching volumes on node %q ...", len(claimsToProvision), podName, node.Name) return true, provisionedClaims, nil }