Enable the squid ci job now that the squid RC is available. This won't
be required for merge until after the full release.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Some versions of librbd provide the rbd_clone4 function, and others do
not. Squid will have the function backported in the 1st update, the
initial release of Squid does not have it. This makes checking for the
function based on the named Ceph version impractical.
With the new dlsym.LookupSymbol() function, it is now possible to check
the availability of rbd_clone4 during runtime. If the symbol is not
found ErrNotImplemented is returned, which can be used to detect the
unavailability of the function.
Signed-off-by: Niels de Vos <ndevos@ibm.com>
When there is a failure during the CloneFromGroupSnap test case, the
rbd-group snapshot was not removed, preventing images from being deleted
as well.
Signed-off-by: Niels de Vos <ndevos@ibm.com>
The dlsym package provides LookupSymbol() which resolves a named symbol
(like "rbd_clone4") and returns a unsafe.Pointer to it. The caller is
expected to cast the symbol to function that can be called.
Signed-off-by: Niels de Vos <ndevos@ibm.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>
Remove nautilus from the make file's "known ceph codenames". This
change goes along with the removal of nautilus from the CI as
the makefile is really only used by developers/contributors and
not by codebases that use go-ceph.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This change removes nautilus from our github CI tests.
The original plan was to remove nautilus from our test matrix when Ceph
Squid was released. However, while Squid is not released yet, it is very
very soon. In the meantime, CentOS 7 is now EOL and the container images
for nautilus can not be updated. From the Ceph POV nautilus has been
long unsupported and they will not be making any changes to the base OS
for nautilus images. We have no desire to do workarounds for the EOLing
of CentOS7 either. As such we're ending direct support for nautilus a
little early but not by much.
Note that this is only disabling our testing of nautilus - we're not
going to be stripping the build tag from the sources. But we will no
longer require new code to to add it either.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
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>