Project

General

Profile

Bug #22429

mgr/balancer/upmap_max_iterations must be cast to integer

Added by Dan van der Ster about 1 year ago. Updated 12 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
12/13/2017
Due date:
% Done:

0%

Source:
Community (user)
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

If one does:

ceph config-key set mgr/balancer/upmap_max_iterations 20

then the val is stored as a string, leading to:

2017-12-13 16:54:50.114547 7fcfa41e0700  4 mgr get_config get_configkey: mgr/balancer/upmap_max_iterations
2017-12-13 16:54:50.114551 7fcfa41e0700 4 mgr get_config get_configkey: mgr/balancer/upmap_max_deviation
2017-12-13 16:54:50.114554 7fcfa41e0700 4 ceph_config_get upmap_max_deviation not found
2017-12-13 16:54:50.114645 7fcfa41e0700 4 mgr[balancer] pools ['cephfs_metadata', 'test', 'cephfs_data']
2017-12-13 16:54:50.114678 7fcfa41e0700 -1 balancer.serve:
2017-12-13 16:54:50.114680 7fcfa41e0700 -1 Traceback (most recent call last):
File "/usr/lib64/ceph/mgr/balancer/module.py", line 359, in serve
if self.optimize(plan):
File "/usr/lib64/ceph/mgr/balancer/module.py", line 594, in optimize
return self.do_upmap(plan)
File "/usr/lib64/ceph/mgr/balancer/module.py", line 623, in do_upmap
did = ms.osdmap.calc_pg_upmaps(inc, max_deviation, left, [pool])
File "/usr/lib64/ceph/mgr/mgr_module.py", line 103, in calc_pg_upmaps
max_deviation, max_iterations, pools)
TypeError: an integer is required

There are probably other config options in this module which also need to be cast. I'll prepare a PR.


Related issues

Copied to mgr - Backport #22453: luminous: mgr/balancer/upmap_max_iterations must be cast to integer Resolved

History

#1 Updated by Dan van der Ster about 1 year ago

https://github.com/ceph/ceph/pull/19493

Could omeone please add luminous backport? Thx.

#2 Updated by Sage Weil about 1 year ago

  • Status changed from New to Need Review
  • Backport set to luminous

#3 Updated by Kefu Chai about 1 year ago

  • Status changed from Need Review to Pending Backport

#4 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #22453: luminous: mgr/balancer/upmap_max_iterations must be cast to integer added

#5 Updated by John Spray 12 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF