diff --git a/go.mod b/go.mod index 5d0058c310..300db2d465 100644 --- a/go.mod +++ b/go.mod @@ -62,14 +62,14 @@ require ( github.com/gorilla/websocket v1.5.3 github.com/jinzhu/copier v0.4.0 github.com/kubernetes-csi/csi-lib-utils v0.20.0 - github.com/longhorn/backing-image-manager v1.8.0-rc2 + github.com/longhorn/backing-image-manager v1.8.0-rc3 github.com/longhorn/backupstore v0.0.0-20250115162037-d046737d09dc github.com/longhorn/go-common-libs v0.0.0-20250107022351-ec79818ce8db github.com/longhorn/go-iscsi-helper v0.0.0-20250111093313-7e1930499625 github.com/longhorn/go-spdk-helper v0.0.0-20241227145830-6187c6354129 - github.com/longhorn/longhorn-engine v1.8.0-rc2 - github.com/longhorn/longhorn-instance-manager v1.8.0-rc2 - github.com/longhorn/longhorn-share-manager v1.8.0-rc2 + github.com/longhorn/longhorn-engine v1.8.0-rc3 + github.com/longhorn/longhorn-instance-manager v1.8.0-rc3 + github.com/longhorn/longhorn-share-manager v1.8.0-rc3 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.20.5 github.com/rancher/dynamiclistener v0.6.1 diff --git a/go.sum b/go.sum index 4de5af4b50..fae4226562 100644 --- a/go.sum +++ b/go.sum @@ -151,8 +151,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/longhorn/backing-image-manager v1.8.0-rc2 h1:2OzNRUFE5sP8ppp1qBlFaKCfEVGCyvOxFDk2rUqjZHU= -github.com/longhorn/backing-image-manager v1.8.0-rc2/go.mod h1:9gid57VIPhTvDWgSBfGAJtYtl+XpsREyE6WwUNKn+n0= +github.com/longhorn/backing-image-manager v1.8.0-rc3 h1:+10FX0kP/lgP4CBPE7N+RW2/ZQDxq9rjO1k8YHyss5Y= +github.com/longhorn/backing-image-manager v1.8.0-rc3/go.mod h1:tB1B+P3C4qfeSDHb91b5vrp/i4S8HxPad4cjYRk02Ow= github.com/longhorn/backupstore v0.0.0-20250115162037-d046737d09dc h1:nhbbDXl5LQzpU/3Yl1LBExEFcKpluyBwX7oRqhyr/ms= github.com/longhorn/backupstore v0.0.0-20250115162037-d046737d09dc/go.mod h1:KWKro76mHuneR0Y224btmI62SvhcQcvY1ZXaqZHmNHw= github.com/longhorn/go-common-libs v0.0.0-20250107022351-ec79818ce8db h1:aXAcEW8C6b7vxLoQr51FtKCPA4t0jX4xHj5sF97zU2A= @@ -161,12 +161,12 @@ github.com/longhorn/go-iscsi-helper v0.0.0-20250111093313-7e1930499625 h1:d39A30 github.com/longhorn/go-iscsi-helper v0.0.0-20250111093313-7e1930499625/go.mod h1:yIm3sGRuYOw/Y3XzRhG5+3FlZBOfrU5EZOavzwL2jVs= github.com/longhorn/go-spdk-helper v0.0.0-20241227145830-6187c6354129 h1:yPsm0Lu6wXDH/XRfTqrBiFaIcDduApu3gb38XBX++qI= github.com/longhorn/go-spdk-helper v0.0.0-20241227145830-6187c6354129/go.mod h1:gt5O4pBZlkrrQrsEpli+1d6g43clsuMaF/NIhOQ3Oyo= -github.com/longhorn/longhorn-engine v1.8.0-rc2 h1:soxUV9DAsBtwD2Y+8Za/dLhuBvmxeswec3YIgevYYKc= -github.com/longhorn/longhorn-engine v1.8.0-rc2/go.mod h1:1Fz703NPKp6OfblSb9YFOWcsGtba0Lj2K0kAZxukssM= -github.com/longhorn/longhorn-instance-manager v1.8.0-rc2 h1:14ZismarHETPhBPgW0/GmdPoHB5QbWTYjEbHEybi6Ho= -github.com/longhorn/longhorn-instance-manager v1.8.0-rc2/go.mod h1:yG0wHNLKBvBZ+W2QU2yWDVyLJvqbeUBxxVyKpQqS/Cs= -github.com/longhorn/longhorn-share-manager v1.8.0-rc2 h1:+BoNAlLY4kRqbtUYhFJoqNYgJ7exqLIrdIwicdA5RfQ= -github.com/longhorn/longhorn-share-manager v1.8.0-rc2/go.mod h1:txR8ciQEf3xIuFZW0zN7ZlUtvaZq0pIggMGGp4c94rg= +github.com/longhorn/longhorn-engine v1.8.0-rc3 h1:27/WNpMM09YhEpiHjvcuy4lQI5UU9/F0XsM+oyf97XM= +github.com/longhorn/longhorn-engine v1.8.0-rc3/go.mod h1:BvJjgPDeCcZmU4kwj11ozte+to7RgFGKGCMC3VfuFgk= +github.com/longhorn/longhorn-instance-manager v1.8.0-rc3 h1:1RxAyTT5zWXYDETTawwE9hsHPOjq2zszQwVBb6CpH+Y= +github.com/longhorn/longhorn-instance-manager v1.8.0-rc3/go.mod h1:iD+pHeHB3CoLmbEgxVaS5cjIuKJBuEXyFg1D7iEvhgs= +github.com/longhorn/longhorn-share-manager v1.8.0-rc3 h1:FP4zfERAScD5VE1j72i/vW/TlTZbxFdHs2yAnT5kSdk= +github.com/longhorn/longhorn-share-manager v1.8.0-rc3/go.mod h1:FOpswQ9Wi9Zci92gNDTekjTiI6DKAvPIFo+f22afMDw= github.com/longhorn/types v0.0.0-20241225162202-00d3a5fd7502 h1:jgw7nosooLe1NQEdCGzM/nEOFzPcurNO+0PDsicc5+A= github.com/longhorn/types v0.0.0-20241225162202-00d3a5fd7502/go.mod h1:3jHuVDtpkXQzpnp4prguDBskVRric2kmF8aSPkRJ4jw= github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= diff --git a/vendor/github.com/longhorn/longhorn-share-manager/pkg/types/types.go b/vendor/github.com/longhorn/longhorn-share-manager/pkg/types/types.go index 86aa5e080b..d2bf167ebe 100644 --- a/vendor/github.com/longhorn/longhorn-share-manager/pkg/types/types.go +++ b/vendor/github.com/longhorn/longhorn-share-manager/pkg/types/types.go @@ -12,11 +12,29 @@ const ( DevPath = "/dev" MapperDevPath = "/dev/mapper" + // The suffix for dm device name of the encrypted v2 volume. + MapperV2VolumeSuffix = "-encrypted" + ExportPath = "/export" + + DataEngineTypeV1 = "v1" + DataEngineTypeV2 = "v2" ) -func GetVolumeDevicePath(volumeName string, EncryptedDevice bool) string { +func GetEncryptVolumeName(volume, dataEngine string) string { + if dataEngine == DataEngineTypeV2 { + return volume + MapperV2VolumeSuffix + } + return volume +} + +func GetVolumeDevicePath(volumeName, dataEngine string, EncryptedDevice bool) string { if EncryptedDevice { + if dataEngine == DataEngineTypeV2 { + // v2 volume will use a dm device as default to control IO path when attaching. This dm device will be created with the same name as the volume name. + // The encrypted volume will be created with the volume name with "-encrypted" suffix to resolve the naming conflict. + return path.Join(MapperDevPath, GetEncryptVolumeName(volumeName, dataEngine)) + } return path.Join(MapperDevPath, volumeName) } return filepath.Join(DevPath, "longhorn", volumeName) diff --git a/vendor/modules.txt b/vendor/modules.txt index 682b7127ef..6d8cacc995 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -221,7 +221,7 @@ github.com/kylelemons/godebug/diff # github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de ## explicit github.com/liggitt/tabwriter -# github.com/longhorn/backing-image-manager v1.8.0-rc2 +# github.com/longhorn/backing-image-manager v1.8.0-rc3 ## explicit; go 1.23.0 github.com/longhorn/backing-image-manager/api github.com/longhorn/backing-image-manager/pkg/client @@ -261,21 +261,21 @@ github.com/longhorn/go-iscsi-helper/util # github.com/longhorn/go-spdk-helper v0.0.0-20241227145830-6187c6354129 ## explicit; go 1.22.7 github.com/longhorn/go-spdk-helper/pkg/types -# github.com/longhorn/longhorn-engine v1.8.0-rc2 +# github.com/longhorn/longhorn-engine v1.8.0-rc3 ## explicit; go 1.23.0 github.com/longhorn/longhorn-engine/pkg/interceptor github.com/longhorn/longhorn-engine/pkg/meta github.com/longhorn/longhorn-engine/pkg/replica/client github.com/longhorn/longhorn-engine/pkg/types github.com/longhorn/longhorn-engine/pkg/util -# github.com/longhorn/longhorn-instance-manager v1.8.0-rc2 +# github.com/longhorn/longhorn-instance-manager v1.8.0-rc3 ## explicit; go 1.23.0 github.com/longhorn/longhorn-instance-manager/pkg/api github.com/longhorn/longhorn-instance-manager/pkg/client github.com/longhorn/longhorn-instance-manager/pkg/meta github.com/longhorn/longhorn-instance-manager/pkg/types github.com/longhorn/longhorn-instance-manager/pkg/util -# github.com/longhorn/longhorn-share-manager v1.8.0-rc2 +# github.com/longhorn/longhorn-share-manager v1.8.0-rc3 ## explicit; go 1.23.0 github.com/longhorn/longhorn-share-manager/pkg/client github.com/longhorn/longhorn-share-manager/pkg/types