]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix pool renaming functionality 37510/head
authorStephan Müller <smueller@suse.com>
Wed, 13 Nov 2019 12:16:55 +0000 (13:16 +0100)
committerErnesto Puerta <epuertat@redhat.com>
Fri, 2 Oct 2020 08:57:06 +0000 (10:57 +0200)
The problem was that, if a pool was renamed the routine to update tried
to work on the old pool name and didn't used the info that the pool got
renamed, therefore an error occurred in the UI saying that the pool
could not be found.

Fixes: https://tracker.ceph.com/issues/42776
Signed-off-by: Stephan Müller <smueller@suse.com>
(cherry picked from commit de933cd3c82b6a7d5c4ddfa77804509c9fcaa3db)

Conflicts:
      qa/tasks/mgr/dashboard/test_pool.py:
      - Ignore incoming quota test

src/pybind/mgr/dashboard/controllers/pool.py

index 4737b01a28b81502c48d2a2392fc8a84f129c7bd..c6919fc2a9390902e24296495f736143b07b80ac 100644 (file)
@@ -83,6 +83,8 @@ class Pool(RESTController):
     @pool_task('edit', ['{pool_name}'])
     def set(self, pool_name, flags=None, application_metadata=None, configuration=None, **kwargs):
         self._set_pool_values(pool_name, application_metadata, flags, True, kwargs)
+        if kwargs.get('pool'):
+            pool_name = kwargs['pool']
         RbdConfiguration(pool_name).set_configuration(configuration)
         self._wait_for_pgs(pool_name)