Commit Graph

503 Commits

Author SHA1 Message Date
Patrick Donnelly
c0ba741a6e
Merge PR #24158 into master
* refs/pull/24158/head:
	cephfs: remove vestiges of mds deactivate

Reviewed-by: Douglas Fuller <dfuller@redhat.com>
2018-09-24 14:39:45 -07:00
Kefu Chai
4b0e2c8ed4 qa: fix typos
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-21 12:41:42 +08:00
Patrick Donnelly
f113fa80a9
cephfs: remove vestiges of mds deactivate
Fixes: http://tracker.ceph.com/issues/24001

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-09-19 15:23:38 -07:00
Sage Weil
5940487be3 qa/workunits/cephtool/test_kvstore_tool.sh: run test in ., not /tmp
Notably, we can't make a bluestore store on a tmpfs.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-09-18 07:39:05 -05:00
Sage Weil
4591f134c8 Merge PR #24025 into master
* refs/pull/24025/head:
	mon/OSDMonitor: reject pg_num -> 0

Reviewed-by: huangjun <huangjun@xsky.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2018-09-12 11:51:58 -05:00
xie xingguo
6d8d20a55b mon/OSDMonitor: reject pg_num -> 0
Otherwise it will finally crash the mgr process:
```
-2> 2018-09-11 16:23:31.272 7ff521d59700 -1 /clove/xxG/ceph/src/osd/osd_types.cc: In function 'pg_t pg_t::get_parent() const'
 thread 7ff521d59700 time 2018-09-11 16:23:31.272096
/clove/xxG/ceph/src/osd/osd_types.cc: 587: FAILED ceph_assert(bits)
```

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2018-09-12 08:58:10 +08:00
Sage Weil
4fc02a7f48 osd/OSDMap: include age in up and in counts for ceph status
Signed-off-by: Sage Weil <sage@redhat.com>
2018-09-07 09:07:50 -05:00
Sage Weil
eaca033d17 qa/workunits/cephtool: remove auid tests
Signed-off-by: Sage Weil <sage@redhat.com>
2018-08-31 09:26:19 -05:00
Sage Weil
aa485c9b41 mon/PGMap: fix spacing around pretty-printed SI units
"1k foo" not "1kfoo"

Signed-off-by: Sage Weil <sage@redhat.com>
2018-08-08 10:55:18 -05:00
Sage Weil
95b2281f9d mon/OSDMonitor: add 'osd repeer <pgid>' command
Selecting force peering on a single PG.  In reality this probably induces
*2* interval changes.

Note that in the case of a single OSD cluster we can't actually force a
repeer on a single PG because the pg_temp code is pretty robust about
filtering out redundant or meaningless changes, so we can't pg_temp our
way into a new interval if there are no other OSDs to switch to and the
code also prevents an empty pg_temp.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-07-09 16:33:11 -05:00
Sage Weil
761f68dc0d mon: destroy-new -> purge-new
What we actually want is a purge, not a destroy.  Destroy leaves the OSD
ID in used and allows it to be recreated.  What ceph-volume wants is to
purge all trace of the failed OSD setup.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-06-15 14:11:01 -05:00
Sage Weil
547d96dc01 mon: add 'osd destroy-new' command that only destroys NEW osd slots
ceph-volume may run into a problem and want to clean up, but we do not
want to give it blanket access to the 'osd destroy' command.  Instead,
make an 'osd destroy-new' that can only create new OSDs (ones that are
in the process of being created but have never booted yet).

