From 7ee6c045aa75aa25f4bd5d2f28fed8390efcf922 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Tue, 20 Jun 2017 12:19:07 -0400 Subject: [PATCH] mon: default 'rbd' pool to the 'rbd' application Signed-off-by: Jason Dillaman --- src/osd/OSDMap.cc | 2 ++ src/test/cli/osdmaptool/clobber.t | 4 ++-- src/test/cli/osdmaptool/create-print.t | 4 ++-- src/test/cli/osdmaptool/create-racks.t | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index 19db82af0d30b..e51b84b94609c 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -3309,6 +3309,8 @@ int OSDMap::build_simple_optioned(CephContext *cct, epoch_t e, uuid_d &fsid, pools[pool].set_pg_num(poolbase << pg_bits); pools[pool].set_pgp_num(poolbase << pgp_bits); pools[pool].last_change = epoch; + pools[pool].application_metadata.insert( + {pg_pool_t::APPLICATION_NAME_RBD, {}}); pool_name[pool] = plname; name_pool[plname] = pool; } diff --git a/src/test/cli/osdmaptool/clobber.t b/src/test/cli/osdmaptool/clobber.t index ccb1207a7c7af..29351f1fc4486 100644 --- a/src/test/cli/osdmaptool/clobber.t +++ b/src/test/cli/osdmaptool/clobber.t @@ -25,7 +25,7 @@ nearfull_ratio 0 min_compat_client jewel - pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0 + pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0 application rbd max_osd 3 @@ -51,7 +51,7 @@ nearfull_ratio 0 min_compat_client jewel - pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 64 pgp_num 64 last_change 0 flags hashpspool stripe_width 0 + pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 64 pgp_num 64 last_change 0 flags hashpspool stripe_width 0 application rbd max_osd 1 diff --git a/src/test/cli/osdmaptool/create-print.t b/src/test/cli/osdmaptool/create-print.t index e2370d18f8753..d17b4be9ffc2a 100644 --- a/src/test/cli/osdmaptool/create-print.t +++ b/src/test/cli/osdmaptool/create-print.t @@ -84,7 +84,7 @@ nearfull_ratio 0 min_compat_client jewel - pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0 + pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0 application rbd max_osd 3 @@ -93,5 +93,5 @@ osdmaptool: writing epoch 1 to myosdmap $ osdmaptool --print myosdmap | grep 'pool 1' osdmaptool: osdmap file 'myosdmap' - pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0 + pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0 application rbd $ rm -f myosdmap diff --git a/src/test/cli/osdmaptool/create-racks.t b/src/test/cli/osdmaptool/create-racks.t index 7fdd5cc82ce37..92c994fe8cef6 100644 --- a/src/test/cli/osdmaptool/create-racks.t +++ b/src/test/cli/osdmaptool/create-racks.t @@ -797,7 +797,7 @@ nearfull_ratio 0 min_compat_client jewel - pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool stripe_width 0 + pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool stripe_width 0 application rbd max_osd 239 @@ -807,5 +807,5 @@ osdmaptool: writing epoch 1 to om $ osdmaptool --print om | grep 'pool 1' osdmaptool: osdmap file 'om' - pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool stripe_width 0 + pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool stripe_width 0 application rbd $ rm -f om -- 2.39.5