mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
chore: do not set default volume driver to local, distinguish behaviour when it's set or not
This commit is contained in:
@@ -138,6 +138,7 @@ func (s *VolumeScheduler) Schedule() (map[string][]api.VolumeSpec, error) {
|
||||
|
||||
// For each volume that exists on any machine(s) (which shouldn't be created), intersect each service's
|
||||
// eligible machines that use the volume with the machines the volume is located on.
|
||||
//
|
||||
// Service name -> list of processed volume names (quoted) to format the error message.
|
||||
quotedServiceVolumes := make(map[string][]string)
|
||||
for volumeName, volumeMachines := range s.existingVolumeMachines {
|
||||
|
||||
@@ -521,6 +521,11 @@ func TestVolumeScheduler_Schedule(t *testing.T) {
|
||||
{
|
||||
Name: "vol2",
|
||||
Type: api.VolumeTypeVolume,
|
||||
VolumeOptions: &api.VolumeOptions{
|
||||
Driver: &mount.Driver{
|
||||
Name: api.VolumeDriverLocal,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "vol3",
|
||||
@@ -547,15 +552,17 @@ func TestVolumeScheduler_Schedule(t *testing.T) {
|
||||
{
|
||||
Name: "vol2",
|
||||
Type: api.VolumeTypeVolume,
|
||||
VolumeOptions: &api.VolumeOptions{
|
||||
Driver: &mount.Driver{
|
||||
Name: api.VolumeDriverLocal,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "vol4-alias",
|
||||
Type: api.VolumeTypeVolume,
|
||||
VolumeOptions: &api.VolumeOptions{
|
||||
Name: "vol4",
|
||||
Driver: &mount.Driver{
|
||||
Name: api.VolumeDriverLocal,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -570,7 +577,7 @@ func TestVolumeScheduler_Schedule(t *testing.T) {
|
||||
ContainerPath: "/data2",
|
||||
},
|
||||
{
|
||||
VolumeName: "vol5",
|
||||
VolumeName: "vol5-with-driver",
|
||||
ContainerPath: "/data5",
|
||||
},
|
||||
},
|
||||
@@ -587,8 +594,14 @@ func TestVolumeScheduler_Schedule(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "vol5",
|
||||
Name: "vol5-with-driver",
|
||||
Type: api.VolumeTypeVolume,
|
||||
VolumeOptions: &api.VolumeOptions{
|
||||
Name: "vol5",
|
||||
Driver: &mount.Driver{
|
||||
Name: api.VolumeDriverLocal,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -598,6 +611,11 @@ func TestVolumeScheduler_Schedule(t *testing.T) {
|
||||
{
|
||||
Name: "vol5",
|
||||
Type: api.VolumeTypeVolume,
|
||||
VolumeOptions: &api.VolumeOptions{
|
||||
Driver: &mount.Driver{
|
||||
Name: api.VolumeDriverLocal,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"machine3": {
|
||||
|
||||
Reference in New Issue
Block a user