Signed-off-by: Sage Weil <sage@redhat.com>
2018-06-05 17:36:06 -05:00
Sage Weil
15edf77cc3 Merge PR #21934 into master
* refs/pull/21934/head:
	qa/standalone/mon/misc: fix features test
	qa/workunits: osd require-osd-release mimic -> nautilus
	test/cli/monmaptool/feature-set-unset: fix unknown ids
	test/cli/monmaptool: fix test
	osd/OSDMap: make NAUTILUS feature bit significant
	mon: add initial NAUTILUS feature/compatset bits

Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-05-25 17:52:41 -05:00
Sage Weil
b18fdb6e10 qa/workunits: osd require-osd-release mimic -> nautilus
Signed-off-by: Sage Weil <sage@redhat.com>
2018-05-25 15:19:28 -05:00
Kefu Chai
1692f49b7b qa: use $TESTDIR for testing mkfs
as tmpfs does not support O_DIRECT, but bluefs use this flag for
accessing the underlying file.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-05-25 21:46:32 +08:00
Sage Weil
0b956ef37d qa/workunits/cephtool/test.sh: update unit formatting
Signed-off-by: Sage Weil <sage@redhat.com>
2018-05-18 13:53:04 -05:00
Kefu Chai
5910c2902e qa: fix test on "ceph fs set cephfs allow_new_snaps"
snapshot is now enabled for new fs in 81d0554e, so this test should be
updated accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-05-05 09:40:41 +08:00
Kefu Chai
106737323d qa/workunits/cephtool/test.sh: fix test_mon_mds()
"ceph fs set cephfs allow_multimds false" is deprecated, and multimds is
enabled by default, so "ceph fs set cephfs max_mds 4" won't fail with
the default settings.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-21 09:20:35 +08:00
Patrick Donnelly
bb95292213
Merge PR #16608 into master
* refs/pull/16608/head:
	qa: whitelist mds down wrn during cephfs testing
	mds: add config to disable fragmentation
	qa: add max_mds thrash test
	qa: mds_thrash updates for new max_mds behavior
	doc: update upgrade procedure and release notes
	qa: add test for cluster resizing
	qa: remove use of mds deactivate
	cephfs: add new down/joinable fs flags
	mds: evict all clients if last mds shutting down
	cephfs: deprecate ceph mds deactivate
	cephfs: kill allow_dirfrags
	cephfs: Kill allow_multimds
	cephfs: Change behavior of cluster_down flag
	mon/FSCommands: Set extra MDS to standby
	cephfs: Health check changes
	mon/MDSMonitor: Remove command support for legacy syntax

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2018-04-18 14:36:54 -07:00
Douglas Fuller
ae3992ce4f
cephfs: Kill allow_multimds
With multi-mds now declared stable, allow_multimds now defaults to 1.
Given the max_mds parameter, it is now redundant. Remove it, leaving a
comment placeholder in the features bitmap.

ceph fs set <fs> allow_multimds is now deprecated and prints a warning
message.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2018-04-17 11:01:03 -07:00
Kefu Chai
d4186fb541
Merge pull request #19117 from jan--f/jan-object-counts-decimal
include/types: format decimal numbers with decimal factor

Reviewed-by: Sage Weil <sage@redhat.com>
2018-04-15 22:49:50 +08:00
Jan Fajerski
61504f117c qa/workunits/cephtool/test.sh: fix SI unit test, add IEC unit test
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
2018-04-13 18:07:33 +02:00
Sage Weil
497a63251b qa/workunits/cephtool: test with valid auth syntax
'allow' is not a valid mon cap; use 'allow *'.  Add some negative tests
to ensure the validation is working.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-04-10 07:39:06 -05:00
Jan Fajerski
d3cecebacd include/types: format decimal numbers with decimal factor
Until now bytes and objects were formatted using si_t which used 1024 as
the factor to pretty print large numbers. For object counts a factor of
1000 is preferred. This commit retires the si_t formatting (as well as
prettybyte_t, kb_t and pretty_si_t) completely and adds structs and
formatting for binary and decimal units, bin_u_t and dec_u_t respectively.
Fixes: http://tracker.ceph.com/issues/22095

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
2018-04-03 09:23:24 +02:00
Kefu Chai
c1ba9ac544
Merge pull request #20711 from guzhongyan/mgr-nodels
mon: 'node ls' mgr support

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-03-08 23:14:50 +08:00
Sage Weil
11e287c137 qa/workunits/cephtool/test.sh: fix mon_caps
Pass --no-mon-config so we don't get

 failed to fetch mon config (--no-mon-config to skip)

