Commit Graph

1107 Commits

Author SHA1 Message Date
Robert Vasek 3f9bcf03cc rados: simplified GetOmapStep and ReadOp.GetOmapValues
C strings that are passed in to rados_read_op_omap_get_vals2() are copied by
the function, see [1][2] for its implementation. It's therefore not necessary for
them to be owned by GetOmapStep. It's enough to construct and destruct them
in ReadOp.GetOmapValues.

[1] 2bd3dd512a/src/librados/librados_c.cc (L4334-L4358)
[2] 2bd3dd512a/src/include/rados/librados.hpp (L572-L587)
2022-03-09 14:02:56 +00:00
Robert Vasek 8371a1377d rados: use rados_read_op_omap_get_vals_by_keys2()
ReadOp.GetOmapValuesByKeys() now uses rados_read_op_omap_get_vals_by_keys2().
2022-03-09 14:02:56 +00:00
Robert Vasek ecdb224b75 rados: use rados_omap_get_next2()
GetOmapSte.Next() and ReadOpOmapGetValsByKeysStep.Next() now use
rados_omap_get_next2().
2022-03-09 14:02:56 +00:00
Robert Vasek 74ca850366 cutil: added BufferGroup
BufferGroup is a helper structure that holds Go-allocated slices of
C-allocated strings and their respective lengths. Useful for C functions
that consume byte buffers with explicit length instead of null-terminated
strings.
2022-03-09 14:02:56 +00:00
mergify-bot a88702fb93 rados: add wrapper to set locator key on IOContext (#651)
add wrapper to set locator key on IOContext

Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>

* mark API as PREVIEW and update docs

Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>

* move new API call into own file to add preview build tag

Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>

* reset locater with nil instead of a empty string

Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>

* rename variables for naming consistency

Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>

* update release versions for new API call

Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
2022-03-05 15:43:02 +00:00
Sven Anderson d43f087ec4 rados: add warning logs to watcher callbacks
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-03-03 15:06:20 +00:00
John Mulligan bd0b093b7b readme: document v0.14.0 and the ceph versions it supports
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-03-01 21:54:30 +00:00
Sven Anderson 72493ed2f7 common: implement a common log package
This change adds two log packages.  One for the external go-ceph
consumers under common/log, and one for the internal use within the
go-ceph code under internal/log.  The external package exports two
functions for consumers, SetWarnf() and SetDebugf(), that set a
logger for warnings and debug messages respectively. They take a
log.Printf compatible function as argument.

The internal package exports these functions as Warnf() and Debugf(),
which can be used by the go-ceph code to log warnings and debug
messages.

Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-28 12:03:04 +00:00
Sven Anderson f6eeb68e33 contrib/implements: move into independent module
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-21 14:45:42 +00:00
Sven Anderson 397ea777b9 contrib/implements: minor meta fixes
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-21 14:45:42 +00:00
Sven Anderson 2ae01ab6bc CI: remove castxml from scripts and docs
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-21 14:45:42 +00:00
Sven Anderson cf77731927 contrib/implements: remove some linter noise
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-21 14:45:42 +00:00
Sven Anderson 0b907cf04f contrib/implements: replace castxml with cc library
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-21 14:45:42 +00:00
Sven Anderson 7ac455058f rados: declare WriteOp.CmpExt as stable
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-14 16:50:27 +00:00
Sven Anderson d3a4a05d55 rados: update api-status
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-10 07:38:07 +00:00
Sven Anderson 21f192a484 rados: implement watch/notify APIs
This change implements the bindings for the watch/notify APIs of
librados. Instead of callbacks, the watcher is implemented with more
Go-idiomatic channels. A watcher object exposes two read-only
channels, one to receive the notify events and one to receive
occuring errors.

Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-10 07:38:07 +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
Robert Vasek 573598cf22 rados: implement binding for read_op_omap_get_vals_by_keys
This commit implements binding for read_op_omap_get_vals_by_keys
RADOS Read operation.

Includes a unit test.

Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2022-02-09 15:25:37 +00:00
Robert Vasek 4cf39ce07b rados: implement binding for rados_write_op_setxattr
This commit implements binding for rados_write_op_setxattr
RADOS Write operation.

Includes a unit test.

Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2022-02-08 19:35:32 +00:00
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 f705d41c96 cephfs admin: mark general mgr module funcs as deprecated
The versions in cluster/admin/manager should be used instead.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
John Mulligan aaea0f85db docs: add common/admin/manager to API docs
These APIs already existed, and were considered stable in cephfs/admin
before getting moved. I initially was going to mark them preview but then
realized that cephfs/admin depends on them and having them marked
preview with the ceph_preview tag would break cephfs/admin. Due to the
above, I think an exception to the policy is warranted here as there
is not much new except the package itself.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
John Mulligan f27408f8bf contrib: add common/admin/manager to implements
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
John Mulligan cc1cb6ed24 cephfs 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
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
John Mulligan d4c23eb19d common admin: add tests for manager pkg module apis
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
John Mulligan 8f69b10509 admintest: new helper pkg for */admin type test suites
All of our <foo>/admin/ test suites have similar needs for rados conn
and wrapped debugging. Create a short package that is meant to only
be consumed by our test suites.

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 bd93e9c6d6 common admin: enhance and make public APIs for mgr module admin
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
John Mulligan 0757a9acf9 makefile: add new common/admin/manager pkg for tests build
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
John Mulligan 4cd344a2be common admin: port mgr module calls from cephfs/admin
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
John Mulligan 73bbdbfe08 common admin: add admin.go file with basic admin type
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
John Mulligan 4fa966d579 common admin: add new manager package
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
Sven Anderson 520018f6ef rados: fix revive error
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-08 15:17:34 +00:00
Sven Anderson 3b859f8f80 cutil: fix revive error
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-08 15:17:34 +00:00
Sven Anderson 63ae1fcbde Makefile: make revive check independent of build tags
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-08 15:17:34 +00:00
Robert Vasek 4c8fb2d210 rados: implement binding for rados_{read,write}_op_assert_version
This commit implements binding for rados_read_op_assert_version
RADOS Read operation as well as rados_write_op_assert_version
RADOS Write operation.

Includes unit tests for both.

Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2022-02-08 14:29:21 +00:00
Robert Vasek 17fbb4b3a0 rados: implement binding for rados_write_op_remove
This commit implements binding for rados_write_op_remove RADOS Write operation.
Includes a unit test.

Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2022-02-07 23:08:33 +00:00
John Mulligan 89631a50d3 containers: disable a repo to get the ci up and going again
This issue should have been fixed in ceph-containers already but for
whatever reason we don't seem to be getting the fix.
For now, disable the apache-arrow-centos repo.

Based on: 8b4c8dc730

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-07 21:20:20 +00:00
Sven Anderson b8695c037c make: always rebuild implements.json
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-01 14:39:34 +00:00
John Mulligan c27cfe90d2 readme: note how to get supported packages on centos
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-01-25 17:29:22 +00:00
John Mulligan 805f26cc5d github: update mergify.yml to new style
Mergify has not been working for weeks as they removed support for the
deprecated style we were relying on. This is my first attempt to
update it to the new style.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-01-25 09:03:11 -05:00
Robert Vasek 937f8d8164 rados: implement binding for rados_read_op_read
This commit implements binding for rados_read_op_read RADOS Read operation.
Includes a unit test.

Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2022-01-13 09:37:59 -05:00
John Mulligan 0e3ed2982f readme: document v0.13.0 and the ceph versions it supports
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-12-14 18:54:41 +00:00
rakeshgm a833cd7474 rgw/admin: correct example
the function `co.GetUser()` needs -
ctx and type user not string

Signed-off-by: rakeshgm <rakeshgm@redhat.com>
2021-12-13 12:57:50 +00:00
Robert Vasek 0443277bb9 rados: implement binding for rados_write_op_cmpext
This commit implements binding for rados_write_op_cmpext RADOS Write operation.
Includes a unit test.

Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2021-12-08 19:07:12 +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 a26d4b8563 cephfs admin: add a private function for getting mgr modules
Add a function for getting the lists of enabled/disabled mgr modules
from ceph. This is private for the moment as general module management
probably shouldn't be part of cephfs admin. It's bad enough we hacked
in the functions for enabling mirroring. :-)

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-12-07 18:00:56 +00:00
Robert Vasek 20da1c607d docs: api-update typo
This commit fixes a typo in development docs:

    s/udpate/update/g

Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2021-11-30 17:07:58 +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