All the C functions needed by cephfs/admin package come from
one of the other go-ceph packages (rados, cephfs, etc) there's
no good reason to have this unused import in these files.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Now that we have support for testing APIs from pre-release Ceph
versions lets convert the current 'ceph_ci_untested' tag into
corresponding pre-release version tags.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
When run against Ceph built out of 'main' development branch our
test-suite fails to find corresponding code name. Therefore we
include 'main' also to the expected list of versions.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
When archiving, use the latest version of the archive action and use
it's ability to archive an entire directory.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This change follows the upstream deprecation of AT_NO_ATTR_SYNC in
favor of the standard AT_STATX_DONT_SYNC.
Fixes: #741
Signed-off-by: Sven Anderson <sven@redhat.com>
Lower the frequency of updates. The monthly update is documented to
occur on the first of the month, which works better with our
every-other-month release cadence.
Automatically apply the "no-API" label. Do not add a rebase label, which
has not relevance to the go-ceph workflow.
Use the prefix "go-ceph:" which is what we normally use for changes only
to the go.mode, etc.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add support for getting the alignment (stripe size) in bytes for pools that require/support it.
Fixes#739
This commit adds two new API calls to IOContext, one to know if the pool requires alignment and
the second one to get the stripe size in bytes:
RequiresAlignment() (bool, error)
Alignment() (uint64, error)
Signed-off-by: Daniel M. Lambea <dmlambea@tenerife.es>
Don't change the build tags variable to include the -tags option at the
start. It's a bit confusing. Replace it with a function that returns
the option + the tags themselves for use on a go command line.
This fixes the remaining shellcheck errors in entrypoint.sh.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Because the package name should be a proper "list" and is used in
multiple places, take shellcheck's warning to heart and replace it
with a proper bash array. Use a common function for generating said
array.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
For this one single case, it feels like overkill to use an array
or other fancy technique. Just silence shellcheck on this instance.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This change add a new bucket struct field, so we can use rgw.admin.API.GetBucketInfo()
to get a bucket's num_shards.
Format bucket.go.
Signed-off-by: oneto1 <644739768@qq.com>
The librbd API for mirroring-related operations changed substantially between
Nautilus and Octopus. Due to this, go-ceph had previously only implemented
mirroring functionality if built against Octopus client libraries. This patch
implements equivalent functionality for use with Nautilus clients.
Signed-off-by: Sanford Miller <smiller@digitalocean.com>
Updates the Go version of the module with `go mod tidy -go 1.17`,
which also adds some explicit requirements in order to support lazy
module loading.
Signed-off-by: Sven Anderson <sven@redhat.com>
Following the mirroring setup there used to be a file named 'token'
holding the bootstrap token left out in sources. We could instead
provide the token via standard output and display it for any further
debugging purpose.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
Because we have a finalizer configured for Conn that cleans up Ceph
resources, it's important that we don't let it get GC'd before anything
that depends on it has been cleaned up. Since clients are free to hold a
reference to an IOContext without maintaining a reference to the
underlying Conn, we hold such a Conn reference within the IOContext to
signal this dependency to the Go GC.
Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
:= is not capable of accepting values(for variables) from execution
environment. Therefore replace := with ?= for completeness.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
We will (most probably) remove non-ptrguard code before the next
release. Let's skip the tests already now, because they double the
likelihood of failing flaky tests.
Signed-off-by: Sven Anderson <sven@redhat.com>
The code causing this issue has been packported to pacific and blocks
the CI. We need to temporarily disable for pacific as well.
Signed-off-by: Sven Anderson <sven@redhat.com>
Ceph version is already available from CEPH_VERSION env variable.
CEPH_TAG on the other hand is only defined to determine the tag for
ceph base image and seems to be unused in the resulting go-ceph
container image.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
"quincy" is already out which will then make "octopus" EOL very soon.
Therefore default to "pacific" instead.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
This removes the limit on the max buffer size GetImageNames is willing to pass
to rbd_list2, which is somewhat arbitrary and is too small for large clusters.
GetImageNames will continue to start with a small buffer size and retry with a
larger buffer if rbd_list2 returns ERANGE (just without a cap on the max buffer
size it's willing to go to).
Signed-off-by: Sanford Miller <smiller@digitalocean.com>