]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/cli/osdmaptool: test upmap with an out osd
authorTheofilos Mouratidis <t.mour@cern.ch>
Mon, 25 Sep 2017 14:15:45 +0000 (16:15 +0200)
committerTheofilos Mouratidis <t.mour@cern.ch>
Mon, 25 Sep 2017 17:56:27 +0000 (19:56 +0200)
Test upmap with one osd marked out.

Signed-off-by: Theofilos Mouratidis <t.mour@cern.ch>
src/test/cli/osdmaptool/help.t
src/test/cli/osdmaptool/missing-argument.t
src/test/cli/osdmaptool/upmap-out.t [new file with mode: 0644]

index e3e6cd091fc15638fa5501f2245b0751bfbe11e0..8fd313a765add05da214ba4bc2f24ae58956bdc8 100644 (file)
@@ -8,6 +8,7 @@
      --test-map-pgs-dump-all [--pool <poolid>] map all pgs to osds
      --health                dump health checks
      --mark-up-in            mark osds up and in (but do not persist)
+     --mark-out <osdid>      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
index 97ed692cb81eeb872e9b7ecaf3c402737e91b1e1..db1745bd857d56e9c1bb406e5a92151f399fc960 100644 (file)
@@ -8,6 +8,7 @@
      --test-map-pgs-dump-all [--pool <poolid>] map all pgs to osds
      --health                dump health checks
      --mark-up-in            mark osds up and in (but do not persist)
+     --mark-out <osdid>      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 (file)
index 0000000..bc0a28a
--- /dev/null
@@ -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