instead.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
c9e974800f qa: --no-mon-config for ceph-objectstore-tool --op mkfs ..
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
e89d22fe67 qa/workunits/cephtool/test.sh: streamline test_mon_injectargs
Be less sensitive to formatting of output string on set commands.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Gu Zhongyan
e8436e2bed mon: 'node ls' mgr support
mgr is not included in 'node ls'
add mgr support in 'node ls'

Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
2018-03-06 15:13:59 +08:00
hansbogert
364559074e mon: Add ceph osd get-require-min-compat-client command
As an antagonist to the already existing `set-require-min-compat-client`

Signed-off-by: hansbogert <hansbogert@gmail.com>
2018-02-13 00:52:22 +01:00
Sage Weil
13738cd752
Merge pull request #19939 from liewegas/wip-osd-new-class
mon,osd: do not use crush_device_class file to initalize class for new osds

Reviewed-by: Alfredo Deza <adeza@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Andrew Schoen <aschoen@redhat.com>
2018-02-12 11:17:14 -06:00
Sage Weil
59bdada5d5 mon/OSDMonitor: accept crush_device_class in 'osd new' json input
If provided, set the OSD device_class at OSD creation time.  This is
simpler than writing a file that the OSD has to read in and use to
set its initial device class, and also avoids a bit of sticky state
at the OSD that will make it keep trying to reset its device class on
startup if it ever gets cleared.

Note that we now ignore json input fields we don't understand, so remove
a test case.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-02-08 12:34:49 -06:00
Kefu Chai
74c9cfc466 test: reduce the chance to have degraded PGs
in test_mon_osd_misc(), there is good chance that the cluster chooses
to use an unbalanced weight because of the data distribution at that moment.
but this setting could prevent the CRUSH from choosing enough number of
OSDs for test_mon_cephdf_commands(), where 32 PGs are to be created. so
it's more likely that the CRUSH fails to pick enough OSDs for all PGs.
that's why we have a curr_object_copies_rate = 0.5.

so, in this change, pg=pgp=1 is specified for the new pool.

Fixes: http://tracker.ceph.com/issues/22711
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-01-22 21:24:58 +08:00
Kefu Chai
0c38eb87e2
Merge pull request #19673 from zouaiguo/wip_erase_code
mon/OSDMonitor.cc : set erasure-code-profile to "" when create replicated pools.

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-01-15 18:34:34 +08:00
Brad Hubbard
637bf125c3 qa: Add blocking versions of scrub and deep-scrub
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2018-01-10 14:05:55 +10:00
zouaiguo
a61e62cf44 mon/OSDMonitor.cc : set erasure-code-profile to "" when create replicated pools.
when we create a pool specify a rule, for example "ceph osd pool create foo replicated 10 rule_foo",
we will set pool foo erasure-code-profile to rule_foo,
if there has an erasure-code-profile names rule_foo, use "ceph osd erasure-code-profile rule_foo" will fail,
"Error EBUSY: foo pool(s) are using the erasure code profile 'rule_foo'", this is wrong.

we should do:
1. set erasure-code-profile to "" when create replicated pools
2. whether erasure-code-profile is used by pool not only judge pool erasure_code_profile property and also the pool is_erasure

Signed-off-by: zouaiguo <zou.aiguo@zte.com.cn>
2018-01-09 14:14:06 +08:00
Kefu Chai
371d3f4091 qa: stop testing deprecated "ceph osd create"
"ceph osd create" is not idempotent, and is considered deprecated.

Fixes: http://tracker.ceph.com/issues/21993
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-01 10:45:11 +08:00
Kefu Chai
0f1e97238c qa: do not "ceph fs get cephfs" w/o a cephfs fs
introduced by 183646c

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-10-25 19:12:39 +08:00
Patrick Donnelly
c58161f25b
Merge PR #17266 into master
* refs/pull/17266/head:
	qa: update test_ceph_argparse to test fs cmds
	qa: use fs rm_data_pool
	qa: fix mdsmap lookup
	qa: remove usage of mds dump
	PendingReleaseNotes: add obsoleted mds commands
	qa: remove use of obsolete mds commands
	ceph_volume_client: remove use of obsolete mds cmd
	doc: update on obsolete mds commands
	cephfs: obsolete deprecated mds commands

