Kefu Chai [Fri, 21 Aug 2020 04:31:16 +0000 (12:31 +0800)]
crimson/osd: check for DNE object and return ENOENT in read ops
* omap_get_keys()
this change addresses the failure of
test_rados.py:TestIoctx.test_get_omap_keys
* omap_get_vals_by_keys()
this change addresses the failure of
test_rados.py:TestIoctx.test_get_omap_vals_by_keys
* read()
this change addresses the failure of
test_rados.py:TestIoctx.test_write_ops
Kefu Chai [Fri, 21 Aug 2020 05:08:42 +0000 (13:08 +0800)]
crimson/osd: update oi.size after truncating an object
* update oi.size if object size changes after the object is truncated
* do not add a truncate op to trasaction of the size of object does
not change because of truncate op.
Kefu Chai [Thu, 20 Aug 2020 17:29:51 +0000 (01:29 +0800)]
crimson/osd: return rval which is negative
a less-than-zero rval indicates an error, and should not be normalized
to 0 if allows_returnvec() evaluates to false. probably we need a better
way to return a negative error code which does not fall into any known
error. but at this moment, grab the last rval and return it if it is
less than zero, can be used as a short term solution.
Kefu Chai [Sat, 22 Aug 2020 05:59:19 +0000 (13:59 +0800)]
qa/tasks/workunit: allow passing optional args to workunit
* add comment to _run_tests()
* use `os.path.commonpath()` instead using string matching directly
for matching given workunit spec with executables.
* allow passing optional args to workunit
Kefu Chai [Fri, 21 Aug 2020 12:22:23 +0000 (20:22 +0800)]
qa/tasks/ceph: create a log file before redirecting to it
as it is shell who interprets ">>" and redirect the stderr to given
file, but the shell process is launched by ubuntu:ububunt without using
sudo, so the command fails with "Permission denied" failure. to address
this issue, in this change, a file with proper priviledges is created
beforehand using `install`, so shell is able to write to it.
also, instead of creating this file in `maybe_redirect_stderr()`, it
returns the command to create the log file.
Patrick Donnelly [Sat, 22 Aug 2020 01:44:06 +0000 (18:44 -0700)]
Merge PR #36681 into master
* refs/pull/36681/head:
mds: don't track change of config 'mds_replay_unsafe_with_closed_session'
mds: fix 'forward loop' when forward_all_requests_to_auth is set
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Patrick Donnelly [Sat, 22 Aug 2020 01:40:42 +0000 (18:40 -0700)]
Merge PR #36131 into master
* refs/pull/36131/head:
doc: document cephfs mirroring dev work
test: add tests for `ceph fs mirror` family of commands
mds: track filesystem mirror peers in fsmap
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Kefu Chai [Thu, 20 Aug 2020 11:39:15 +0000 (19:39 +0800)]
crimson/osd: update size of object after writing to object
in the writesame op implemented in 6f7d1a435c1e80ee7ad6a9fca898d686255cc206, we failed to update the OI of
object after appending to it, in this change `oi.size` is updated
accordingly.
Patrick Donnelly [Fri, 21 Aug 2020 23:12:32 +0000 (16:12 -0700)]
Merge PR #36472 into master
* refs/pull/36472/head:
qa/workunits/fs: add test for subvolume
mds: don't move inode with nlink > 1 to global snaprealm if it's in subvolume
mds: disallow hardlink across subvolume
mds: disallow across subvolume rename
mds: disallow creating snapshot on descendent directory of subvolume
mds: add vxattr that marks/clears subvolume flag
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Rishabh Dave [Mon, 17 Aug 2020 09:58:12 +0000 (15:28 +0530)]
qa: add method run ceph cluster command with better interface
This new method should allow better control on the process launched by
the passed command. This is achieved by allowing arguments provided by
teuthology.orchestra.run.run().
Jason Dillaman [Fri, 21 Aug 2020 14:37:41 +0000 (10:37 -0400)]
librbd: flush requests could race past initiation of write ops
Now that IO is being processed by multiple threads, it's possible
that a write operation that was issued prior to a flush would not
have been started prior to the processing of the flush.
Fixes: https://tracker.ceph.com/issues/47050 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Kefu Chai [Wed, 19 Aug 2020 17:03:41 +0000 (01:03 +0800)]
test/pybind: label test_rados tests with attributes
so we can pick the tests selectively. currently, some features are not
supported by crimson. but we will cover more and more of them. so
attaching different labels to tests cases helps us to run these tests
selectively.
Greg Farnum [Wed, 12 Aug 2020 23:44:11 +0000 (23:44 +0000)]
mon: mark pgtemp messages as no_reply more consistently in preprocess_pgtemp
If a message is forwarded, it's conceivable the leader's and peon's evaluation
will disagree about whether the message is useful or not, which could result
in the leader ignoring it and the peon having a dangling forwarded message.
Fix this by marking the op as no_reply whenever ignoring it.
Jason Dillaman [Thu, 30 Jul 2020 17:12:20 +0000 (13:12 -0400)]
rbd: let librados finish initializing the global context
librados will retrieve a bootstrap config update from the MONs
after connecting and then finish initializing the context. In
general, non-primitive config options cannot be updated after
initialization is complete. This prevents the rbd CLI from
supporting non-primitive config overrides from the MON.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Thu, 30 Jul 2020 17:00:22 +0000 (13:00 -0400)]
mon/MonClient: apply MON config before finishing bootstrap
In general, non-primitive config options cannot be updated after
the service threads have been marked as running. In librados, this
happens after the MonClient bootstrap process. However, the configs
received from the MON were applied in a separate thread which can
race with librados marking the service threads as running.
Now the received MON configs will be applied within the context of
the bootstrap function call instead of deferring to a separate
thread.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
cephadm: Allow users to use a custom dashboard ssl port
This modification allows the user to create a new bootstrap cluster using a predefined SSl port for the dashboard.
If firewall is enabled, any new manager daemon deployed in new hosts will take care of open the required ports for all the services enabled in the manager.
Two new parameters for cephadm tool (aka binary or standalone):
Command bootstrap:
--ssl-dashboard-port SSL_DASHBOARD_PORT
Port number used to connect with dashboard using SSL
Command deploy:
--tcp-ports TCP_PORTS
List of tcp ports to open in the host firewall
Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>