Project

General

Profile

Actions

Bug #22429

closed

mgr/balancer/upmap_max_iterations must be cast to integer

Added by Dan van der Ster over 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

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

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 1 (0 open1 closed)

Copied to mgr - Backport #22453: luminous: mgr/balancer/upmap_max_iterations must be cast to integerResolvedShinobu KinjoActions
Actions #1

Updated by Dan van der Ster over 6 years ago

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

Could omeone please add luminous backport? Thx.

Actions #2

Updated by Sage Weil over 6 years ago

  • Status changed from New to Fix Under Review
  • Backport set to luminous
Actions #3

Updated by Kefu Chai over 6 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #4

Updated by Nathan Cutler over 6 years ago

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

Updated by John Spray about 6 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF