Skip to content

Commit

Permalink
Merge pull request #220 from clintonskitson/bugfix/sio_preemption
Browse files Browse the repository at this point in the history
Bugfix for SIO and pre-emption
  • Loading branch information
akutz committed Dec 16, 2015
2 parents a1cf28a + ffbaeb5 commit 96c7a59
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/storage/scaleio/scaleio.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,20 +554,18 @@ func (d *driver) DetachVolume(
targetVolume.Volume = volumes[0]

unmapVolumeSdcParam := &types.UnmapVolumeSdcParam{
SdcID: d.sdc.Sdc.ID,
SdcID: "",
IgnoreScsiInitiators: "true",
AllSdcs: "",
}

if force {
unmapVolumeSdcParam.AllSdcs = "true"
} else {
unmapVolumeSdcParam.SdcID = d.sdc.Sdc.ID
}

// need to detect if unmounted first
err = targetVolume.UnmapVolumeSdc(unmapVolumeSdcParam)
if err != nil {
return goof.WithFieldsE(fields, "error unmapping volume sdc", err)
}
_ = targetVolume.UnmapVolumeSdc(unmapVolumeSdcParam)

log.WithFields(log.Fields{
"provider": providerName,
Expand Down

0 comments on commit 96c7a59

Please sign in to comment.