Skip to content

Commit

Permalink
Merge pull request ceph#3382 from xinxinsh/wip-fix
Browse files Browse the repository at this point in the history
fix command 'ceph pg dump_stuck degraded'

Reviewed-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Jan 19, 2015
2 parents d53275c + 9db5969 commit 8318a2e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/man/8/ceph.rst
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ Subcommand ``dump_stuck`` shows information about stuck pgs.

Usage::

ceph pg dump_stuck {inactive|unclean|stale[inactive|unclean|stale...]}
ceph pg dump_stuck {inactive|unclean|stale[inactive|unclean|stale|undersized|degraded...]}
{<int>}

Subcommand ``force_create_pg`` forces creation of pg <pgid>.
Expand Down
2 changes: 1 addition & 1 deletion doc/rados/operations/control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The valid formats are ``plain`` (default) and ``json``.
To display the statistics for all placement groups stuck in a specified state,
execute the following::

ceph pg dump_stuck inactive|unclean|stale [--format {format}] [-t|--threshold {seconds}]
ceph pg dump_stuck inactive|unclean|stale|undersized|degraded [--format {format}] [-t|--threshold {seconds}]


``--format`` may be ``plain`` (default) or ``json``
Expand Down
2 changes: 1 addition & 1 deletion doc/rados/operations/monitoring-osd-pg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ include:

To identify stuck placement groups, execute the following::

ceph pg dump_stuck [unclean|inactive|stale]
ceph pg dump_stuck [unclean|inactive|stale|undersized|degraded]

See `Placement Group Subsystem`_ for additional details. To troubleshoot
stuck placement groups, see `Troubleshooting PG Errors`_.
Expand Down
2 changes: 1 addition & 1 deletion doc/rados/operations/placement-groups.rst
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ Get Statistics for Stuck PGs
To get the statistics for all placement groups stuck in a specified state,
execute the following::

ceph pg dump_stuck inactive|unclean|stale [--format <format>] [-t|--threshold <seconds>]
ceph pg dump_stuck inactive|unclean|stale|undersized|degraded [--format <format>] [-t|--threshold <seconds>]

**Inactive** Placement groups cannot process reads or writes because they are waiting for an OSD
with the most up-to-date data to come up and in.
Expand Down
2 changes: 1 addition & 1 deletion man/ceph.8
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,7 @@ Usage:
.sp
.nf
.ft C
ceph pg dump_stuck {inactive|unclean|stale[inactive|unclean|stale...]}
ceph pg dump_stuck {inactive|unclean|stale|undersized|degraded[inactive|unclean|stale|undersized|degraded...]}
{<int>}
.ft P
.fi
Expand Down
2 changes: 2 additions & 0 deletions qa/workunits/cephtool/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,8 @@ function test_mon_pg()
ceph pg dump_stuck inactive
ceph pg dump_stuck unclean
ceph pg dump_stuck stale
ceph pg dump_stuck undersized
ceph pg dump_stuck degraded
# can't test this...
# ceph pg force_create_pg
ceph pg getmap -o $TMPDIR/map.$$
Expand Down
2 changes: 1 addition & 1 deletion src/mon/MonCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ COMMAND("pg dump_json " \
COMMAND("pg dump_pools_json", "show pg pools info in json only",\
"pg", "r", "cli,rest")
COMMAND("pg dump_stuck " \
"name=stuckops,type=CephChoices,strings=inactive|unclean|stale,n=N,req=false " \
"name=stuckops,type=CephChoices,strings=inactive|unclean|stale|undersized|degraded,n=N,req=false " \
"name=threshold,type=CephInt,req=false",
"show information about stuck pgs",\
"pg", "r", "cli,rest")
Expand Down

0 comments on commit 8318a2e

Please sign in to comment.