Commit Graph

951 Commits

Author SHA1 Message Date
John Mulligan 70db71e0b6 rbd: naming conventions: fixes in LockExclusive, LockShared functions
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan 05538bceab rbd: naming conventions: fixes in ListLockers function
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan 96846c2ccf rbd: naming conventions: fixes in Copy function
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan 2add913aaf rbd: naming conventions: fixes in GetStripeCount, GetStripeUnit functions
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan ee7767a0d3 rbd: naming conventions: fixes in IsOldFormat function
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan f4769e6f89 rbd: naming conventions: fixes in Stat function
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan 751c644eb5 rbd: naming conventions: fixes in Rename function
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan 07df8d3338 rbd: naming conventions: fixes in Trash function
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan 645fd2be49 rbd: naming conventions: fixes in Clone function
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan 3d2c476cd4 rbd: naming conventions: fixes in Create, Create2, Create3 functions
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan 3a168ec717 rbd: naming conventions: fixes in Version function
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan 56af1b3822 rbd: fix naming convention violations in options.go
Fix up variable names that don't meet Go standards.

Command: gofmt -w -r 'c_set -> cSet' rbd/options.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan 030411ac3f rbd: fix naming convention violations in options.go
Fix up variable names that don't meet Go standards.

Command:  gofmt -w -r 'c_value -> cValue' rbd/options.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan bf0ddeffa9 rbd: fix naming convention violations in snapshot.go
Fix up variable names that don't meet Go standards.

Command: gofmt -w -r 'c_is_protected -> cIsProtected' rbd/snapshot.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan 7536a52346 rbd: fix naming convention violations in snapshot.go
Fix up variable names that don't meet Go standards.

Command: gofmt -w -r 'c_snapname -> cSnapName' rbd/snapshot.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan 848b877686 rbd: fix naming convention violations in metadata.go
Fix up variable names that don't meet Go standards.

Command: gofmt -w -r 'c_key -> cKey' rbd/metadata.go
Command: gofmt -w -r 'c_value -> cValue' rbd/metadata.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
Sven Anderson 46300ecae8 cutil: fix race condition in ptrguard tests
The finalizer of an object is called in a separate go routine, so we
might have to check several times for its completion.

Fixes: #545

Signed-off-by: Sven Anderson <sven@redhat.com>
2021-08-12 10:02:40 -04:00
John Mulligan d7716cc989 readme: document v0.11.0 and the ceph versions it supports
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-10 13:47:16 -04:00
Sven Anderson 3de317e39d rbd: export mirror image list functions
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-08-10 14:15:01 +00:00
Sven Anderson 6fe40e05fc rbd: deprecate Close() method of MirrorImageGlobalStatusIter
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-08-10 13:23:58 +00:00
Jiffin Tony Thottan 9edf093e7e rgw/admin: include caps in User Struct for createUser()
The caps is option in RGW for providing special permissions for
the ceph user, include it on the User{} so that it can be send in
the request for CreateUser().

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-08-10 12:30:10 +00:00
Jiffin Tony Thottan 8d946bafeb rgw/admin: include stat information to User Struct
The stat information gives idea about current storage consumption.
Include that info to the user struct

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-08-10 12:30:10 +00:00
John Mulligan 53d742d7ce cephfs admin: tweak naming of DaemonStatusPeer
It was previously DaemonStatusPeerRemote but this struck the reviewers
as redundant so it is now simply DaemonStatusPeer.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-05 13:53:22 +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
John Mulligan 5ab987da0a cephfs admin: add data parsing tests for cephfs mirroring functions
Add test cases that exercise the parsing of data returned by ceph for
the informational calls.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-03 07:25:28 +00:00
John Mulligan ed5fad41e6 cephfs admin: add informational functions for cephfs mirroring
Add the functions DaemonStatus and PeerList which provide information
about the cephfs mirroring daemon and mirroring peers.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-03 07:25:28 +00:00
John Mulligan d847769649 cephfs admin: add core functions needed to work with cephfs mirroring
These functions require support in the ceph mgr and pertain to setting
up mirroring in the file system, adding directories to mirror, and
setting up mirroring peers.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-03 07:25:28 +00:00
John Mulligan 2e8b52be8a cephfs admin: add EnableMirroringModule and DisableMirroringModule funcs
Add functions EnableMirroringModule and DisableMirroringModule for
turning on an off the mirroring module at the ceph mgr.
This also adds the lower level EnableModule and DisableModule that take
a string parameter naming the module, and are the base for
EnableMirroringModule and DisableMirroringModule.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-03 07:25:28 +00:00
John Mulligan 6febfd6650 micro-osd.sh: set up a cephfs mirroring daemon
This mirroring daemon is required to test the cephfs mirroring calls
that will be added to cephfs/admin.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-03 07:25:28 +00:00
John Mulligan e56f10f3b4 cephfs admin: make fsConnect utility function more flexible
The fsConnect function is used by the tests to support getting a
data-path cephfs connection, in order to support those fs admin tests
that need to make changes in the file system directly. The new second
argument to the call allows for the cephfs connection to be made with a
non-default configuration.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-03 07:25:28 +00:00
John Mulligan df3c6dae2e cephfs admin: add newFSAdmin func for setting up fsadmin test instances
Previously, the getFSAdmin function always fetched a cached (if
available) fsadmin instance set up for the default configuration of
ceph. This change makes getFSAdmin based on newFSAdmin a function
that always returns a new instance and allows a custom configuration
to be passed.

Otherwise, newFSAdmin works like getFSAdmin did previously, supporting
debugging via an environment variable.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-03 07:25:28 +00:00
John Mulligan d11dd8b6d1 internal commands: add EmptyBody filter function
EmptyBody is like NoBody, but also accepts an empty JSON object ("{}").

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-03 07:25:28 +00:00
Effi Ofer 5ff1efe3aa rbd: add EncryptionLoad api to support the rbd_encryption_load librbd api
Signed-off-by: Effi Ofer <effio@il.ibm.com>
2021-08-02 21:03:36 +00:00
Sven Anderson b968165e78 rbd: add tests for MirrorImageInfoList
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-08-02 16:39:39 +00:00
Sven Anderson 520f6bfe0d rbd: remove unnecessary type casts
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-08-02 16:39:39 +00:00
Sven Anderson ac895ae097 rbd: implement binding for rbd_mirror_image_info_list
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-08-02 16:39:39 +00:00
Sven Anderson 8cbfd1971a rbd: fix comment formatting
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-08-02 16:39:39 +00:00
John Mulligan dfd1e08fab rbd: remove build tag for luminous from watchers.go
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>
2021-08-02 15:15:48 +00:00
John Mulligan b59dda4061 rbd: rename watchers_mimic.go to watchers.go
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>
2021-08-02 15:15:48 +00:00
John Mulligan aca200e407 rbd: remove features_mimic.go
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>
2021-08-02 15:15:48 +00:00
John Mulligan b3ed5036f3 rbd: remove luminous and mimic build tags from options_octopus.go
These versions of ceph have not been supported for the last few
release of go-ceph.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-02 15:15:48 +00:00
John Mulligan 29a94e03b5 rbd: remove options_mimic.go moving content to options.go
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>
2021-08-02 15:15:48 +00:00
John Mulligan b201e01628 rbd: remove rbd_mimic.go
go-ceph stopped supporting mimic in v0.7.0. This file no longer is
needed.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-02 15:15:48 +00:00
John Mulligan 5c0c0c94da rbd: remove snapshot_mimic.go
go-ceph stopped supporting mimic in v0.7.0. This file no longer is
needed.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-02 15:15:48 +00:00
Jiffin Tony Thottan 11f319727f
Merge pull request #543 from leseb/rm-debug
rgw/admin: remove Debug field from API type
2021-07-29 15:47:05 +05:30
Sébastien Han 9cae71ab54 rgw/admin: remove Debug field from API type
Instead of implementing our own logging let's the consumer implement
their own potential debug for each HTTP requests.

Closes: https://github.com/ceph/go-ceph/issues/508
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-27 18:21:53 +02:00
John Mulligan 402707f2f5 rados: naming conventions: fixes in WriteFull function
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan b7b21273e3 rados: naming conventions: fixes in Write function
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan 396e8f32ff rados: naming conventions: fixes in Unlock function
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan e7cdc8fa68 rados: naming conventions: fixes in Truncate function
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00