Skip to content

Commit e7cebd4

Browse files
committed
Merge remote-tracking branch 'origin/feature/pin-linodego-0.2.0' into feature/move-to-linode
2 parents ee2e236 + 9979e76 commit e7cebd4

File tree

3 files changed

+84
-12
lines changed

3 files changed

+84
-12
lines changed

Gopkg.lock

Lines changed: 80 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
[[constraint]]
3333
name = "github.com/chiefy/linodego"
34-
version = "0.1.0"
34+
version = "0.2.0"
3535

3636
[prune]
3737
go-tests = true

driver.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,11 @@ func (driver linodeVolumeDriver) Mount(req *volume.MountRequest) (*volume.MountR
158158
if linVol.LinodeID == nil || *linVol.LinodeID != *driver.instanceID {
159159
// attach
160160
attachOpts := linodego.VolumeAttachOptions{LinodeID: *driver.instanceID}
161-
if ok, err := driver.linodeAPI.AttachVolume(context.Background(), linVol.ID, &attachOpts); err != nil {
161+
if _, err := driver.linodeAPI.AttachVolume(context.Background(), linVol.ID, &attachOpts); err != nil {
162162
return nil, log.Err("Error attaching volume to linode: %s", err)
163-
} else if !ok {
164-
return nil, log.Err("Could not attach volume to linode.")
165163
}
166-
if err := linodego.WaitForVolumeLinodeID(context.Background(), &driver.linodeAPI, linVol.ID, &attachOpts.LinodeID, 180); err != nil {
164+
165+
if err := driver.linodeAPI.WaitForVolumeLinodeID(context.Background(), linVol.ID, &attachOpts.LinodeID, 180); err != nil {
167166
return nil, log.Err("Error attaching volume to linode: %s", err)
168167
}
169168
}

0 commit comments

Comments
 (0)