client: add option to control how directory size is calculated
This lets you disable rstats if your workload is unhappy about directories
changing size (eg, tar of recently-moved/created/untarred files).
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
This change uses:
* a pystring to store ioctx state like other state attributes and like
previous binding
* use __dealloc__ instead of __del__ to ensure Object are freed correctly
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
This implements run_in_thread inside the ceph command itself.
And fixes the ceph command bootstrap when it run inside the
source tree to correctly load the new rados python module.
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
Notable changes:
* run_in_thread have disapeared
* timeout argument of some methods are ignored
* rados_create_write_op/rados_create_read_op returns WriteOp/ReadOp
instead of the pointer address
* rados_monitor_log callback 'arg' arguments was broken in previous python
binding (callback was called with the pointer address instead pointed object)
* object attributes that was pointer addresses are now private and not accessible in python
Some tests have been added to cover all methods
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
To allow to create a autonomous rados module with cython.
We move the current librbdpy to the rbd sub directory.
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
vstart.sh expects the literal string "osd"/"mds"/"mon". To me, it was confusing
as I interpreted the usage hint as an optional count for each daemon.
Signed-off-by: Patrick Donnelly <batrick@batbytes.com>
Otherwise it's possible that the notification will be blocked if
the librados AIO thread isn't available to invoke the notification
handler.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If multiple states are pending, it's possible for an image to
be closed while the state lock is unlocked during the callback.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The AIO image open might complete under the librados AIO callback.
Attempting to close the old image handle under that thread will
deadlock under the new librados_test_stub flush handling.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
There are sporadic librbd unit test failures due to the
mock being destroyed while an active librados_test_stub
AIO callback is completing.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The CEPH_PAGE_SIZE is not actually a constant. On aarch64 platforms
the page size is 64K instead of the assumed 4K. The CRC block
computations require a true constant.
Fixes: #14747
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
These are minor cleanups that do not affect the code in a
material way:
- Forgot to add --tenant to usage message
- Make the help slightly less misleading
- Fix a strange error message "could not add remove caps"
- Spelling in a comment
- The vstart.sh can be run with civetweb
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>