Patrick Donnelly [Fri, 13 Sep 2019 19:38:47 +0000 (12:38 -0700)]
Merge PR #28560 into master
* refs/pull/28560/head:
cephfs-shell: handle du's arguments elsewhere outside do_du()
cephfs-shell: reuse code
cephfs-shell: rewrite call to perror in do_du
pybind/cephfs: define variable for hexcode used in stat()
test_cephfs_shell: test cephfs-shell command at invocation
cephfs-shell: refactor do_du()
cephfs-shell: option -r is not for reverse
cephfs-shell: extend to_bytes()
test_cephfs_shell: test du with no args
test_cephfs_shell: test du with multiple paths in args
test_cephfs_shell: test behaviour of "du -r"
test_cephfs_shell: test du's output for softlinks
qa/cephfs: add convenience method lstat()
qa/cephfs: add option to make stat() unfollow symlinks
test_cephfs_shell: test du's output for hardlinks
test_cephfs_shell: test du's output for directories
test_cephfs_shell: test du's output for regular files
test_cephfs_shell: add a method to get command output
test_cephfs_shell: allow cmd as list too
test_cephfs_shell: rename and rewrite _cephfs_shell()
test_cephfs_shell: copy humanize() from cephfs-shell
cephfs-shell: print disk usage for non-directory files too
pybind/cephfs: add method that stats symlinks without following
cephfs-shell: Fix 'du' command error
Reviewed-by: Varsha Rao <varao@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Patrick Donnelly [Fri, 13 Sep 2019 15:36:32 +0000 (08:36 -0700)]
Merge PR #24794 into master
* refs/pull/24794/head:
mds: move BatchOp to separate translation unit
mds: use auto ref during iteration
mds: answering all pending getattr/lookups targeting the same inode in one go
Reviewed-by: Zheng Yan <zyan@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Patrick Donnelly [Fri, 13 Sep 2019 15:35:04 +0000 (08:35 -0700)]
Merge PR #28702 into master
* refs/pull/28702/head:
qa: update json format from session listing
mds: recall caps from quiescent sessions
mds: use Session::dump method uniformly
mds: use auto to deduce iterator type
mds: simplify method definition
mds: remove useless debug message
mds: use const get_request_count
mds: use session_info_t socket inst for addr
mds: refactor session lookup
mds: add explicit trim flag
mds: alphabetize tracked config keys
common: provide method to get half-life
common: correct variable name
Reviewed-by: Zheng Yan <zyan@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
classic OSD started to use single-pg peering ops since ce05c172, and it
switched over to these ops since octopus. and it's assumed that
crimson-osd won't be GA until octopus+2 release, so it's not needed to
support pre-octopus releases.
classic OSD started to use single-pg peering ops since ce05c172, and it
switched over to these ops since octopus. and it's assumed that
crimson-osd won't be GA until octopus+2 release, so it's not needed to
support pre-octopus releases. hence "octopus" is passed to PeeringCtx's
constructor.
Create new action class for do_du()'s args.paths and push the code that
handles arguments for do_du() in there. The intention is to keep only
the code that does some disk usage stuff in do_du().
Rishabh Dave [Fri, 16 Aug 2019 17:37:32 +0000 (23:07 +0530)]
cephfs-shell: refactor do_du()
Improve code's readability and keep all paths as bytes.
Specifically, define a function within do do_du() to simplify the code
that handles recursion, rename args.dirs to args.paths, get rid of
dir_passed and use args.paths directly instead, change the default
value of args.dirs to a list with one member that contains current
working directory, rewrite the docstring, and few more similar changes.
Rishabh Dave [Wed, 17 Jul 2019 10:56:29 +0000 (16:26 +0530)]
test_cephfs_shell: add a method to get command output
Let run_cephfs_shell_cmd() return the object instead of output in string
format so that stderr, return value, etc. of the command executed
remain available. And add a new method that returns only output of the
CephFS shell command executed.
Rishabh Dave [Wed, 24 Jul 2019 07:02:07 +0000 (12:32 +0530)]
test_cephfs_shell: allow cmd as list too
Convert cmd to string if it is passed as list to
run_cephfs_shell_cmd(). Allowing cmd to be list would be nice since
elsewhere, in tests, command to be executed must be a list of arguments
rather than string of arguments separated by spaces.
Rishabh Dave [Wed, 19 Jun 2019 08:09:19 +0000 (13:39 +0530)]
test_cephfs_shell: rename and rewrite _cephfs_shell()
Rename _cephfs_shell() to run_cephfs_shell_cmd() and add a default
client for run_cephfs_shell_cmd() since most of tests in this
testsuite will need only one client.
Rishabh Dave [Tue, 18 Jun 2019 10:39:04 +0000 (16:09 +0530)]
test_cephfs_shell: copy humanize() from cephfs-shell
Copy the method named humanize from cephfs-shell so that output can be
compared. Unfortunately, importing this method isn't possible since the
dash in "cephfs-shell" leads to an syntax error.
Patrick Donnelly [Mon, 26 Aug 2019 21:39:30 +0000 (14:39 -0700)]
mds: recall caps from quiescent sessions
This introduces two new config options [1,2] that dictate when a session
is considered quiescent by the MDS. (Options are documented fully in
options.cc.) When a session is quiescent, the MDS will preemptively
recall caps to reduce the outstanding capabilities which optimizes for
reducing work during failover.
Sage Weil [Thu, 12 Sep 2019 16:45:47 +0000 (11:45 -0500)]
Merge PR #30191 into master
* refs/pull/30191/head:
cls/hello: disable write returning data clobbering demo
messages/MOSDOpReply: assert no write result payloads
osd/PrimaryLogPG: assert write result == 0
osd/PrimaryLogPG: pass TMAPGET errors up
osd/PrimaryLogPG: set result=0 for successful writes
Sage Weil [Thu, 12 Sep 2019 14:57:12 +0000 (09:57 -0500)]
Merge PR #29820 into master
* refs/pull/29820/head:
osd/PeeringState: log_weirdness during peering
osd/PeeringState: send new message types
osd/PeeringState: give require_osd_release to BufferedRecoveryMessages
osd: add new notify, query, and info messages
osd/PeeringState: use send_info() for replica activation ack
osd/PeeringState: remove old info_map member
osd/PeeringState: send infos via message_map (not info_map)
osd/PeeringState: remove old query_map member
osd/PeeringState: send queries via message_map (not query_map)
osd/PeeringState: use return value from discover_all_missing
osd/PeeringState: give PeeringCtxWrapper a BufferedRecoveryMessages ref
osd/PeeringState: send notifies via message_map (not notify_list)
osd/PeeringState: add message_map to PeeringCtx/BufferedRecoveryMessages
osd: dispatch_context inside PG lock
Sage Weil [Wed, 11 Sep 2019 22:26:52 +0000 (17:26 -0500)]
mon: disable min pg per osd warning
Now that the pg_autoscaler is on by default, it is "normal" (and okay) to
have a small number of PGs in the cluster if the overall cluster usage is
also low. This setting just results in a health warning out of the box
when you create a pool and haven't written any data yet.
Fixes: https://tracker.ceph.com/issues/41735 Signed-off-by: Sage Weil <sage@redhat.com>