[pve-devel] applied: [PATCH manager] fix #2108: ceph: 'osd pools set' cannot accept integers anymore

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Feb 20 19:38:03 CET 2019


The new luminous release 12.2.11 cherry-picked a commit[0] which
remove some legacy fallback when parsing a pool set command.
As of now only strings (which itself can then be a string, int or
float) may be passed as a value, while older also accepted an int
directly.

So ensure that all of our "osd pool set" commands pass strings, which
means that 'min_size' and 'size' must be converted to strings before
executing the command.

Without this one cannot create a CephFS over the WebUI anymore as the
create pools fails. Interestingly, the normal create pools over WebUI
still worked, as it has those two parameters exposed in the creation
formular, and thus sents them as string to the backend, while the
cephfs API does not exposes those two values at all but sets them
directly to integers. Funny stuff. CLI invocations also had the same
issue, depending on the fact if size and min_size could and got
passed (then it worked) or where omited (then it did not worked).

[0]: https://github.com/ceph/ceph/commit/c838a0096d98d461f83c79c3acdc0ee69464e473

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 PVE/Ceph/Tools.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/Ceph/Tools.pm b/PVE/Ceph/Tools.pm
index 9b02d7c8..5170fd6c 100644
--- a/PVE/Ceph/Tools.pm
+++ b/PVE/Ceph/Tools.pm
@@ -146,7 +146,7 @@ sub create_pool {
 	prefix => "osd pool set",
 	pool => $pool,
 	var => 'min_size',
-	val => $min_size,
+	val => "$min_size",
 	format => 'plain',
     });
 
@@ -154,7 +154,7 @@ sub create_pool {
 	prefix => "osd pool set",
 	pool => $pool,
 	var => 'size',
-	val => $size,
+	val => "$size",
 	format => 'plain',
     });
 
-- 
2.20.1




More information about the pve-devel mailing list