Reviewed-by: Douglas Fuller <dfuller@redhat.com>
2017-10-24 16:37:14 -07:00
Patrick Donnelly
b897ef9445
qa: use fs rm_data_pool
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-10-24 11:51:02 -07:00
Chang Liu
8d5d9c6a62 test: new test case for ceph-kvstore-tool
Signed-off-by: Chang Liu <liuchang0812@gmail.com>
2017-10-16 22:52:10 +08:00
Patrick Donnelly
183646c919
qa: remove use of obsolete mds commands
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-10-01 17:22:36 -07:00
Sage Weil
6376d75eda mon/OSDMonitor: error out if setting ruleset-* ec profile property
We change ruleset -> crush back in dc7a2aaf7a.
If someone tries to use the old property, error out early, instead of
silently not doing the thing they thought they told us to do.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-24 11:25:01 -04:00
Sage Weil
e715533feb qa/workunits/*: require-osd-release mimic, not luminous
Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-07 09:18:56 -04:00
Sage Weil
e21e63cb88 qa/workunits/cephtool/test.sh: drop 'pg set_full_ratio'
Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-06 10:18:06 -04:00
Kefu Chai
30b5b4627c Merge pull request #16494 from asomers/bin_bash
misc: Fix bash path in shebangs

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-08-27 10:14:14 +08:00
xie xingguo
1ea448ac75 common/types: make numbers a bit nicer when displaying space usage
Was:
----------------------------------------------------------------------------
GLOBAL:
    SIZE       AVAIL      RAW USED     %RAW USED
    30911M     27050M        3861M         12.49
POOLS:
    NAME                  ID     USED        %USED     MAX AVAIL     OBJECTS
    rbd                   0      101216k      1.10         8913M        1178
    cephfs_data_a         1            0         0         8913M           0
    cephfs_metadata_a     2          892         0         8913M          21
----------------------------------------------------------------------------

Now:
----------------------------------------------------------------------------
GLOBAL:
    SIZE      AVAIL     RAW USED     %RAW USED
    30.2G     26.4G        3.77G         12.50
POOLS:
    NAME                  ID     USED      %USED     MAX AVAIL     OBJECTS
    rbd                   0      99.2M      1.10         8.70G        1180
    cephfs_data_a         1          0         0         8.70G           0
    cephfs_metadata_a     2        892         0         8.70G          21
----------------------------------------------------------------------------

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-22 12:33:10 +08:00
xie xingguo
46586b2288 mon/OSDMonitor: "osd pool application ls" support
It would be a pain if we have to call 'ceph osd dump --format=json-pretty'
to find out these each time...

Demo output:
(1) ceph osd pool application get
{
    "cephfs_data_b": {
        "cephfs": {}
    },
    "cephfs_metadata_a": {
        "cephfs": {}
    },
    "test_pool": {
        "rbd": {
            "test": "me"
        }
    }
}

(2) ceph osd pool application get test_pool
{
    "rbd": {
        "test": "me"
    }
}

(3) ceph osd pool application get test_pool rbd
{
    "test": "me"
}

(4) ceph osd pool application get test_pool rbd test
me

Fixes: http://tracker.ceph.com/issues/20976
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-16 09:41:11 +08:00
xie xingguo
71cef3cb74 mon/OSDMonitor: fix 'osd pg temp' unable to cleanup pg-temp
This is not very elegant way but should work..

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-08 17:33:35 +08:00
xie xingguo
bfd1d4ef9a mon/OSDMonitor: sanity check osd before performing 'osd purge'
This will pervent OSDMonitor from crashing on purging a very large
non-existent osd id as below:

osd e11 prepare_command_osd_purge purging osd.8
    -1> 2017-08-05 18:59:44.994319 7f6076968700 10 mon.a@0(leader).osd e11 prepare_command_osd_destroy osd.8 does not exist.
     0> 2017-08-05 18:59:45.002309 7f6076968700 -1 /home/xxg/build/ceph-dev/src/osd/OSDMap.h: In function 'int OSDMap::get_state(int) const'
 thread 7f6076968700 time 2017-08-05 18:59:44.994336
/home/xxg/build/ceph-dev/src/osd/OSDMap.h: 690: FAILED assert(o < max_osd)

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-05 19:43:39 +08:00