From 1246e2fac71f6c1069c13c5abc88110ca0e13629 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Mon, 4 Nov 2024 14:59:26 +0100 Subject: [PATCH] rebase: update go-ceph to latest commit updating go-ceph to the latest commit to pull the new function to get client address Signed-off-by: Madhu Rajanna --- go.mod | 2 +- go.sum | 4 +-- .../ceph/go-ceph/cephfs/admin/clone.go | 12 ++++++-- .../ceph/go-ceph/rados/rados_getaddrs.go | 30 +++++++++++++++++++ vendor/modules.txt | 2 +- 5 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 vendor/github.com/ceph/go-ceph/rados/rados_getaddrs.go diff --git a/go.mod b/go.mod index 16bd76384..e0a4210ce 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go v1.55.5 github.com/aws/aws-sdk-go-v2/service/sts v1.32.3 github.com/ceph/ceph-csi/api v0.0.0-00010101000000-000000000000 - github.com/ceph/go-ceph v0.30.0 + github.com/ceph/go-ceph v0.30.1-0.20241102143109-75d1af3ed638 github.com/container-storage-interface/spec v1.10.0 github.com/csi-addons/spec v0.2.1-0.20241104111131-27825f744db5 github.com/gemalto/kmip-go v0.0.10 diff --git a/go.sum b/go.sum index 474e77ded..bb20e5024 100644 --- a/go.sum +++ b/go.sum @@ -1445,8 +1445,8 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -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.30.1-0.20241102143109-75d1af3ed638 h1:J/IBLjrHABhgi8okkxodSxhOPPCXhdBSt/i5OjyA9Ug= +github.com/ceph/go-ceph v0.30.1-0.20241102143109-75d1af3ed638/go.mod h1:E2MAGzr1oBwrWpN6OPgQ8fjxqmJAwr4/0+ZixxTvs7A= 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= 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/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/modules.txt b/vendor/modules.txt index 0b21d18b9..a73850409 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -204,7 +204,7 @@ github.com/ceph/ceph-csi/api/deploy/kubernetes/cephfs github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs github.com/ceph/ceph-csi/api/deploy/kubernetes/rbd github.com/ceph/ceph-csi/api/deploy/ocp -# github.com/ceph/go-ceph v0.30.0 +# github.com/ceph/go-ceph v0.30.1-0.20241102143109-75d1af3ed638 ## explicit; go 1.19 github.com/ceph/go-ceph/cephfs github.com/ceph/go-ceph/cephfs/admin