AWS: Update copy-paste of GCE PD code to latest version

We are (sadly) using a copy-and-paste of the GCE PD code for AWS EBS.
This code hasn't been updated in a while, and it seems that the GCE code
has some code to make volume mounting more robust that we should copy.
This commit is contained in:
Justin Santa Barbara
2016-01-19 10:45:30 -05:00
parent 0dc25f545f
commit 1ae1db6027
6 changed files with 390 additions and 115 deletions

View File

@@ -326,7 +326,7 @@ func createPD() (string, error) {
}
volumeOptions := &awscloud.VolumeOptions{}
volumeOptions.CapacityGB = 10
return volumes.CreateVolume(volumeOptions)
return volumes.CreateDisk(volumeOptions)
}
}
@@ -353,7 +353,7 @@ func deletePD(pdName string) error {
if !ok {
return fmt.Errorf("Provider does not support volumes")
}
return volumes.DeleteVolume(pdName)
return volumes.DeleteDisk(pdName)
}
}
@@ -383,7 +383,8 @@ func detachPD(hostName, pdName string) error {
if !ok {
return fmt.Errorf("Provider does not support volumes")
}
return volumes.DetachDisk(hostName, pdName)
_, err := volumes.DetachDisk(hostName, pdName)
return err
}
}