mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
fixup
This commit is contained in:
parent
22d874993c
commit
f899976b41
@ -20,7 +20,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"sync"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
@ -50,9 +49,6 @@ type stateData struct {
|
|||||||
// phase for each node
|
// phase for each node
|
||||||
// it's initialized in the PreFilter phase
|
// it's initialized in the PreFilter phase
|
||||||
podVolumesByNode map[string]*scheduling.PodVolumes
|
podVolumesByNode map[string]*scheduling.PodVolumes
|
||||||
// guards podVolumesByNode in the Filter phase, as the method may be called
|
|
||||||
// in parallel
|
|
||||||
podVolumesByNodeMutex sync.Mutex
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *stateData) Clone() framework.StateData {
|
func (d *stateData) Clone() framework.StateData {
|
||||||
@ -172,9 +168,9 @@ func (pl *VolumeBinding) Filter(ctx context.Context, cs *framework.CycleState, p
|
|||||||
return status
|
return status
|
||||||
}
|
}
|
||||||
|
|
||||||
state.podVolumesByNodeMutex.Lock()
|
cs.Lock()
|
||||||
state.podVolumesByNode[node.Name] = podVolumes
|
state.podVolumesByNode[node.Name] = podVolumes
|
||||||
state.podVolumesByNodeMutex.Unlock()
|
cs.Unlock()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user