Commit Graph

10 Commits

Author SHA1 Message Date
John Mulligan 1f02b52df2 cephfs admin: update test helper functions to work on ceph "pacific"
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-04-30 15:23:40 +02:00
John Mulligan 55a5732b3f cephfs admin: replace "command tracer" with common version from commands
Previously, this functionality was taken into commands package. Use
that.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-04-07 00:25:44 +00:00
John Mulligan 462372c178 cephfs admin: add ability to check server version in tests
Rather than compile things in and out, which really should only be for
the client version of the ceph libs, add vars that tests can use to
check the server. Also, a "sentinel" test is added to make sure the
tests are being fed a version it understands.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-10-03 11:08:13 -04:00
John Mulligan b001f1a4d2 cephfs admin: refactor response handling with a dedicated response type
The response type simplifies the error handling as a "pipeline" of
checks that are applied one after another.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-10-02 09:12:02 -04:00
John Mulligan 3afac0b0b8 cephfs admin: add support for running MON commands
Some of the queries we need to make are not mgr commands but (still?)
mon commands. Extend the interface and helper funcs to support issuing
mon commands.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-09-24 15:50:51 -04:00
John Mulligan 7d18596d9d cephfs admin: use strconv to parse env var content
The environment variable to turn on tracing will now be parsed using
strconv.ParseBool rather than just a quick-n-dirty str compare.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-08-31 10:38:38 -04:00
John Mulligan c1ff3a6b18 cephfs admin: in the test setup code, delay a bit to fetch mgr map
When the ceph client code has not yet (asynchronously) gotten the mgr
map, it can return -EACCES when we run the MgrCommand function.  We
before continuing with the test function to get the fsadmin we delay a
bit so that we are more likely to have the mgr map before continuing.
This change also fixes the caching of the fs admin.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-08-31 10:38:38 -04:00
John Mulligan f9e1ec5d2a cephfs admin: disable package on 'luminous' and 'mimic'
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-08-31 10:38:38 -04:00
John Mulligan a120c62623 cephfs admin: add optional debug tracing to the tests
Allow the environment variable GO_CEPH_TEST_DEBUG_TRACE=yes to enable
tracing of the input & output json from the manager commands. This is
both useful for debugging the tests themselves and demonstrates the use
of something other than rados.Conn meeting the interface required by
FSAdmin.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-08-31 10:38:38 -04:00
John Mulligan 198541cccd cephfs admin: add core functionality and volume functions
Adds the central admin type `FSAdmin` and some helper functions.
Adds basic volume list and info functions.
Adds tests for the volume functions and common fsadmin functions.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-08-31 10:38:38 -04:00