]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: Add whitelist to guard
authorErnesto Puerta <epuertat@redhat.com>
Fri, 5 Apr 2019 16:22:30 +0000 (18:22 +0200)
committerErnesto Puerta <epuertat@redhat.com>
Tue, 9 Apr 2019 10:18:31 +0000 (12:18 +0200)
commitc64b815386d9b7b89c69fb7e8387c7b7b7cf408c
treea1e3610b6cfa93d3e470ed365da91cb7fea49aaa
parent8a5590b6aa15aec6b1229c6c30b76c9c46378e1f
mgr/dashboard: Add whitelist to guard

After PR https://github.com/ceph/ceph/pull/26572, when RGW is not
  configured, accessing /rgw drop-down (daemons, users or buckets)
  results in nothing apparently happening (not even an error).

  Under the curtains, what is happening is that the ModuleStatusGuard
  has redirected the route to the rgw/501, but as this route is now
  under parent rgw route handler, which sets CanActivateChild guards,
  this results in a new ModuleStatusGuard invokation, a subsequent
  failure and a new redirection to rgw/501.

  Several approaches could be taken here:
  - Remove error pages from lazy-loaded modules. Probably it does not
  make sense to have a 501 page per component.
  - Add some whitelist to avoid this kind of loop (e.g.: 501, or any
      error page).
  - Set a max number of redirections (cautionary measure).

Fixes: https://tracker.ceph.com/issues/39125
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/services/module-status-guard.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/module-status-guard.service.ts