MCPcopy Create free account
hub / github.com/ceph/ceph / stop_pg_num_changes

Method stop_pg_num_changes

qa/tasks/ceph_manager.py:2423–2440  ·  view source on GitHub ↗

Reset all pg_num_targets back to pg_num, canceling splits and merges

(self)

Source from the content-addressed store, hash-verified

2421 return True
2422
2423 def stop_pg_num_changes(self):
2424 """
2425 Reset all pg_num_targets back to pg_num, canceling splits and merges
2426 """
2427 self.log('Canceling any pending splits or merges...')
2428 osd_dump = self.get_osd_dump_json()
2429 try:
2430 for pool in osd_dump['pools']:
2431 if pool['pg_num'] != pool['pg_num_target']:
2432 self.log('Setting pool %s (%d) pg_num %d -> %d' %
2433 (pool['pool_name'], pool['pool'],
2434 pool['pg_num_target'],
2435 pool['pg_num']))
2436 self.raw_cluster_cmd('osd', 'pool', 'set', pool['pool_name'],
2437 'pg_num', str(pool['pg_num']))
2438 except KeyError:
2439 # we don't support pg_num_target before nautilus
2440 pass
2441
2442 def set_pool_pgpnum(self, pool_name, force):
2443 """

Callers 1

taskFunction · 0.80

Calls 3

get_osd_dump_jsonMethod · 0.95
raw_cluster_cmdMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected