Sanford Miller
15d71fe192
rbd: add mirroring support for nautilus
...
The librbd API for mirroring-related operations changed substantially between
Nautilus and Octopus. Due to this, go-ceph had previously only implemented
mirroring functionality if built against Octopus client libraries. This patch
implements equivalent functionality for use with Nautilus clients.
Signed-off-by: Sanford Miller <smiller@digitalocean.com>
2022-07-13 13:00:48 +00:00
Sanford Miller
133e675c8d
rbd: refactor GetImageNames to use a for loop instead of recursion
...
This is done because using a for loop is more idiomatic in Go code.
Signed-off-by: Sanford Miller <smiller@digitalocean.com>
2022-06-14 16:33:29 +00:00
Sanford Miller
36d5c4498e
rbd: don't cap the buffer size used in GetImageNames
...
This removes the limit on the max buffer size GetImageNames is willing to pass
to rbd_list2, which is somewhat arbitrary and is too small for large clusters.
GetImageNames will continue to start with a small buffer size and retry with a
larger buffer if rbd_list2 returns ERANGE (just without a cap on the max buffer
size it's willing to go to).
Signed-off-by: Sanford Miller <smiller@digitalocean.com>
2022-06-14 16:33:29 +00:00
John Mulligan
0722af5375
rbd admin: enable TestMirrorSnapshotScheduleStatus on quincy
...
The issue has (probably) been fixed in ceph v17.2.0 images.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-06-14 12:39:59 +00:00
Sven Anderson
f4fb583252
docs: remove all PREVIEW comments
...
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-06-06 14:42:04 +00:00
Sanford Miller
68ebb0520a
rbd: expose rbd_snap_rename to Go clients
...
This implements the following method:
(snapshot *Snapshot) Rename(destName string) error
Signed-off-by: Sanford Miller <smiller@digitalocean.com>
2022-05-17 14:40:07 +00:00
John Mulligan
68eff5d9e4
rbd admin: disable TestMirrorSnapshotScheduleStatus on qunicy
...
Will need to be properly debugged later.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan
dae56d0c65
rbd: update doc comments for rbd image Read and Write funcs
...
The comments above Read and Write were very old and not up to our
current standards. Update them to be accurate and note that the
offset internal to the image type is not concurrency safe.
This also cleans up some old and unhelpful todos.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-09 15:59:48 +00:00
John Mulligan
69c8750e96
rbd admin: use the new admintest module to set up tests
...
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
Rakshith R
7d881032a6
rbd/admin: promote ImageSpec & tasks api to stable
...
Promoting ImageSpec & task apis to stable so
they can be release in v0.13.0.
Signed-off-by: Rakshith R <rar@redhat.com>
2021-11-29 15:07:06 +00:00
Seena Fallah
bae93ac4ab
rbd: export image name
...
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2021-11-09 02:31:09 +00:00
John Mulligan
cc9f4d6b39
rbd: remove luminous and mimic build tags
...
Luminous and mimic have not been supported for a few releases now.
There's no need to keep these build tags any more.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 01:24:01 +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
Sven Anderson
26fd846da1
docs: update comments of preview and deprecated APIs
...
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-10-04 18:58:35 +00:00
John Mulligan
f015cc36ca
rbd: clearly mark Set as deprecated
...
Use the notation described in the new API stability doc.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-09-30 13:27:01 +00:00
John Mulligan
7f74708d5b
rbd: clearly mark open function as deprecated
...
Use the notation described in the new API stability doc.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-09-30 13:27:01 +00:00
Rakshith R
126d6f5747
rbd admin: add rbd task [list|cancel|remove|trash remove|flatten]` apis
...
These functions let one add various rbd tasks that are done
asynchronously in the background. Also added tests for the same.
Signed-off-by: Rakshith R <rar@redhat.com>
2021-09-28 13:13:07 +00:00
Rakshith R
890b3619db
rbd admin: add type ImageSpec to work with rbd task api
...
ImageSpec type has been added to work with rbd task api.
It consists of optional pool & namespace and image name/id.
[pool/][namespace/]image[Name/id].
Added unit tests.
Signed-off-by: Rakshith R <rar@redhat.com>
2021-09-28 13:13:07 +00:00
John Mulligan
89c64b3100
rbd: change instance_ids to instanceIDs
...
Fix up variable names that don't meet Go standards.
This one crept in while working on older code but before the newer
patch enabling revive to find these was available.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-09-13 15:13:53 +00:00
John Mulligan
e5a1f842e5
rbd: naming conventions: fixes in test function TestOpenImage
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan
ee3c7f3a80
rbd: naming conventions: fixes in test function TestReadAt
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan
e6941b1e27
rbd: naming conventions: fixes in test function TestIOReaderWriter
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan
d78d42972e
rbd: naming conventions: fixes in test function TestWriteSame
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan
c2e4cd5377
rbd: naming conventions: fixes in test function TestDeprecatedImageOpen
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
Rakshith R
a32355cba2
rbd: implement binding for rbd_mirror_image_instance_id_list
...
This commit adds MirrorImageInstanceIDList and
MirrorImageInstanceIDIter with necessary helper functions
and tests.
Fixes : #483
Signed-off-by: Rakshith R <rar@redhat.com>
2021-08-23 06:39:51 +00:00
John Mulligan
4f9322e9f1
rbd: add revive directives to ignore underscores in ImageInfo
...
These are public fields of a public type and changing them would be
a breaking change. Add revive comment directives to ignore them
so we can continue to have names in this struct that violate the
Go naming convention.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-12 11:05:09 -04:00
John Mulligan
8ea2109309
rbd: naming conventions: fixes in RemoveImage 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
ae97cd3e7d
rbd: naming conventions: fixes in CreateImage 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
6abfb039a4
rbd: naming conventions: fixes in TrashRemove, TrashRestore 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
e4cfae9eaa
rbd: naming conventions: fixes in SetSnapshot 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
1cbbe2cea5
rbd: naming conventions: fixes in GetSnapshotNames 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
d1b251fef5
rbd: naming conventions: fixes in BreakLock 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
8848df53e1
rbd: 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-08-12 11:05:09 -04:00
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
3de317e39d
rbd: export mirror image list functions
...
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-08-10 14:15:01 +00:00