]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Add whitelist to guard 27492/head
authorErnesto Puerta <epuertat@redhat.com>
Fri, 5 Apr 2019 16:22:30 +0000 (18:22 +0200)
committerErnesto Puerta <epuertat@redhat.com>
Wed, 10 Apr 2019 12:09:28 +0000 (14:09 +0200)
commit0eca5e812052ec749bac9fa91f2e76bb5346fbd5
tree926f8ae9255e44a52efec37fe4498d71b59305e2
parentd52f6c025e443d568f1be5d1e7b7712d997ba8dc
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>
(cherry picked from commit c64b815386d9b7b89c69fb7e8387c7b7b7cf408c)
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