RBD image groups can be used to create consistent snapshots of all
images that are part of the group. The new rbd_clone4() API makes it
possible to create a new RBD image from a single snapshot that was
created as part of the group snapshot.
Signed-off-by: Niels de Vos <ndevos@ibm.com>
The centos 8 stream distribution is now EOL and the yum repo mirrors are
now offline. However, our CI is designed to test older released versions
of ceph where the container images are still using centos 8 stream.
Borrow and adapt a line from the ceph-csi project in order to use the
centos 8 archives (vault) until either we stop testing these versions of
ceph or the ceph project changes the base distro for these release
versions.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
With CentOS Stream 8 reaching end of builds phase most of our ceph
images are migrating their bases to CentOS Stream 9. Since they come
with curl by default in a minimal rpm package we switch to attempt the
install by directly linking the binary than the package name. This is
due to the conflict between curl and curl-minimal packages in CentOS
Stream 9 images.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
We do have a test file named fs_quiesce_reef_test.go to make sure
that the feature is supported only from upcoming squid release. The
'reef' keyword doesn't make sense as the test itself is applicable
for any version prior to squid(upcoming). Therefore use a generic
'unsupported' keyword in the test file name.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
In file include from rbd.go:931
var cMaxSnaps C.int
ret := C.rbd_snap_list(image.image, nil, &cMaxSnaps)
cSnaps := make([]C.rbd_snap_info_t, cMaxSnaps)
It is necessary to determine whether cMaxSnaps is a large 0. Otherwise, the following code will panic
ret = C.rbd_snap_list(image.image,&cSnaps[0], &cMaxSnaps)
Signed-off-by: zxysilent <zxysilent@outlook.com>
With the feature itself getting a backport to upcoming squid release
build tags calls for adjustments so that pre-squid and main CI jobs
can run the real tests from fs_quiesce_test.go. Until the real squid
job is enabled(after ceph squid GA) we could refrain from mentioning
'squid' build tag in those related test files.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
While building an application with the latest version of go-ceph, the
following warning is spit out:
In file included from _cgo_export.c:4:
resize.go:7: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdlib.h:26,
from _cgo_export.c:3:
/usr/include/features.h:292: note: this is the location of the previous definition
292 | # define _POSIX_C_SOURCE 200809L
When _POSIX_C_SOURCE is already defined, ther is no need to define it
again.
Signed-off-by: Niels de Vos <ndevos@ibm.com>
Add a test to verify that an encrypted volume can be resized to
the desired unencrypted size similar to how the rbd command line
tool is documented as able to do.
Fixes: #972
Original-Version-By: Will Gorman <will.gorman@gmail.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This bumps the Go version of the test container to 1.21.8, which is the
oldest supported Go version as of now.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
Add CEPH_VERSION values for squid and pre-squid. This will allow
building and testing with ceph squid images.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
rbd_snap_get_group_namespace() can be used to get details about
snapshots of an image, that were created as part of a group.
Signed-off-by: Niels de Vos <ndevos@ibm.com>
revive v1.3.7 added https://github.com/mgechev/revive/pull/966 which
checks for unused parameters in function literals. This caused several
lint errors in go-ceph code.
Signed-off-by: Manish <myathnal@redhat.com>
It's unusual to put any kind of credentials out in open. The set
of credentials defined with `S3_ACCESS_KEY` and `S3_SECRET_KEY`
variables in the script are questionable in its nature. But these
are not real/valid credential values in any form for AWS rather
used for testing the S3 compatible API from Ceph RGW. Therefore
clarify the intention and replace with sample values from official
AWS documentation.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
Workflow to automatically create a GitHub issue with a template
listing required API updates is in place for a while. Let's remove
the corresponding TODO from the file.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>