From 03a11694feee0d78dcc1f296a77200635a651707 Mon Sep 17 00:00:00 2001 From: Theofilos Mouratidis Date: Mon, 25 Sep 2017 16:15:45 +0200 Subject: [PATCH] test/cli/osdmaptool: test upmap with an out osd Test upmap with one osd marked out. Signed-off-by: Theofilos Mouratidis (cherry picked from commit ff9e024a59d87eda6cbf3be9464ee7ae6f1140d7) --- src/test/cli/osdmaptool/help.t | 1 + src/test/cli/osdmaptool/missing-argument.t | 1 + src/test/cli/osdmaptool/upmap-out.t | 23 ++++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 src/test/cli/osdmaptool/upmap-out.t diff --git a/src/test/cli/osdmaptool/help.t b/src/test/cli/osdmaptool/help.t index e3e6cd091fc15..8fd313a765add 100644 --- a/src/test/cli/osdmaptool/help.t +++ b/src/test/cli/osdmaptool/help.t @@ -8,6 +8,7 @@ --test-map-pgs-dump-all [--pool ] map all pgs to osds --health dump health checks --mark-up-in mark osds up and in (but do not persist) + --mark-out mark an osd as out (but do not persist) --with-default-pool include default pool when creating map --clear-temp clear pg_temp and primary_temp --test-random do random placements diff --git a/src/test/cli/osdmaptool/missing-argument.t b/src/test/cli/osdmaptool/missing-argument.t index 97ed692cb81ee..db1745bd857d5 100644 --- a/src/test/cli/osdmaptool/missing-argument.t +++ b/src/test/cli/osdmaptool/missing-argument.t @@ -8,6 +8,7 @@ --test-map-pgs-dump-all [--pool ] map all pgs to osds --health dump health checks --mark-up-in mark osds up and in (but do not persist) + --mark-out mark an osd as out (but do not persist) --with-default-pool include default pool when creating map --clear-temp clear pg_temp and primary_temp --test-random do random placements diff --git a/src/test/cli/osdmaptool/upmap-out.t b/src/test/cli/osdmaptool/upmap-out.t new file mode 100644 index 0000000000000..bc0a28a0768f4 --- /dev/null +++ b/src/test/cli/osdmaptool/upmap-out.t @@ -0,0 +1,23 @@ + $ osdmaptool --create-from-conf om -c $TESTDIR/ceph.conf.withracks --with-default-pool + osdmaptool: osdmap file 'om' + osdmaptool: writing epoch 1 to om + $ osdmaptool om --mark-up-in --mark-out 147 --upmap-max 11 --upmap c + osdmaptool: osdmap file 'om' + marking all OSDs up and in + marking OSD@147 as out + writing upmap command output to: c + checking for upmap cleanups + upmap, max-count 11, max deviation 0.01 + $ cat c + ceph osd pg-upmap-items 1.7 142 145 + ceph osd pg-upmap-items 1.8 219 223 99 103 + ceph osd pg-upmap-items 1.17 171 173 201 202 + ceph osd pg-upmap-items 1.1a 201 202 115 114 + ceph osd pg-upmap-items 1.1c 171 173 201 202 127 130 + ceph osd pg-upmap-items 1.20 88 87 201 202 + ceph osd pg-upmap-items 1.21 207 206 142 145 + ceph osd pg-upmap-items 1.51 201 202 65 64 186 189 + ceph osd pg-upmap-items 1.62 219 223 + ceph osd pg-upmap-items 1.6f 219 223 108 111 + ceph osd pg-upmap-items 1.82 219 223 157 158 6 3 + $ rm -f om c -- 2.39.5