@@ -55,7 +55,7 @@ func (d *ceph) CreateVolume(vol Volume, filler *VolumeFiller, op *operations.Ope
55
55
56
56
if vol .contentType == ContentTypeFS {
57
57
// Create mountpoint.
58
- err := vol .EnsureMountPath ()
58
+ err := vol .EnsureMountPath (true )
59
59
if err != nil {
60
60
return err
61
61
}
@@ -225,7 +225,7 @@ func (d *ceph) CreateVolume(vol Volume, filler *VolumeFiller, op *operations.Ope
225
225
if vol .contentType == ContentTypeFS {
226
226
// Run EnsureMountPath again after mounting and filling to ensure the mount directory has
227
227
// the correct permissions set.
228
- err = vol .EnsureMountPath ()
228
+ err = vol .EnsureMountPath (true )
229
229
if err != nil {
230
230
return err
231
231
}
@@ -350,7 +350,7 @@ func (d *ceph) CreateVolumeFromCopy(vol Volume, srcVol Volume, copySnapshots boo
350
350
351
351
// Mount the volume and ensure the permissions are set correctly inside the mounted volume.
352
352
err = v .MountTask (func (_ string , _ * operations.Operation ) error {
353
- return v .EnsureMountPath ()
353
+ return v .EnsureMountPath (false )
354
354
}, op )
355
355
if err != nil {
356
356
return err
@@ -500,7 +500,7 @@ func (d *ceph) CreateVolumeFromCopy(vol Volume, srcVol Volume, copySnapshots boo
500
500
return err
501
501
}
502
502
503
- err = snapVol .EnsureMountPath ()
503
+ err = snapVol .EnsureMountPath (false )
504
504
if err != nil {
505
505
return err
506
506
}
@@ -526,7 +526,7 @@ func (d *ceph) CreateVolumeFromCopy(vol Volume, srcVol Volume, copySnapshots boo
526
526
// CreateVolumeFromMigration creates a volume being sent via a migration.
527
527
func (d * ceph ) CreateVolumeFromMigration (vol Volume , conn io.ReadWriteCloser , volTargetArgs localMigration.VolumeTargetArgs , preFiller * VolumeFiller , op * operations.Operation ) error {
528
528
if volTargetArgs .ClusterMoveSourceName != "" && volTargetArgs .StoragePool == "" {
529
- err := vol .EnsureMountPath ()
529
+ err := vol .EnsureMountPath (false )
530
530
if err != nil {
531
531
return err
532
532
}
@@ -571,7 +571,7 @@ func (d *ceph) CreateVolumeFromMigration(vol Volume, conn io.ReadWriteCloser, vo
571
571
}
572
572
}
573
573
574
- err = vol .EnsureMountPath ()
574
+ err = vol .EnsureMountPath (false )
575
575
if err != nil {
576
576
return err
577
577
}
@@ -599,7 +599,7 @@ func (d *ceph) CreateVolumeFromMigration(vol Volume, conn io.ReadWriteCloser, vo
599
599
return err
600
600
}
601
601
602
- err = snapVol .EnsureMountPath ()
602
+ err = snapVol .EnsureMountPath (false )
603
603
if err != nil {
604
604
return err
605
605
}
@@ -1206,7 +1206,7 @@ func (d *ceph) MountVolume(vol Volume, op *operations.Operation) error {
1206
1206
if vol .contentType == ContentTypeFS {
1207
1207
mountPath := vol .MountPath ()
1208
1208
if ! linux .IsMountPoint (mountPath ) {
1209
- err := vol .EnsureMountPath ()
1209
+ err := vol .EnsureMountPath (false )
1210
1210
if err != nil {
1211
1211
return err
1212
1212
}
@@ -1501,7 +1501,7 @@ func (d *ceph) CreateVolumeSnapshot(snapVol Volume, op *operations.Operation) er
1501
1501
return err
1502
1502
}
1503
1503
1504
- err = snapVol .EnsureMountPath ()
1504
+ err = snapVol .EnsureMountPath (false )
1505
1505
if err != nil {
1506
1506
return err
1507
1507
}
@@ -1601,7 +1601,7 @@ func (d *ceph) MountVolumeSnapshot(snapVol Volume, op *operations.Operation) err
1601
1601
mountPath := snapVol .MountPath ()
1602
1602
1603
1603
if snapVol .contentType == ContentTypeFS && ! linux .IsMountPoint (mountPath ) {
1604
- err := snapVol .EnsureMountPath ()
1604
+ err := snapVol .EnsureMountPath (false )
1605
1605
if err != nil {
1606
1606
return err
1607
1607
}
0 commit comments