From 3b6959ea0fb1e907140cd54609f1a81ae3232f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Mon, 24 Feb 2025 11:17:06 +0100 Subject: [PATCH] Bump reva --- go.mod | 10 +++---- go.sum | 20 ++++++------- .../ceph/go-ceph/cephfs/admin/clone.go | 12 ++++++-- .../github.com/ceph/go-ceph/cephfs/errors.go | 3 ++ .../ceph/go-ceph/internal/retry/sizer.go | 10 +++---- .../ceph/go-ceph/rados/rados_getaddrs.go | 30 +++++++++++++++++++ .../ceph/go-ceph/rados/read_op_exec.go | 3 -- .../ceph/go-ceph/rados/write_op_exec.go | 3 -- .../v2/pkg/storage/fs/posix/lookup/lookup.go | 11 ++----- .../pkg/storage/fs/posix/tree/assimilation.go | 20 ++++++------- .../pkg/storage/pkg/decomposedfs/revisions.go | 18 +++++------ .../go.etcd.io/etcd/api/v3/version/version.go | 2 +- vendor/go.etcd.io/etcd/client/v3/README.md | 7 ----- vendor/go.etcd.io/etcd/client/v3/lease.go | 12 +++++++- vendor/modules.txt | 12 ++++---- 15 files changed, 101 insertions(+), 72 deletions(-) create mode 100644 vendor/github.com/ceph/go-ceph/rados/rados_getaddrs.go diff --git a/go.mod b/go.mod index b263797d0..d238b1f9c 100644 --- a/go.mod +++ b/go.mod @@ -65,7 +65,7 @@ require ( github.com/onsi/ginkgo/v2 v2.22.2 github.com/onsi/gomega v1.36.2 github.com/open-policy-agent/opa v1.1.0 - github.com/opencloud-eu/reva/v2 v2.27.3-0.20250220094822-4ffb9dbabef5 + github.com/opencloud-eu/reva/v2 v2.27.3-0.20250220153133-2081521720f4 github.com/orcaman/concurrent-map v1.0.0 github.com/owncloud/libre-graph-api-go v1.0.5-0.20240829135935-80dc00d6f5ea github.com/pkg/errors v0.9.1 @@ -155,7 +155,7 @@ require ( github.com/bluele/gcache v0.0.2 // indirect github.com/bombsimon/logrusr/v3 v3.1.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/ceph/go-ceph v0.30.0 // indirect + github.com/ceph/go-ceph v0.32.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cevaris/ordered_map v0.0.0-20190319150403-3adeae072e73 // indirect github.com/cloudflare/circl v1.3.7 // indirect @@ -309,9 +309,9 @@ require ( github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect github.com/yashtewari/glob-intersection v0.2.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.16 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.16 // indirect - go.etcd.io/etcd/client/v3 v3.5.16 // indirect + go.etcd.io/etcd/api/v3 v3.5.18 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.18 // indirect + go.etcd.io/etcd/client/v3 v3.5.18 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect diff --git a/go.sum b/go.sum index 8e13db4db..73a2da2e2 100644 --- a/go.sum +++ b/go.sum @@ -204,8 +204,8 @@ github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK3 github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/ceph/go-ceph v0.30.0 h1:p/+rNnn9dUByrDhXfBFilVriRZKJghMJcts8N2wQ+ws= -github.com/ceph/go-ceph v0.30.0/go.mod h1:OJFju/Xmtb7ihHo/aXOayw6RhVOUGNke5EwTipwaf6A= +github.com/ceph/go-ceph v0.32.0 h1:iXRUGdPmH7h9Vf/WA1Dg3Wo1tgL7gcUbylfpbxrlGLs= +github.com/ceph/go-ceph v0.32.0/go.mod h1:42eoJzyLS3VREzqrg2ot44NtuluQZi55hFRSoLF36GQ= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -860,8 +860,8 @@ github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= github.com/open-policy-agent/opa v1.1.0 h1:HMz2evdEMTyNqtdLjmu3Vyx06BmhNYAx67Yz3Ll9q2s= github.com/open-policy-agent/opa v1.1.0/go.mod h1:T1pASQ1/vwfTa+e2fYcfpLCvWgYtqtiUv+IuA/dLPQs= -github.com/opencloud-eu/reva/v2 v2.27.3-0.20250220094822-4ffb9dbabef5 h1:NneyFex0hIS+rJzzQkb61wIsKAO/ubwSOJaghYvTCpg= -github.com/opencloud-eu/reva/v2 v2.27.3-0.20250220094822-4ffb9dbabef5/go.mod h1:CxSyCOgUD/IJV2YdUhunkVrsrMDhT/84I9uwhk//XxM= +github.com/opencloud-eu/reva/v2 v2.27.3-0.20250220153133-2081521720f4 h1:uV5++OW0uDBe+n8Bnh8P0scNiZQisnKWoFZYLyYzhvU= +github.com/opencloud-eu/reva/v2 v2.27.3-0.20250220153133-2081521720f4/go.mod h1:GJE98Psk3SKJqQm+YHsrPB+b52aIaJCr4rCZplPZrJI= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= @@ -1139,12 +1139,12 @@ github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.4.0 h1:TU77id3TnN/zKr7CO/uk+fBCwF2jGcMuw2B/FMAzYIk= go.etcd.io/bbolt v1.4.0/go.mod h1:AsD+OCi/qPN1giOX1aiLAha3o1U8rAz65bvN4j0sRuk= -go.etcd.io/etcd/api/v3 v3.5.16 h1:WvmyJVbjWqK4R1E+B12RRHz3bRGy9XVfh++MgbN+6n0= -go.etcd.io/etcd/api/v3 v3.5.16/go.mod h1:1P4SlIP/VwkDmGo3OlOD7faPeP8KDIFhqvciH5EfN28= -go.etcd.io/etcd/client/pkg/v3 v3.5.16 h1:ZgY48uH6UvB+/7R9Yf4x574uCO3jIx0TRDyetSfId3Q= -go.etcd.io/etcd/client/pkg/v3 v3.5.16/go.mod h1:V8acl8pcEK0Y2g19YlOV9m9ssUe6MgiDSobSoaBAM0E= -go.etcd.io/etcd/client/v3 v3.5.16 h1:sSmVYOAHeC9doqi0gv7v86oY/BTld0SEFGaxsU9eRhE= -go.etcd.io/etcd/client/v3 v3.5.16/go.mod h1:X+rExSGkyqxvu276cr2OwPLBaeqFu1cIl4vmRjAD/50= +go.etcd.io/etcd/api/v3 v3.5.18 h1:Q4oDAKnmwqTo5lafvB+afbgCDF7E35E4EYV2g+FNGhs= +go.etcd.io/etcd/api/v3 v3.5.18/go.mod h1:uY03Ob2H50077J7Qq0DeehjM/A9S8PhVfbQ1mSaMopU= +go.etcd.io/etcd/client/pkg/v3 v3.5.18 h1:mZPOYw4h8rTk7TeJ5+3udUkfVGBqc+GCjOJYd68QgNM= +go.etcd.io/etcd/client/pkg/v3 v3.5.18/go.mod h1:BxVf2o5wXG9ZJV+/Cu7QNUiJYk4A29sAhoI5tIRsCu4= +go.etcd.io/etcd/client/v3 v3.5.18 h1:nvvYmNHGumkDjZhTHgVU36A9pykGa2K4lAJ0yY7hcXA= +go.etcd.io/etcd/client/v3 v3.5.18/go.mod h1:kmemwOsPU9broExyhYsBxX4spCTDX3yLgPMWtpBXG6E= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= diff --git a/vendor/github.com/ceph/go-ceph/cephfs/admin/clone.go b/vendor/github.com/ceph/go-ceph/cephfs/admin/clone.go index d8281359c..9a00402fe 100644 --- a/vendor/github.com/ceph/go-ceph/cephfs/admin/clone.go +++ b/vendor/github.com/ceph/go-ceph/cephfs/admin/clone.go @@ -81,10 +81,18 @@ type CloneSource struct { Snapshot string `json:"snapshot"` } +// CloneProgressReport contains the progress report of a subvolume clone. +type CloneProgressReport struct { + PercentageCloned string `json:"percentage cloned"` + AmountCloned string `json:"amount cloned"` + FilesCloned string `json:"files cloned"` +} + // CloneStatus reports on the status of a subvolume clone. type CloneStatus struct { - State CloneState `json:"state"` - Source CloneSource `json:"source"` + State CloneState `json:"state"` + Source CloneSource `json:"source"` + ProgressReport CloneProgressReport `json:"progress_report"` // failure can be obtained through .GetFailure() failure *CloneFailure diff --git a/vendor/github.com/ceph/go-ceph/cephfs/errors.go b/vendor/github.com/ceph/go-ceph/cephfs/errors.go index ab28f0921..5643499ab 100644 --- a/vendor/github.com/ceph/go-ceph/cephfs/errors.go +++ b/vendor/github.com/ceph/go-ceph/cephfs/errors.go @@ -37,6 +37,9 @@ var ( ErrNotConnected = getError(-C.ENOTCONN) // ErrNotExist indicates a non-specific missing resource. ErrNotExist = getError(-C.ENOENT) + // ErrOpNotSupported is returned in general for operations that are not + // supported. + ErrOpNotSupported = getError(-C.EOPNOTSUPP) // Private errors: diff --git a/vendor/github.com/ceph/go-ceph/internal/retry/sizer.go b/vendor/github.com/ceph/go-ceph/internal/retry/sizer.go index 5b27e5103..df427cf03 100644 --- a/vendor/github.com/ceph/go-ceph/internal/retry/sizer.go +++ b/vendor/github.com/ceph/go-ceph/internal/retry/sizer.go @@ -43,13 +43,13 @@ type SizeFunc func(size int) (hint Hint) // DoubleSize or indicating a size not greater than the current size, the size // is doubled. If the hint or next size is greater than the max size, the max // size is used for a last retry. -func WithSizes(size int, max int, f SizeFunc) { - if size > max { +func WithSizes(size int, maxSize int, f SizeFunc) { + if size > maxSize { return } for { hint := f(size) - if hint == nil || size == max { + if hint == nil || size == maxSize { break } if hint.size() > size { @@ -57,8 +57,8 @@ func WithSizes(size int, max int, f SizeFunc) { } else { size *= 2 } - if size > max { - size = max + if size > maxSize { + size = maxSize } } } diff --git a/vendor/github.com/ceph/go-ceph/rados/rados_getaddrs.go b/vendor/github.com/ceph/go-ceph/rados/rados_getaddrs.go new file mode 100644 index 000000000..093e373d4 --- /dev/null +++ b/vendor/github.com/ceph/go-ceph/rados/rados_getaddrs.go @@ -0,0 +1,30 @@ +//go:build ceph_preview + +package rados + +// #cgo LDFLAGS: -lrados +// #include +// #include +import "C" + +import ( + "unsafe" +) + +// GetAddrs returns the addresses of the RADOS session, +// suitable for blocklisting. +// +// Implements: +// +// int rados_getaddrs(rados_t cluster, char **addrs) +func (c *Conn) GetAddrs() (string, error) { + var cAddrs *C.char + defer C.free(unsafe.Pointer(cAddrs)) + + ret := C.rados_getaddrs(c.cluster, &cAddrs) + if ret < 0 { + return "", getError(ret) + } + + return C.GoString(cAddrs), nil +} diff --git a/vendor/github.com/ceph/go-ceph/rados/read_op_exec.go b/vendor/github.com/ceph/go-ceph/rados/read_op_exec.go index 44d6d18e8..d2fd7d824 100644 --- a/vendor/github.com/ceph/go-ceph/rados/read_op_exec.go +++ b/vendor/github.com/ceph/go-ceph/rados/read_op_exec.go @@ -1,6 +1,3 @@ -//go:build ceph_preview -// +build ceph_preview - package rados // #cgo LDFLAGS: -lrados diff --git a/vendor/github.com/ceph/go-ceph/rados/write_op_exec.go b/vendor/github.com/ceph/go-ceph/rados/write_op_exec.go index 8f7fc07f3..162203045 100644 --- a/vendor/github.com/ceph/go-ceph/rados/write_op_exec.go +++ b/vendor/github.com/ceph/go-ceph/rados/write_op_exec.go @@ -1,6 +1,3 @@ -//go:build ceph_preview -// +build ceph_preview - package rados // #cgo LDFLAGS: -lrados diff --git a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/lookup/lookup.go b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/lookup/lookup.go index 9e2bc5b13..a043b81dd 100644 --- a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/lookup/lookup.go +++ b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/lookup/lookup.go @@ -49,7 +49,6 @@ const RevisionsDir = ".oc-nodes" var _spaceTypePersonal = "personal" var _spaceTypeProject = "project" -var _currentSuffix = ".current" func init() { tracer = otel.Tracer("github.com/cs3org/reva/pkg/storage/pkg/decomposedfs/lookup") @@ -279,18 +278,12 @@ func (lu *Lookup) InternalRoot() string { // InternalPath returns the internal path for a given ID func (lu *Lookup) InternalPath(spaceID, nodeID string) string { - if strings.Contains(nodeID, node.RevisionIDDelimiter) { + if strings.Contains(nodeID, node.RevisionIDDelimiter) || strings.HasSuffix(nodeID, node.CurrentIDDelimiter) { spaceRoot, _ := lu.IDCache.Get(context.Background(), spaceID, spaceID) if len(spaceRoot) == 0 { return "" } return filepath.Join(spaceRoot, RevisionsDir, Pathify(nodeID, 4, 2)) - } else if strings.HasSuffix(nodeID, node.CurrentIDDelimiter) { - spaceRoot, _ := lu.IDCache.Get(context.Background(), spaceID, spaceID) - if len(spaceRoot) == 0 { - return "" - } - filepath.Join(spaceRoot, RevisionsDir, Pathify(nodeID, 4, 2)+_currentSuffix) } path, _ := lu.IDCache.Get(context.Background(), spaceID, nodeID) @@ -315,7 +308,7 @@ func (lu *Lookup) CurrentPath(spaceID, nodeID string) string { return "" } - return filepath.Join(spaceRoot, RevisionsDir, Pathify(nodeID, 4, 2)+_currentSuffix) + return filepath.Join(spaceRoot, RevisionsDir, Pathify(nodeID, 4, 2)+node.CurrentIDDelimiter) } // refFromCS3 creates a CS3 reference from a set of bytes. This method should remain private diff --git a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/assimilation.go b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/assimilation.go index 02f77fd97..b85418f2a 100644 --- a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/assimilation.go +++ b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/assimilation.go @@ -381,17 +381,6 @@ func (t *Tree) assimilate(item scanItem) error { return err } - // compare metadata mtime with actual mtime. if it matches we can skip the assimilation because the file was handled by us - fi, err := os.Stat(item.Path) - if err == nil { - // FIXME the mtime does not change on a move, so we have to compare ctime - stat := fi.Sys().(*syscall.Stat_t) - ctime := time.Unix(int64(stat.Ctim.Sec), int64(stat.Ctim.Nsec)) - if mtime.Equal(ctime) && !item.ForceRescan { - return nil - } - } - if id != "" { // the file has an id set, we already know it from the past n := node.NewBaseNode(spaceID, id, t.lookup) @@ -399,6 +388,15 @@ func (t *Tree) assimilate(item scanItem) error { previousPath, ok := t.lookup.(*lookup.Lookup).GetCachedID(context.Background(), spaceID, string(id)) previousParentID, _ := t.lookup.MetadataBackend().Get(context.Background(), n, prefixes.ParentidAttr) + // compare metadata mtime with actual mtime. if it matches AND the path hasn't changed (move operation) + // we can skip the assimilation because the file was handled by us + fi, err := os.Stat(item.Path) + if err == nil && previousPath == item.Path { + if mtime.Equal(fi.ModTime()) { + return nil + } + } + // was it moved or copied/restored with a clashing id? if ok && len(previousParentID) > 0 && previousPath != item.Path { _, err := os.Stat(previousPath) diff --git a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/revisions.go b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/revisions.go index de09c9222..0ae490dda 100644 --- a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/revisions.go +++ b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/revisions.go @@ -120,9 +120,17 @@ func (fs *Decomposedfs) RestoreRevision(ctx context.Context, ref *provider.Refer return err } + // revision 5, current 10 (restore a smaller blob) -> 5-10 = -5 + // revision 10, current 5 (restore a bigger blob) -> 10-5 = +5 + revisionNode := node.NewBaseNode(spaceID, revisionKey, fs.lu) + revisionSize, err := fs.lu.MetadataBackend().GetInt64(ctx, revisionNode, prefixes.BlobsizeAttr) + if err != nil { + return errtypes.InternalError("failed to read blob size xattr from old revision") + } + sizeDiff := revisionSize - n.Blobsize + // restore revision restoredRevisionPath := fs.lu.InternalPath(spaceID, revisionKey) - revisionNode := node.NewBaseNode(spaceID, revisionKey, fs.lu) if err := fs.tp.RestoreRevision(ctx, revisionNode, n); err != nil { return err } @@ -141,14 +149,6 @@ func (fs *Decomposedfs) RestoreRevision(ctx context.Context, ref *provider.Refer log.Warn().Err(err).Interface("ref", ref).Str("originalnode", kp[0]).Str("revisionKey", revisionKey).Msg("could not purge old revision from cache, continuing") } - // revision 5, current 10 (restore a smaller blob) -> 5-10 = -5 - // revision 10, current 5 (restore a bigger blob) -> 10-5 = +5 - revisionSize, err := fs.lu.MetadataBackend().GetInt64(ctx, revisionNode, prefixes.BlobsizeAttr) - if err != nil { - return errtypes.InternalError("failed to read blob size xattr from old revision") - } - sizeDiff := revisionSize - n.Blobsize - return fs.tp.Propagate(ctx, n, sizeDiff) } diff --git a/vendor/go.etcd.io/etcd/api/v3/version/version.go b/vendor/go.etcd.io/etcd/api/v3/version/version.go index 36719c192..15c99a2c2 100644 --- a/vendor/go.etcd.io/etcd/api/v3/version/version.go +++ b/vendor/go.etcd.io/etcd/api/v3/version/version.go @@ -26,7 +26,7 @@ import ( var ( // MinClusterVersion is the min cluster version this etcd binary is compatible with. MinClusterVersion = "3.0.0" - Version = "3.5.16" + Version = "3.5.18" APIVersion = "unknown" // Git SHA Value will be set during build diff --git a/vendor/go.etcd.io/etcd/client/v3/README.md b/vendor/go.etcd.io/etcd/client/v3/README.md index 1e037d7eb..16c0fe888 100644 --- a/vendor/go.etcd.io/etcd/client/v3/README.md +++ b/vendor/go.etcd.io/etcd/client/v3/README.md @@ -11,13 +11,6 @@ go get go.etcd.io/etcd/client/v3 ``` -Warning: As etcd 3.5.0 was not yet released, the command above does not work. -After first pre-release of 3.5.0 [#12498](https://github.com/etcd-io/etcd/issues/12498), -etcd can be referenced using: -``` -go get go.etcd.io/etcd/client/v3@v3.5.0-pre -``` - ## Get started Create client using `clientv3.New`: diff --git a/vendor/go.etcd.io/etcd/client/v3/lease.go b/vendor/go.etcd.io/etcd/client/v3/lease.go index 4e7d1caf8..4877ee949 100644 --- a/vendor/go.etcd.io/etcd/client/v3/lease.go +++ b/vendor/go.etcd.io/etcd/client/v3/lease.go @@ -263,6 +263,12 @@ func (l *lessor) Leases(ctx context.Context) (*LeaseLeasesResponse, error) { return nil, ContextError(ctx, err) } +// To identify the context passed to `KeepAlive`, a key/value pair is +// attached to the context. The key is a `keepAliveCtxKey` object, and +// the value is the pointer to the context object itself, ensuring +// uniqueness as each context has a unique memory address. +type keepAliveCtxKey struct{} + func (l *lessor) KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAliveResponse, error) { ch := make(chan *LeaseKeepAliveResponse, LeaseResponseChSize) @@ -277,6 +283,10 @@ func (l *lessor) KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAl default: } ka, ok := l.keepAlives[id] + + if ctx.Done() != nil { + ctx = context.WithValue(ctx, keepAliveCtxKey{}, &ctx) + } if !ok { // create fresh keep alive ka = &keepAlive{ @@ -347,7 +357,7 @@ func (l *lessor) keepAliveCtxCloser(ctx context.Context, id LeaseID, donec <-cha // close channel and remove context if still associated with keep alive for i, c := range ka.ctxs { - if c == ctx { + if c.Value(keepAliveCtxKey{}) == ctx.Value(keepAliveCtxKey{}) { close(ka.chs[i]) ka.ctxs = append(ka.ctxs[:i], ka.ctxs[i+1:]...) ka.chs = append(ka.chs[:i], ka.chs[i+1:]...) diff --git a/vendor/modules.txt b/vendor/modules.txt index f10d8742a..39cb694e3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -274,8 +274,8 @@ github.com/cenkalti/backoff # github.com/cenkalti/backoff/v4 v4.3.0 ## explicit; go 1.18 github.com/cenkalti/backoff/v4 -# github.com/ceph/go-ceph v0.30.0 -## explicit; go 1.19 +# github.com/ceph/go-ceph v0.32.0 +## explicit; go 1.21 github.com/ceph/go-ceph/cephfs github.com/ceph/go-ceph/cephfs/admin github.com/ceph/go-ceph/common/admin/manager @@ -1189,7 +1189,7 @@ github.com/open-policy-agent/opa/v1/types github.com/open-policy-agent/opa/v1/util github.com/open-policy-agent/opa/v1/util/decoding github.com/open-policy-agent/opa/v1/version -# github.com/opencloud-eu/reva/v2 v2.27.3-0.20250220094822-4ffb9dbabef5 +# github.com/opencloud-eu/reva/v2 v2.27.3-0.20250220153133-2081521720f4 ## explicit; go 1.23.1 github.com/opencloud-eu/reva/v2/cmd/revad/internal/grace github.com/opencloud-eu/reva/v2/cmd/revad/runtime @@ -1956,7 +1956,7 @@ go.etcd.io/bbolt go.etcd.io/bbolt/errors go.etcd.io/bbolt/internal/common go.etcd.io/bbolt/internal/freelist -# go.etcd.io/etcd/api/v3 v3.5.16 +# go.etcd.io/etcd/api/v3 v3.5.18 ## explicit; go 1.22 go.etcd.io/etcd/api/v3/authpb go.etcd.io/etcd/api/v3/etcdserverpb @@ -1964,12 +1964,12 @@ go.etcd.io/etcd/api/v3/membershippb go.etcd.io/etcd/api/v3/mvccpb go.etcd.io/etcd/api/v3/v3rpc/rpctypes go.etcd.io/etcd/api/v3/version -# go.etcd.io/etcd/client/pkg/v3 v3.5.16 +# go.etcd.io/etcd/client/pkg/v3 v3.5.18 ## explicit; go 1.22 go.etcd.io/etcd/client/pkg/v3/logutil go.etcd.io/etcd/client/pkg/v3/systemd go.etcd.io/etcd/client/pkg/v3/types -# go.etcd.io/etcd/client/v3 v3.5.16 +# go.etcd.io/etcd/client/v3 v3.5.18 ## explicit; go 1.22 go.etcd.io/etcd/client/v3 go.etcd.io/etcd/client/v3/credentials