Add some prose to the hints doc on how to use our docs convention to
map a C/command line api to a go-ceph api.
Note how to make use of a {Mon,Mgr}Command API JSON-command without
go-ceph code.
Note how apis start as preview before becoming stable.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
package_test.go merely tested whether package import at the start of
source files worked or not which got added in the early days of the
project. With the progress made so far this import check is no longer
relevant or useful these days. Therefore remove it from the repository.
Signed-off-by: Anoop C S <anoopcs@samba.org>
Removed the `LastSeen` property of MirrorPeerSite struct as it is not being set/updated anywhere by the ceph API.
Fixes: #870
Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
Added new locking APIs for the rbd component named
`rbd_lock_acquire`, `rbd_lock_break`, `rbd_lock_release`, `rbd_lock_get_owners`,
`rbd_is_exclusive_lock_owner` along with supporting TCs.
Fixes: #275
Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
We overlooked this in review, before this makes it into a release let's
remove the referential redundancy with rapidity.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
As discussed in #851, we wanted to fully document the arguments the
callback function is expected to be called with.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Recent changes to ceph check that a directory exists in cephfs before it
will allow an NFS export of the dir to be created. It was a pretty shaky
practice of ours to create NFS exports without dirs backing them anyhow.
This change ensures the dirs exist before the test cases are run and
clean them up afterwards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The New function created a rados connection object but did not expose it
via a public api, making it impossible to deterministically sever / clean up
the connection. This commit assumes that the patch will be merged prior
to the go-ceph v0.21 release so that we can plan to remove the function
three versions later (v0.24). I chose three versions so that it is one
release longer than our typical stabilization period as this function
has been around for a while.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
**Description:**
Added the uid member to the usage type.
We don't need to handle the uid here, as the ceph funtion handles it in the backend.
Fixes: #758
Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
Add unit and simplistic functional tests for new JSON/status description
extraction functions. Because these are preview functions we also add a
stub file to add a no-op function to be built on non-preview builds.
This avoids having to reimplement large parts of the existing mirroring
tests just to validate this small aspect of the SiteMirrorImageStatus
struct.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add UnmarshalDescriptionJSON method to SiteMirrorImageStatus
Add DescriptionReplayStatus method to SiteMirrorImageStatus
Both these functions are meant to help extract the JSON object that is
some times appended to the Description field in the
SiteMirrorImageStatus struct. I have only seen the JSON appear after
"replaying, " but there's little docs for this and I skimmed to code to
even find out what fields the JSON might include. As such, the
UnmarshalDescriptionJSON tries to unmarshal the appended JSON into an
object the caller provides in case skimming the code was insufficient or
the caller has other needs. For most cases, DescriptionReplayStatus can
be used to parse the JSON into a struct containing known fields.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Previously, commit 102616b158 tried to
expose GOPROXY env var from developer environment by specifying it as
environment variable or build argument to container build process. But
using --build-arg to container build command would require the same to
be referenced inside Dockerfile/Containerfile so that the following
warning can be avoided:
[Warning] one or more build args were not consumed: [GOPROXY]
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>