mirror of https://github.com/k3s-io/k3s
replace filepath with path due to pre-formatted volumeName
parent
6f82f40760
commit
7a14b14bf4
|
@ -19,7 +19,7 @@ package aws_ebs
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ func (plugin *awsElasticBlockStorePlugin) NewDetacher() (volume.Detacher, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (detacher *awsElasticBlockStoreDetacher) Detach(volumeName string, nodeName types.NodeName) error {
|
func (detacher *awsElasticBlockStoreDetacher) Detach(volumeName string, nodeName types.NodeName) error {
|
||||||
volumeID := aws.KubernetesVolumeID(filepath.Base(volumeName))
|
volumeID := aws.KubernetesVolumeID(path.Base(volumeName))
|
||||||
|
|
||||||
if _, err := detacher.awsVolumes.DetachDisk(volumeID, nodeName); err != nil {
|
if _, err := detacher.awsVolumes.DetachDisk(volumeID, nodeName); err != nil {
|
||||||
glog.Errorf("Error detaching volumeID %q: %v", volumeID, err)
|
glog.Errorf("Error detaching volumeID %q: %v", volumeID, err)
|
||||||
|
|
Loading…
Reference in New Issue