]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: allow getting fresh inventory data from the orchestrator 41387/head
authorKiefer Chang <kiefer.chang@suse.com>
Mon, 27 Apr 2020 08:08:22 +0000 (16:08 +0800)
committerVolker Theile <vtheile@suse.com>
Tue, 18 May 2021 15:13:53 +0000 (17:13 +0200)
commit92a42dd76582e2ca06c1d3d78874e029c183bab9
treea5460185753b58df3b091c7c0f35c351fb5a99c9
parent77edcfdcdd732ce75987035a46d8c9a560e57b34
mgr/dashboard: allow getting fresh inventory data from the orchestrator

When there is a device change, a `ceph orch device ls --refresh` command
needs to be called so the orchestrator can invalidate its cache and
refresh all devices on all nodes. Currently, the call is asynchronous and
there is no way to determine is a refresh is done or not.

To allow doing a refresh in the Dashboard:
- The inventory device list is periodically updated with cached data.
- If the user clicks the refresh button, a refresh call is sent to the
  orchestrator. Thus if there are device changes, it will be revealed soon
  because of the periodical update.

Fixes: https://tracker.ceph.com/issues/44803
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
(cherry picked from commit 1147d6dca04fe6e45b385b549db37775fce54edd)

Conflicts:
src/pybind/mgr/dashboard/controllers/orchestrator.py
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory.component.ts
src/pybind/mgr/dashboard/controllers/orchestrator.py
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/orchestrator.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/orchestrator.service.ts