This commit introduces following two set of changes -
First, make client keyring path, mountpoint on host FS and CephFS and
CephFS's name attributes of the object representing the mount
and update all the mount object creation calls accordingly. Also,
rewrite all the mount object creation to use keyword arguments instead
of positional arguments to avoid mistakes, especially since a new
argument was added in this commit.
Second, add remount method to mount.py so that it's possible to unmount
safely, modify the attributes of the object representing the mount and
mount again based on new state of the object *in a single call*. The
method is placed in mount.py to avoid duplication.
This change has two leads to two more changes: upgrading interface of
mount() and mount_wait() and upgrading testsuites to adapt to these
change.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
The pybind now has dropped the WITH_PYTHON2 option, and for now only
py3 supported.
Fixes: https://tracker.ceph.com/issues/45103
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Mostly we should wait the mountpoint to get ready, especially for
the fuse mountpoint, sometimes it may take a few seconds to get
ready.
Fixes: https://tracker.ceph.com/issues/44044
Signed-off-by: Xiubo Li <xiubli@redhat.com>
There were a couple of problems found by flake8 in the qa/
directory (most of them fixed now). Enabling flake8 during the usual
check runs hopefully avoids adding new issues in the future.
Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
We don't need to specify the number of PGs for a new data pool anymore
since b1b821f60812dd36e61be115c5ad8223ab51befe and other related
changes. The related health warnings are also deprecated/gone. So this
no longer needs to be done.
Fixes: b1b821f60812dd36e61be115c5ad8223ab51befe
Fixes: https://tracker.ceph.com/issues/42436
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/28692/head:
test_volume_client: add positive test for ceph_volume_client method
test_volume_client: rename test_put_object_versioned()
test_volume_client: rewrite test_put_object_versioned
test_volume_client: use sudo_write_file() form teuthology
test_volume_client: make test_object_versioned py3 compatible
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
ceph_volume_client.py's put_object_versioned() has only one test. Since
this only test is a negative test it may fail to assure that
put_object_versioned() works as expected with positive inputs even when
it completes successfully. Therefore, write a positive test for better
coverage.
Also, make sure the new test is both python 2 and python3 compatible.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
test_put_object_versioned() is too generic for a negative test that
specifically tests if the version is verified before writing.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
The test's success depends on whether CommandFailedError exception is
raised. This manner of testing is unreliable since there's no way to
check if the exception was raised by the statement (in the embedded
Python program) the test expects to.
This implies that this test's failure may go undetected. This is primary
reason why bugs like tracker #38946 occured despite of having a test.
Fixes: http://tracker.ceph.com/issues/39510
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Instead of defining another method to write a file as root user in
test_volume_client.py, use the method from teuthology/misc.py.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Convert strings to bytes in the Python program embedded inside this
test. Also, in the process don't lose Python 2 compatibility.
Fixes: http://tracker.ceph.com/issues/39405
Signed-off-by: Rishabh Dave <ridave@redhat.com>
... that have empty OSD and MDS caps. Don't add a ',' at the
start of OSD and MDS caps.
Fixes: http://tracker.ceph.com/issues/21501
Signed-off-by: Ramana Raja <rraja@redhat.com>
* refs/remotes/upstream/pull/17697/head:
pybind/ceph_volume_client: add get, put, and delete object interfaces
pybind/ceph_volume_client: remove 'compat_version'
pybind/ceph_volume_client: set the version
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Wrap low-level rados APIs to allow ceph_volume_client to get, put, and
delete objects. The interfaces would allow OpenStack Manila's
cephfs driver to store config data in a shared storage to implement
highly available Manila deployments. Restrict write(put) and
read(get) object sizes to 'osd_max_size' config setting.
Signed-off-by: Ramana Raja <rraja@redhat.com>