This commit adds a new argument check_status to mount methods of
KernelMount, FuseMount, LocalKernelMount and LocalFuseMount. When value
of this argument is False, these methods would catch the
CommandFailedError exception and would return a tuple consisting of the
exception itself, and stdout and stderr of the mount command. This
allows reusing these mount methods while running negative tests for
commands.
The name "check_status" is selected so since teuthology's run() and
vstart_runner's run() use a variable with same name for the very same
purpose.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
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>
So far running "fs authorize" subcommand sets "allow r" as MON cap;
change that to "allow <perms> fsname=<fsname>".
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Allow passing path along with fs names and capspec while creating an MDS
cap. The new syntax looks as follows -
allow rw fsname=<fsname> path=<path>
To provide caps for multiple file systems, pass the same phrase multiple
times separated by commas -
allow rw fsname=<fsname1> path=<path1>, allow rw fsname=<fsname2>
path=<path2>, ...
This commit also makes sure that the old syntax 'allow rw path=<path>'
is supported for backwards compatibility. The old syntax would imply
'allow rw fsname=* path=<path>' and would grant read-write permission for
all FSs containing the path <path>.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Add new auth caps to restrict access to clients based on fsnames. To
specify this, for example:
mds 'allow rw fsname=cephfs1'
This will restrict client access to fs name "cephfs1" only. Messages to
active MDS assigned to any other FSMap will be dropped. Standby MDS not
associated with an FSMap will accept messages from clients. To allow
multiple file systems, create MDS cap as follows -
mds 'allow rw fsname=cephfs1, allow rw fsname=cephfs2'
Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Modify MMDSMap to include the name of the file system from the FSMap
when bringing up a new MDS. Store the name in the MDSRank structure for
use in security validation.
Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Add a 'fsname' clause to mon auth caps to restrict a client's view
of the FSMap. Example:
mon 'allow rw fsname=cephfs2'
This would restrict the client's view of the FSMap to the MDSMap for
cephfs2. Any MDS allocated to a different filesystem will be invisible.
Global standby daemons are always visible. To allow multiple CephFSs,
add multiple caps:
mon 'allow rw fsname=cephfs2, allow rw fsname=cephfs2'
Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
before this change, unittest_seastar_config set the specified option to
the shard id in parallel and expects that the values of the option are
consistent across all shards after setting the value on all shards. but
sharded::invoke_on_all() is executed in parallel, and so does
ConfigProxy::do_change(), so there are actually "n x n" continuations
racing each other. the order of the continuations storing the setting
cannot be determined. so we cannot expected that the last batch of
continuations hitting shareds store the same value.
in this change, only a single `conf.set_val()` call is performed with
a known value. and this value is checked with the values stored on all
shards.
Signed-off-by: Kefu Chai <kchai@redhat.com>
instead of seastar::now(). as seastar::now() was moved into
seastar/util/laster.hh.
this change is a leftover of aa28b51f3c
Signed-off-by: Kefu Chai <kchai@redhat.com>
rgw: ObjectCache::put() clears stale objv
Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Mark Kogan <mkogan@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
mgr: don't update pending service map epoch on receiving map from mon
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
seastar,crimson: bump seastar to use upstream master
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
before this change we are using a fork which includes a fix to address
the FTBFS with GnuTLS < 3.5.6
after this change, we are using the lastest upstream which already
contains this fix.
Signed-off-by: Kefu Chai <kchai@redhat.com>
this addresses the FTBFS like
/usr/include/fmt/core.h:902:19: error: static assertion failed: formatting of non-void pointers is disallowed
902 | static_assert(!sizeof(T), "formatting of non-void pointers is disallowed");
| ^~~~~~~~~~
also, i think it is more helpful in this context to have the
notify id instead of the address, as we can use the id to reference
the notification printed by other logging messages.
Signed-off-by: Kefu Chai <kchai@redhat.com>
to address the FTBFS like:
../src/crimson/os/seastore/lba_manager/btree/btree_range_pin.cc:110:14: required from here
/usr/include/fmt/core.h:902:19: error: static assertion failed: formatting of non-void pointers is disallowed
902 | static_assert(!sizeof(T), "formatting of non-void pointers is disallowed");
| ^~~~~~~~~~
Signed-off-by: Kefu Chai <kchai@redhat.com>
to accommodate the change on seastar's side, which started to use
monostate for representing `void` return type, and hide this convention
using future_stored_type_t.
Signed-off-by: Kefu Chai <kchai@redhat.com>
otherwise we have
../src/crimson/common/errorator.h:1090:8: error: specialization of ‘template<class Future> struct seastar::continuation_base_from_future’ in different namespace [-fpermissive]
1090 | struct continuation_base_from_future<Container<::crimson::errorated_future_marker<Values...>>> {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
since seastar has moved its continuation_base_from_future() out
of seastar::internal into seastar namespace
Signed-off-by: Kefu Chai <kchai@redhat.com>
for two reasons:
* we don't have operator<<(ostream&, in4_addr&) defined.
* we don't have any fmt::format() facility specialized for in4_addr
* to print entity_addr_t instead of in4_addr is more correct in
the sense that we should support IPv6
Signed-off-by: Kefu Chai <kchai@redhat.com>
seastar::now() is extracted into seastar/util/later.hh in a recent
change in seastar, so update accordingly
Signed-off-by: Kefu Chai <kchai@redhat.com>
Right now, recover_delete use WaitForObjectRecovery::pi, which may not be available
if there were no pulling, to pass recovery_info, so use temporary recovery_info instead
Fixes: https://tracker.ceph.com/issues/47357
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
to address the failure like
fmt/core.h:902:19: error: static assertion failed: formatting of non-void pointers is disallowed
902 | static_assert(!sizeof(T), "formatting of non-void pointers is disallowed");
| ^~~~~~~~~~
and i searched around, couldn't find any other
statement printing the address of message, so
i think it's not of much use to print their
addresses in a single place, unless we can cross
check them in different places.
Signed-off-by: Kefu Chai <kchai@redhat.com>
To support RGW's MetadataLog, add a flag to FIFO::trim that when true
trims up to but not including the given entry.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Remove date-oriented trim/list functionality from MDLOG, DataLog, and
Sync-Error-Log.
Don't provide start/end markers. Support only a start marker for list
and an end marker for trim.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>