@@ -276,13 +276,6 @@ type cinderVolume struct {
276276 volume.MetricsNil
277277}
278278
279- func detachDiskLogError (cd * cinderVolume ) {
280- err := cd .manager .DetachDisk (& cinderVolumeUnmounter {cd })
281- if err != nil {
282- glog .Warningf ("Failed to detach disk: %v (%v)" , cd , err )
283- }
284- }
285-
286279func (b * cinderVolumeMounter ) GetAttributes () volume.Attributes {
287280 return volume.Attributes {
288281 ReadOnly : b .readOnly ,
@@ -309,7 +302,6 @@ func (b *cinderVolumeMounter) SetUpAt(dir string, fsGroup *int64) error {
309302 b .plugin .volumeLocks .LockKey (b .pdName )
310303 defer b .plugin .volumeLocks .UnlockKey (b .pdName )
311304
312- // TODO: handle failed mounts here.
313305 notmnt , err := b .mounter .IsLikelyNotMountPoint (dir )
314306 if err != nil && ! os .IsNotExist (err ) {
315307 glog .Errorf ("Cannot validate mount point: %s %v" , dir , err )
@@ -327,9 +319,7 @@ func (b *cinderVolumeMounter) SetUpAt(dir string, fsGroup *int64) error {
327319 }
328320
329321 if err := os .MkdirAll (dir , 0750 ); err != nil {
330- // TODO: we should really eject the attach/detach out into its own control loop.
331322 glog .V (4 ).Infof ("Could not create directory %s: %v" , dir , err )
332- detachDiskLogError (b .cinderVolume )
333323 return err
334324 }
335325
@@ -360,8 +350,6 @@ func (b *cinderVolumeMounter) SetUpAt(dir string, fsGroup *int64) error {
360350 }
361351 }
362352 os .Remove (dir )
363- // TODO: we should really eject the attach/detach out into its own control loop.
364- detachDiskLogError (b .cinderVolume )
365353 glog .Errorf ("Failed to mount %s: %v" , dir , err )
366354 return err
367355 }
0 commit comments