Skip to content

Commit

Permalink
Merge PR #27117 into nautilus
Browse files Browse the repository at this point in the history
* refs/pull/27117/head:
	osd/OSDMap: add 'zone' to default crush map

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
  • Loading branch information
liewegas committed Mar 24, 2019
2 parents e21e104 + 5d112d3 commit 42e0410
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 13 deletions.
7 changes: 4 additions & 3 deletions src/osd/OSDMap.cc
Expand Up @@ -3957,9 +3957,10 @@ int OSDMap::_build_crush_types(CrushWrapper& crush)
crush.set_type_name(6, "pod");
crush.set_type_name(7, "room");
crush.set_type_name(8, "datacenter");
crush.set_type_name(9, "region");
crush.set_type_name(10, "root");
return 10;
crush.set_type_name(9, "zone");
crush.set_type_name(10, "region");
crush.set_type_name(11, "root");
return 11;
}

int OSDMap::build_simple_crush_map(CephContext *cct, CrushWrapper& crush,
Expand Down
5 changes: 3 additions & 2 deletions src/test/cli/osdmaptool/create-print.t
Expand Up @@ -31,8 +31,9 @@
type 6 pod
type 7 room
type 8 datacenter
type 9 region
type 10 root
type 9 zone
type 10 region
type 11 root

# buckets
host localhost {
Expand Down
5 changes: 3 additions & 2 deletions src/test/cli/osdmaptool/create-racks.t
Expand Up @@ -265,8 +265,9 @@
type 6 pod
type 7 room
type 8 datacenter
type 9 region
type 10 root
type 9 zone
type 10 region
type 11 root

# buckets
host cephstore5522 {
Expand Down
2 changes: 1 addition & 1 deletion src/test/cli/osdmaptool/crush.t
Expand Up @@ -6,5 +6,5 @@
osdmaptool: exported crush map to oc
$ osdmaptool --import-crush oc myosdmap
osdmaptool: osdmap file 'myosdmap'
osdmaptool: imported 485 byte crush map from oc
osdmaptool: imported 497 byte crush map from oc
osdmaptool: writing epoch 3 to myosdmap
2 changes: 1 addition & 1 deletion src/test/cli/osdmaptool/tree.t
Expand Up @@ -20,7 +20,7 @@
"id": -1,
"name": "default",
"type": "root",
"type_id": 10,
"type_id": 11,
"children": [
-3
]
Expand Down
5 changes: 3 additions & 2 deletions src/test/crush/crush-choose-args-expected-one-more-0.txt
Expand Up @@ -22,8 +22,9 @@ type 5 pdu
type 6 pod
type 7 room
type 8 datacenter
type 9 region
type 10 root
type 9 zone
type 10 region
type 11 root

# buckets
host HOST {
Expand Down
5 changes: 3 additions & 2 deletions src/test/crush/crush-choose-args-expected-one-more-3.txt
Expand Up @@ -22,8 +22,9 @@ type 5 pdu
type 6 pod
type 7 room
type 8 datacenter
type 9 region
type 10 root
type 9 zone
type 10 region
type 11 root

# buckets
host HOST {
Expand Down

0 comments on commit 42e0410

Please sign in to comment.