Commit Graph

6 Commits

Author SHA1 Message Date
John Mulligan c4cfd15e12 cephfs admin: increase timeout waiting for mirroring module
Again.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
John Mulligan 85208d213f cephfs admin: reimplement cephfs mgr module calls via common admin
Now that we've moved the logic over to common admin, replace the
implementation in cephfs admin.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
John Mulligan 1d9c3f8533 cephfs admin: poll mgr to see if mirroring module is enabled
When testing the mirroing workflow, we will not explicitly check
on the mgr for the presence of the mirroring module before proceeding
with the tests. The plan is to have this cut down on test flakes.

The previous workaround also had a bug in that the 2nd sleep was in the
wrong location. Perhaps, fixing this alone would resolve the test
flakes, but this is more proper anyway.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-12-07 18:00:56 +00:00
John Mulligan c0852d43d0 cephfs admin: add sleeps after mgr module is enabled (workaround)
This is a workaround for the common test flake:
```
=== RUN   TestMirroring
    mirror_workflow_test.go:63:
            Error Trace:    mirror_workflow_test.go:63
            Error:          Received unexpected error:
                            rados: ret=-95, Operation not supported:
"Module 'mirroring' is not enabled (required by command 'fs snapshot
mirror enable'): use `ceph mgr module enable mirroring` to enable it"
            Test:           TestMirroring
```
at even though we've certainly requested the mode be enabled the mgr
has apparently not fully processed the request and the module is
not yet available. We add a half-second sleep after each call
to hopefully give the mgr time enough to completely enable the module.

A future improvement would be to poll the mgr until we know it is ready to
use the cephfs mirroring module, but that would take some research and
(probably) new API calls. So this is a temporary workaround just
to try and reduce the number of test flakes sooner rather than later.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-01 15:45:03 +00:00
Sven Anderson 87f4563118 format: run gofmt on all files
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-10-04 18:58:35 +00:00
John Mulligan 9eaff23200 cephfs admin: add a full workflow test for cephfs mirroring
This rather large test case tests the mirroring functions in an
end-to-end manner. It sets up the mirroring peers, enables mirroring on
directories and verifies that mirroring was set up by writing data and
verifying that data was propagated from site a to site b.

Ceph pacific is required to use cephfs mirroring and thus run this test.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-03 07:25:28 +00:00