diff --git a/CHANGELOG.md b/CHANGELOG.md index f92ca56..9288e25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Breaking + +- Update golinstor to support LINSTOR 1.26.0, removing support for Openflex layers. + ## [1.3.1] - 2024-01-30 ### Changed diff --git a/go.mod b/go.mod index 91ae67f..0bac2ee 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21 toolchain go1.21.5 require ( - github.com/LINBIT/golinstor v0.49.0 + github.com/LINBIT/golinstor v0.50.0 github.com/container-storage-interface/spec v1.9.0 github.com/haySwim/data v0.2.0 github.com/kubernetes-csi/csi-test/v5 v5.2.0 @@ -22,7 +22,7 @@ require ( k8s.io/apimachinery v0.29.1 k8s.io/client-go v0.29.1 k8s.io/mount-utils v0.29.1 - k8s.io/utils v0.0.0-20230726121419-3b25d923346b + k8s.io/utils v0.0.0-20240102154912-e7106e64919e ) require ( @@ -66,11 +66,11 @@ require ( golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.17.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/klog/v2 v2.120.1 // indirect - k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/kube-openapi v0.0.0-20240126223410-2919ad4fcfec // indirect moul.io/http2curl/v2 v2.3.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect diff --git a/go.sum b/go.sum index b785a98..2f8a278 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/LINBIT/golinstor v0.49.0 h1:2Q5u0mjB+vMA8xkFfB04eT09qg1wFRxnmS1SkfK4Jr0= -github.com/LINBIT/golinstor v0.49.0/go.mod h1:wwtsHgmgK/+Kz0g3uJoEljqBEsEfmnCXvM64JcyuiwU= +github.com/LINBIT/golinstor v0.50.0 h1:WLdk+Jca/6BSOgmGaFqYrGEZlh0D7kjps4ak20Ntj80= +github.com/LINBIT/golinstor v0.50.0/go.mod h1:MCkHNdHxoGw4mnt8DGsSqWNF5ZGhYFy6Lr4tQLyVBs0= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= @@ -179,8 +179,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= @@ -207,12 +207,12 @@ k8s.io/client-go v0.29.1 h1:19B/+2NGEwnFLzt0uB5kNJnfTsbV8w6TgQRz9l7ti7A= k8s.io/client-go v0.29.1/go.mod h1:TDG/psL9hdet0TI9mGyHJSgRkW3H9JZk2dNEUS7bRks= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/kube-openapi v0.0.0-20240126223410-2919ad4fcfec h1:iGTel2aR8vCZdxJDgmbeY0zrlXy9Qcvyw4R2sB4HLrA= +k8s.io/kube-openapi v0.0.0-20240126223410-2919ad4fcfec/go.mod h1:Pa1PvrP7ACSkuX6I7KYomY6cmMA0Tx86waBhDUgoKPw= k8s.io/mount-utils v0.29.1 h1:veXlIm52Y4tm3H0pG03cOdkw0KOJxYDa0fQqhJCoqvQ= k8s.io/mount-utils v0.29.1/go.mod h1:9IWJTMe8tG0MYMLEp60xK9GYVeCdA3g4LowmnVi+t9Y= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs= moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/pkg/client/linstor.go b/pkg/client/linstor.go index a91929c..7ca946f 100644 --- a/pkg/client/linstor.go +++ b/pkg/client/linstor.go @@ -568,7 +568,7 @@ func (s *Linstor) Attach(ctx context.Context, volId, node string, rwxBlock bool) // getDisklessFlag inspects a resource to determine the right diskless flag to use. func getDisklessFlag(resource *lapi.Resource) string { - layer := &resource.LayerObject + layer := resource.LayerObject for layer != nil { switch layer.Type { @@ -1770,7 +1770,7 @@ func NodesAndConditionFromResources(ress []lapi.Resource) ([]string, *csi.Volume continue } - drbd := util.GetDrbdLayer(&res.LayerObject) + drbd := util.GetDrbdLayer(res.LayerObject) if drbd != nil && drbd.PromotionScore == 0 { abnormalNodes = append(abnormalNodes, res.NodeName) } diff --git a/pkg/linstor/util/util.go b/pkg/linstor/util/util.go index d8b51fa..188a169 100644 --- a/pkg/linstor/util/util.go +++ b/pkg/linstor/util/util.go @@ -97,7 +97,7 @@ nextCandidate: func GetDrbdLayer(layer *lapi.ResourceLayer) *lapi.DrbdResource { if layer.Type == devicelayerkind.Drbd { - return &layer.Drbd + return layer.Drbd } for i := range layer.Children { diff --git a/pkg/volume/parameter.go b/pkg/volume/parameter.go index 9b68ab8..5412c0b 100644 --- a/pkg/volume/parameter.go +++ b/pkg/volume/parameter.go @@ -361,7 +361,7 @@ func (params *Parameters) DisklessFlag() (string, error) { switch l { case devicelayerkind.Drbd: return lc.FlagDrbdDiskless, nil - case devicelayerkind.Nvme, devicelayerkind.Openflex: + case devicelayerkind.Nvme: return lc.FlagNvmeInitiator, nil default: continue @@ -382,7 +382,6 @@ func ParseLayerList(s string) ([]devicelayerkind.DeviceLayerKind, error) { devicelayerkind.Nvme, devicelayerkind.Cache, devicelayerkind.Writecache, - devicelayerkind.Openflex, devicelayerkind.Exos, } diff --git a/pkg/volume/volume_test.go b/pkg/volume/volume_test.go index d44e41a..8d7e321 100644 --- a/pkg/volume/volume_test.go +++ b/pkg/volume/volume_test.go @@ -76,12 +76,6 @@ func TestDisklessFlag(t *testing.T) { expected: lc.FlagNvmeInitiator, isError: false, }, - { - name: "openflex-like-nvme", - params: volume.Parameters{LayerList: []devicelayerkind.DeviceLayerKind{devicelayerkind.Openflex, devicelayerkind.Storage}}, - expected: lc.FlagNvmeInitiator, - isError: false, - }, { name: "no-diskless-layer", params: volume.Parameters{LayerList: []devicelayerkind.DeviceLayerKind{devicelayerkind.Cache, devicelayerkind.Storage}},