go-ceph stopped supporting luminous in v0.6.0. There's no need to
keep the build tag for it any more.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Drop the _mimic from watchers go file and tests go file.
The mimic was not specific to the version supported, just the version
it was new for. Clean up the naming to reflect that.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
go-ceph stopped supporting mimic in v0.7.0. Separate go files for
feature flags added in mimic are no longer needed. Constants and
tests from these files have been moved into the appropriate files.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
go-ceph stopped supporting mimic in v0.7.0. Keeping the constants
that were added in mimic in a standalone file is no longer needed.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
* Add GetMirrorUUID implementing rbd_mirror_uuid_get
This function is be used to get the mirroring uuid for the pool.
Basic tests included.
Signed-off-by: RAJAT SINGH <rajasing@redhat.com>
This adds the function call in the style of an iterator, as the number
of mirrored images in the entire pool could be large. Tests are
included.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
* Add CreateMirrorPeerBootstrapToken implementing rbd_mirror_peer_bootstrap_create
* Add ImportMirrorPeerBootstrapToken implementing rbd_mirror_peer_bootstrap_import
These functions can be used to set up mirroring between pools. Basic tests
included. The tests only verify that functions work, not that they
actually mirror data. That is a job for another day.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
With rbd_deep_copy() an image can be copied with selected options. This
can be used to create a copy and flatten the image in one go.
Updates: ceph/ceph-csi#2077
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This is a complex test as it requires the pool and an image before it
will return any (non empty) data.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
These are the functions that let one administrate the snapshot schedules
for mirrored pools and images.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Adds types to work with the ceph cluster (the admin type) and a type
to work with the "level spec" - which is unfortunately not well
described in the ceph docs, but I think I worked it out well enough
by reading the ceph sources.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This package will be used for issuing json commands to the mgr (or
mons, etc) that perform background tasks to administrate rbd pools,
images, etc.
This commit just adds a doc.go as a stub.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
* Add SetMirrorSiteName implementing rbd_mirror_site_name_set
* Add GetMirrorSiteName implementing rbd_mirror_site_name_get
These functions are used to set the name of the site (for an entire
cluster) for rbd mirroring purposes. It's a bit strange that it's
part of rdb and not rados, but such is life.
Tests included.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The MirrorImageStatusSummary returns a map of image mirroring states to
the number of images in those states or an error.
Tests of both the basic conditions and actual mirrored images are added.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This change uses slices on top of C allocated array memory in order
to have a simple (no pointer arithmetic) and safe (boundary-checked)
access to its elements.
Signed-off-by: Sven Anderson <sven@redhat.com>
Unless these apis are deprecated in the (far?) future it is safer to say
"not nautilus" rather than explicitly tag all current and future ceph
release codenames.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
With the infrastructure for running two ceph clusters now available,
we add tests to ensure the functionality of GetGlobalMirrorStatus in
the more typical case, when one or more mirroring clusters exist,
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This function can be used to connect to a non-default ceph cluster,
in a simple, convenient way similar to the function we have for
connecting to the default cluster.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This function is used to "manually" trigger a snapshot for snapshot
based mirroring. It is needed as a pre-req to test actual cross-cluster
mirroring and the full functionality of GetGlobalMirrorStatus.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This function is added, along with required return types and some helper
functions, to support fetching the global mirroring status component
that makes up a major part of `rbd mirror image status` command's
output.
Signed-off-by: John Mulligan <jmulligan@redhat.com>