Commit Graph

455 Commits

Author SHA1 Message Date
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
Alan Somers
3aae5ca6fd scripts: fix bash path in shebangs
/bin/bash is a Linuxism.  Other operating systems install bash to
different paths.  Use /usr/bin/env in shebangs to find bash.

Signed-off-by: Alan Somers <asomers@gmail.com>
2017-07-27 13:24:26 -06:00
Sage Weil
5534912daa qa/workunits/cephtool/test.sh: add some config-key tests
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-26 14:13:22 -04:00
Sage Weil
4eb1a518e3 mon: 'config-key put' -> 'config-key set'
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-26 14:10:08 -04:00
Sage Weil
ee06dc6996 Merge pull request #16530 from xiexingguo/wip-fix-pgtemp
mon: prime pg_temp and a few health warning fixes

Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-26 13:09:33 -05:00
Kefu Chai
d85a7889fd Merge pull request #16446 from xiexingguo/wip-destroyed
mon: show destroyed status in tree view; do not auto-out destroyed osds

Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-26 17:15:53 +08:00
xie xingguo
96eb0a9887 mon/OSDMonitor: apply new 'destroyed' status to 'osd tree' filter
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 15:13:32 +08:00
Sage Weil
d2c31a8114 Merge pull request #16469 from xiexingguo/wip-fix-test
test: s/osd_objectstore_type/osd_objectstore
2017-07-25 21:04:22 -05:00
Sage Weil
a264725b62 Merge pull request #16541 from liewegas/wip-20761
qa/workunits/cephtool/test.sh: disable 'fs status' until bug is fixed
2017-07-25 14:03:38 -05:00
xie xingguo
450633b9e6 mon/OSDMonitor: ENOENT on removing non-existent app key
So we don't bother to trigger an pool update, which is potentially
big stuff.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-25 13:19:35 +08:00
xie xingguo
b4dcdecb6a mon/OSDMonitor: ENOENT on disabling non-existend app
so we don't bother to trigger an pool update, which is potentially
big stuff.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-25 13:19:29 +08:00
Sage Weil
71ea171604 qa: move ceph-helpers and misc src/test/*.sh tests to qa/standalone
- stop running via make check
- add teuthology yamls to run them
- disable ceph_objecstore_tool.py for now (too slow for make check, and
we can't use vstart in teuthology via a package install)
- drop cephtool tests since those are already covered by other teuthology
tests
- leave a handful of (fast!) ceph-helpers tests for make check for minimal
integration tests.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-24 22:11:49 -04:00
Sage Weil
f347ef54c2 qa/workunits/cephtool/test.sh: disable 'fs status' until bug is fixed
See http://tracker.ceph.com/issues/20761
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-24 16:54:13 -04:00
Sage Weil
08bdc2c867 Merge pull request #16500 from liewegas/wip-compact-sudo
qa/workunits/cephtool/test.sh: add sudo for daemon compact

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-22 13:01:20 -05:00
xie xingguo
fa0e314cde test: s/osd_objectstore_type/osd_objectstore/
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-22 15:22:31 +08:00
Sage Weil
0429acda45 Merge pull request #16460 from liewegas/wip-mgr-metadata
mon: add mgr metdata commands, and overall 'versions' command for all daemon versions

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-21 22:36:09 -05:00
Sage Weil
2f272ab451 qa/workunits/cephtool/test.sh: add sudo for daemon compact
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-21 23:18:03 -04:00
Kefu Chai
10b88b5d82 test: create asok files in a temp directory under $TMPDIR
to shorten the pathname of unix domain socket created for admin socket,
so it does not exceed the limit of 107 on GNU/Linux:

* ceph-helper.sh: the temp directory is named ${TMPDIR:-/tmp}/ceph-asok.$$
* vstart.sh: the temp directory is named `mktemp -u -d "${TMPDIR:-/tmp}/ceph-asok.XXXXXX"`

Fixes: http://tracker.ceph.com/issues/16895
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-07-22 01:05:29 +08:00
Sage Weil
75ac7d85da qa/workunits/cephtool/test.sh: add a few tests
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-21 11:25:05 -04:00
Sage Weil
6c4992aeca qa/workunits/cephtool/test.sh: fix test to watch audit channel
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-21 11:40:48 +08:00
Sage Weil
3de9f22ce0 Merge pull request #16423 from liewegas/wip-ls
mon: '* list' -> '* ls'

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-20 10:43:34 -05:00
Kefu Chai
acc24bf0dc Merge pull request #16444 from tchaikov/wip-test-osd-stat
qa/workunits/cephtool/test.sh: "ceph osd stat" output changed, update accordingly

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
2017-07-20 23:41:53 +08:00
Kefu Chai
ba525a829c qa/workunits/cephtool/test.sh: "ceph osd stat" output changed, update test accordingly
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-07-20 19:34:53 +08:00
Willem Jan Withagen
e3760fa936 cephtool/test.sh: Only delete a test pool when no longer needed.
the pool_getset pool is deleted before all tests on it are complete

4: /home/jenkins/workspace/ceph-master/qa/workunits/cephtool/test.sh:1990: test_mon_osd_pool_set:  ceph osd pool delete pool_get
set pool_getset --yes-i-really-really-mean-it
4: pool 'pool_getset' removed
4: /home/jenkins/workspace/ceph-master/qa/workunits/cephtool/test.sh:1992: test_mon_osd_pool_set:  ceph osd pool get rbd crush_r
ule
4: /home/jenkins/workspace/ceph-master/qa/workunits/cephtool/test.sh:1992: test_mon_osd_pool_set:  grep 'crush_rule: '
4: crush_rule: replicated_rule
4: /home/jenkins/workspace/ceph-master/qa/workunits/cephtool/test.sh:1994: test_mon_osd_pool_set:  ceph -f json osd pool get poo
l_getset compression_mode
4: Error ENOENT: unrecognized pool 'pool_getset'

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-07-20 12:24:14 +02:00
Kefu Chai
aea471d73a Merge pull request #16403 from wjwithagen/bug-wjw-ceph-osd-stat
test: ceph osd stat out has changed, fix tests for that

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-20 18:06:47 +08:00
Jason Dillaman
fa90be842e test: enable pool applications for new pools
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-07-19 13:13:01 -04:00
Jason Dillaman
3514d6e53e mon: added new "osd pool application" commands
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-07-19 13:13:01 -04:00
Sage Weil
572a942f8f mon: 'auth list' -> 'auth ls'
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-19 12:33:14 -04:00
Willem Jan Withagen
4f49402589 qa/workunits/cephtool/test.sh: ceph osd stat out has changed, fix tests for that
The output of ceph osd stat has changed,
It printed:

cluster b370a29d-9287-4ca3-ab57-3d824f65e339
 health HEALTH_OK
 monmap e1: 1 mons at {ceph1=10.0.0.8:6789/0}, election epoch 2, quorum 0 ceph1
 osdmap e63: 2 osds: 2 up, 2 in
  pgmap v41338: 952 pgs, 20 pools, 17130 MB data, 2199 objects
        115 GB used, 167 GB / 297 GB avail
             952 active+clean

but now the osdmap line has gone and thus this no longer works:
qa/workunits/cephtool/test.sh:1944:
old_pgs=$(ceph osd pool get $TEST_POOL_GETSET pg_num | sed -e 's/pg_num: //')
new_pgs=$(($old_pgs+$(ceph osd stat | grep osdmap | awk '{print $3}')*32))

4: qa/workunits/cephtool/test.sh: line 1945: 10+*32: syntax errotoken is "*32")

 - And parse the output in json , with jq, for better reliability

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-07-19 16:34:12 +02:00
Sage Weil
3a4931b0e4 ceph: allow '-' with -i and -o for stdin/stdout
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-17 09:38:52 -04:00
liuchang0812
d1f24d053f test: add test of ceph compact command
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
2017-07-13 22:06:35 +08:00
Sage Weil
7e48efb061 qa/workunits/cephtool/test.sh: adjust full tests to avoid races
OSDs may report fullness in any order.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-12 12:52:03 -04:00
Sage Weil
7302b49723 qa/workunits/cephtool/test.sh: adjust for new health error codes
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-12 12:52:03 -04:00
Sage Weil
bfe4c08429 osd/OSDMap: add per-osd flag OSD_FLAGS check
rename OSD_FLAGS to OSDMAP_FLAGS

Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-12 12:52:02 -04:00
Sage Weil
6068e1856d mon/Monitor: move time sync status from 'ceph health' to 'time-sync-status' command
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-12 12:51:30 -04:00
xie xingguo
5f9de0e611 mon/OSDMonitor: sanity check osd number before applying pg-temp
In case user did something stupid and causing weird results.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-11 02:14:06 +08:00
Sage Weil
65d9d667ec qa/workunits/cephtool/test.sh: remove two crushtool validation tests
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-07 11:11:25 -04:00
Sage Weil
5870a68c00 Merge pull request #15647 from gmayyyha/format-config-show
common,config: OPT_FLOAT and OPT_DOUBLE output format in config show

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-06 21:25:19 -05:00
Sage Weil
d953198aff mon,mgr: track available modules in MgrMap too
Require --force to enable a module that isn't reported as available.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-29 23:10:51 -04:00
Sage Weil
16fcee1f71 mon,mgr: manage mgr module list in mgrmap
Kill old mgr_modules option.

Add new mgr_initial_modules option, on the mon, for the initial cluster
mgrmap.

Add ls, enable, disable commands.

Respawn mgr if the module list changes.  In the future we could enable
new modules without a full restart, but disabling probably requires (and
is best handled by) a respawn.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-29 23:10:51 -04:00
Sage Weil
7fe818990a Merge pull request #15968 from xiexingguo/wip-poolopts-fix
mon/OSDMonitor: two pool opts related fix

Reviewed-by: Sage Weil <sage@redhat.com>
2017-06-29 22:03:02 -05:00
Kefu Chai
7ee4907698 Merge pull request #15925 from jcsp/wip-fsstatus-cleanup
mgr: clean up fsstatus module

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-06-30 09:31:02 +08:00
Sage Weil
93918b0be5 test,qa/workunits: fix a zillion tests
Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-28 10:52:49 -04:00