diff --git a/.version b/.version index fcc9d59a..0babdaf0 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v0.21.0 \ No newline at end of file +v0.22.0 \ No newline at end of file diff --git a/strelets/adapter/swarm_volumes.go b/strelets/adapter/swarm_volumes.go index eaa6d3de..c434b804 100644 --- a/strelets/adapter/swarm_volumes.go +++ b/strelets/adapter/swarm_volumes.go @@ -21,13 +21,13 @@ func getVolumeName(nodeAddress string, id uint32, postfix string) string { } func (d *dockerSwarmOrchestrator) provisionVolumes(ctx context.Context, nodeAddress string, id uint32, blocksVolumeSize int, logsVolumeSize int) (mounts []mount.Mount, err error) { - if logsMount, err := d.provisionVolume(ctx, getVolumeName(nodeAddress, id, "logs"), ORBS_LOGS_TARGET, logsVolumeSize); err != nil { + if logsMount, err := d.provisionVolume(ctx, getVolumeName(nodeAddress, id, "logs"), ORBS_LOGS_TARGET, logsVolumeSize, OrchestratorOptions{}); err != nil { return mounts, err } else { mounts = append(mounts, logsMount) } - if blocksMount, err := d.provisionVolume(ctx, getVolumeName(nodeAddress, id, "blocks"), ORBS_BLOCKS_TARGET, blocksVolumeSize); err != nil { + if blocksMount, err := d.provisionVolume(ctx, getVolumeName(nodeAddress, id, "blocks"), ORBS_BLOCKS_TARGET, blocksVolumeSize, d.options); err != nil { return mounts, err } else { mounts = append(mounts, blocksMount) @@ -36,8 +36,8 @@ func (d *dockerSwarmOrchestrator) provisionVolumes(ctx context.Context, nodeAddr return mounts, nil } -func (d *dockerSwarmOrchestrator) provisionVolume(ctx context.Context, volumeName string, target string, maxSizeInGb int) (mount.Mount, error) { - driverName, driverOptions := getVolumeDriverOptions(volumeName, d.options, maxSizeInGb) +func (d *dockerSwarmOrchestrator) provisionVolume(ctx context.Context, volumeName string, target string, maxSizeInGb int, orchestratorOptions OrchestratorOptions) (mount.Mount, error) { + driverName, driverOptions := getVolumeDriverOptions(volumeName, orchestratorOptions, maxSizeInGb) _, err := d.client.VolumeCreate(ctx, volume.VolumeCreateBody{ Name: volumeName, @@ -63,6 +63,7 @@ func (d *dockerSwarmOrchestrator) provisionVolume(ctx context.Context, volumeNam }, nil } + func getVolumeDriverOptions(volumeName string, orchestratorOptions OrchestratorOptions, maxSizeInGb int) (string, map[string]string) { driver := LOCAL_DRIVER