[SRU] Page not found error on refreshing bowser (in AngularJS-based detail page)

Bug #1681627 reported by hongbin on 2017-04-11
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
High
Shu Muto
Ubuntu Cloud Archive
Undecided
Unassigned
Ocata
Undecided
Unassigned
Pike
Undecided
Unassigned
Zun UI
Critical
Shu Muto

Bug Description

[Impact]

When clicking instances snapshot detail on Images menu and then refresh the pages will get an error:
```
The page you were looking for doesn't exist
You may have mistyped the address or the page may have moved.
```

[Test Case]

1. Deply a OpenStack env with horizon
2. Click instances snapshot detail on Images menu
3. Refresh the page
4. Check if you will see the error 'The page you were looking for doesn't exist'

[Regression Potential]

This problem has been fixed in Queens with two patches [1][2], we need to backport them into Ocata as well.

But in fact, directly backporting these two primitive patches [1][2] into Ocata will not be able to work, because:

1, In Ocata release, getDetailsPath returns "'project/ngdetails/OS::Glance::Image/' + item.id;"

https://github.com/openstack/horizon/blob/stable/ocata/openstack_dashboard/static/app/core/images/images.service.js#L59

function getDetailsPath(item) {
return 'project/ngdetails/OS::Glance::Image/' + item.id;
}

2, In > Ocata release, eg: Pike release, getDetailsPath returns "detailRoute + 'OS::Glance::Image/' + item.id"

https://github.com/openstack/horizon/blob/stable/pike/openstack_dashboard/static/app/core/images/images.service.js#L69

function getDetailsPath(item) {
return detailRoute + 'OS::Glance::Image/' + item.id;
}

So we will see the error 'The current URL, project/ngdetails/OS::Glance::Image/46ef8cab-dfc3-4690-8abb-d416978d237e, didn't match any of these.' when backporting two primitive patches into Ocata. So the following simple changes need to be made in urls.py in addition to the primitive backport patches as well.

-ngdetails_url = url(r'^ngdetails/',
+ngdetails_url = url(r'^project/ngdetails/',

[1] https://review.openstack.org/#/c/541676/
[2] https://review.openstack.org/#/c/553970/

[Original Bug Report]

Once I get into the container detail view, refresh the browser will show a page not found error:

  The current URL, ngdetails/OS::Zun::Container/c54ba416-a955-45b2-848b-aee57b748e08, didn't match any of these

Full output: http://paste.openstack.org/show/605296/

hongbin (hongbin034) on 2017-04-11
description: updated
description: updated
hongbin (hongbin034) on 2017-04-19
Changed in zun-ui:
importance: Undecided → Critical
status: New → Triaged
Shu Muto (shu-mutou) on 2017-06-26
Changed in horizon:
assignee: nobody → Shu Muto (shu-mutou)
Changed in zun-ui:
assignee: nobody → Shu Muto (shu-mutou)
Changed in horizon:
status: New → In Progress

Fix proposed to branch: master
Review: https://review.openstack.org/477461

Changed in zun-ui:
status: Triaged → In Progress
Akihiro Motoki (amotoki) on 2017-06-27
Changed in horizon:
importance: Undecided → High
Changed in horizon:
assignee: Shu Muto (shu-mutou) → Yuriy Zveryanskyy (yzveryanskyy)
Changed in horizon:
assignee: Yuriy Zveryanskyy (yzveryanskyy) → Shu Muto (shu-mutou)
Ying Zuo (yingzuo) on 2017-07-29
Changed in horizon:
milestone: none → pike-rc1

Reviewed: https://review.openstack.org/477447
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=fe0df4579cd091caa49a5a0a14bc3b3d93bcd1a4
Submitter: Jenkins
Branch: master

commit fe0df4579cd091caa49a5a0a14bc3b3d93bcd1a4
Author: Shu Muto <email address hidden>
Date: Thu May 25 18:39:15 2017 +0900

    Enable to refresh ngdetails view

    For now refreshing ngdetails view by browser using F5 key or reload
    button, it causes 404 error from django. To fix this issue, this patch
    adds the url for '/ngdetails'.

    Furthermore, to specify current navigation and to check access grants
    to current panel, each access to Horizon django framework needs its
    dashboard and panel objects. It means that we need to specify dashboard
    and panel that ngdetails view belongs to.

    Also, this patch adds the process and settings to specify dashboard and
    panel object for each ngdetails view.

    Change-Id: I4bcffd2e222ce2df186551cceba0aa38f600d9c8
    Closes-Bug: #1681627

Changed in horizon:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/477461
Committed: https://git.openstack.org/cgit/openstack/zun-ui/commit/?id=7bee55d9258c67de922c656e2428522c6f9b36da
Submitter: Jenkins
Branch: master

commit 7bee55d9258c67de922c656e2428522c6f9b36da
Author: Shu Muto <email address hidden>
Date: Mon Jun 26 17:50:24 2017 +0900

    Enable to refresh details view

    For now refreshing details view by browser using F5 key or reload
    button, it causes 404 error from django. This patch fixes this issue.

    Change-Id: I3deb51a3895ad65be6e83dac61a4a5982ac21c45
    Closes-Bug: #1681627
    Depends-On: I4bcffd2e222ce2df186551cceba0aa38f600d9c8

Changed in zun-ui:
status: In Progress → Fix Released

This could be reopened because of the revert under review: https://review.openstack.org/490131. Or do we open a new bug after a revert?

For the record this affects the details page of the 'trunks' panel just as well as the 'images', 'users' and 'domains' panels.

Shu Muto (shu-mutou) on 2017-08-07
Changed in zun-ui:
status: Fix Released → In Progress
Akihiro Motoki (amotoki) on 2017-08-07
Changed in horizon:
status: Fix Released → New

Fix proposed to branch: master
Review: https://review.openstack.org/491346

Changed in horizon:
status: New → In Progress

This issue was fixed in the openstack/horizon 12.0.0.0rc1 release candidate.

This issue was fixed in the openstack/zun-ui 0.2.0 release.

Akihiro Motoki (amotoki) on 2017-08-17
Changed in horizon:
milestone: pike-rc1 → pike-rc2
Ying Zuo (yingzuo) on 2017-08-23
Changed in horizon:
milestone: pike-rc2 → queens-1

Change abandoned by Shu Muto (<email address hidden>) on branch: master
Review: https://review.openstack.org/496511
Reason: Due to another idea, I will implement in original patch: https://review.openstack.org/#/c/491346/

Ying Zuo (yingzuo) on 2017-10-22
Changed in horizon:
milestone: queens-1 → queens-2
Ying Zuo (yingzuo) on 2017-12-07
Changed in horizon:
milestone: queens-2 → queens-3
Ying Zuo (yingzuo) on 2018-01-27
Changed in horizon:
milestone: queens-3 → queens-rc1
Akihiro Motoki (amotoki) on 2018-02-01
summary: - Page not found error on refreshing bowser
+ Page not found error on refreshing bowser (in AngularJS-based detail
+ page)

We discussed the plan on this bug in the horizon team meeting. The conclusion is we will land only https://review.openstack.org/#/c/520340/ (which just allows refresh) in Queens and discuss how to recover navigation in Rocky.
Based on this, this bug will be closed by https://review.openstack.org/#/c/520340/ and the latter will be tackled as a separate bug.

Akihiro Motoki (amotoki) wrote :

bug 1746706 is filed on the navigation issue.

Akihiro Motoki (amotoki) wrote :

there is another issue (bug 1746709) too. This also needs to be tackled later.

Changed in horizon:
assignee: Shu Muto (shu-mutou) → Akihiro Motoki (amotoki)
Akihiro Motoki (amotoki) on 2018-02-01
Changed in horizon:
assignee: Akihiro Motoki (amotoki) → Shu Muto (shu-mutou)
Changed in horizon:
assignee: Shu Muto (shu-mutou) → Akihiro Motoki (amotoki)

Reviewed: https://review.openstack.org/520340
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=077163a03c9aea08efd56251e49d69eb1cc4d093
Submitter: Zuul
Branch: master

commit 077163a03c9aea08efd56251e49d69eb1cc4d093
Author: Shu Muto <email address hidden>
Date: Thu Nov 16 16:55:46 2017 +0900

    Enable to refresh ngdetails view

    For now, refreshing ngdetails view by browser using F5 key or reload
    button, it causes 404 error from django. To fix this issue, this patch
    adds the url for '/ngdetails' into django.

    To reproduce navigations, each request for views.py requires
    'dashboard' and 'panel' object. Otherwise django side returns
    500 error.

    However the URL for request of details page (i.e. /ngdetails/)
    can not provide informations to set the proper navigation.

    So this patch set them to default dashboard and default panel.

    This patch focuses to prevent 500 error. So the issue for
    settings of proper navigation will be fixed by subsequent patch.

    Change-Id: Ib9f1fe48b3cdecff5ad56e68a5ba58a41cb35f38
    Closes-Bug: #1681627

Changed in horizon:
status: In Progress → Fix Released
Shu Muto (shu-mutou) on 2018-02-06
Changed in zun-ui:
status: In Progress → Fix Released

This issue was fixed in the openstack/horizon 13.0.0.0rc1 release candidate.

Reviewed: https://review.openstack.org/541676
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=a0fc40b4e85d3090e657cca9824de719b33a7ba2
Submitter: Zuul
Branch: stable/pike

commit a0fc40b4e85d3090e657cca9824de719b33a7ba2
Author: Shu Muto <email address hidden>
Date: Thu Nov 16 16:55:46 2017 +0900

    Enable to refresh ngdetails view

    For now, refreshing ngdetails view by browser using F5 key or reload
    button, it causes 404 error from django. To fix this issue, this patch
    adds the url for '/ngdetails' into django.

    To reproduce navigations, each request for views.py requires
    'dashboard' and 'panel' object. Otherwise django side returns
    500 error.

    However the URL for request of details page (i.e. /ngdetails/)
    can not provide informations to set the proper navigation.

    So this patch set them to default dashboard and default panel.

    This patch focuses to prevent 500 error. So the issue for
    settings of proper navigation will be fixed by subsequent patch.

    Change-Id: Ib9f1fe48b3cdecff5ad56e68a5ba58a41cb35f38
    Closes-Bug: #1681627
    (cherry picked from commit 077163a03c9aea08efd56251e49d69eb1cc4d093)

tags: added: in-stable-pike
Akihiro Motoki (amotoki) on 2018-03-12
Changed in horizon:
assignee: Akihiro Motoki (amotoki) → Shu Muto (shu-mutou)

This issue was fixed in the openstack/horizon 12.0.3 release.

This issue is affecting also openstack/horizon 11.0.4 release (Ocata)
We need a backport of the bug fix.

Akihiro Motoki (amotoki) wrote :

Everyone can propose a backport to stable branches. Feel free to propose a backport to ocata.
Ocata is entering the extended maintenance phase, so we are looking for volunteers to maintain stable/ocata branch.

Akihiro Motoki (amotoki) wrote :

I added ocata-backport-potential tag so that anyone who is interested in stable/ocata can verify a fix in stable/ocata and propose a backport.

tags: added: ocata-backport-potential
Hua Zhang (zhhuabj) wrote :

In fact, backporting two primitive patches [1][2] into Ocata will not be able to work, because:

1, In Ocata release, getDetailsPath returns "'project/ngdetails/OS::Glance::Image/' + item.id;"

https://github.com/openstack/horizon/blob/stable/ocata/openstack_dashboard/static/app/core/images/images.service.js#L59

function getDetailsPath(item) {
return 'project/ngdetails/OS::Glance::Image/' + item.id;
}

2, In > Ocata release, eg: Pike release, getDetailsPath returns "detailRoute + 'OS::Glance::Image/' + item.id"

https://github.com/openstack/horizon/blob/stable/pike/openstack_dashboard/static/app/core/images/images.service.js#L69

function getDetailsPath(item) {
return detailRoute + 'OS::Glance::Image/' + item.id;
}

So we will see the error 'The current URL, project/ngdetails/OS::Glance::Image/46ef8cab-dfc3-4690-8abb-d416978d237e, didn't match any of these.' when backporting two primitive patches into Ocata. So the following simple changes need to be made in urls.py in addition to the primitive backport patches as well.

-ngdetails_url = url(r'^ngdetails/',
+ngdetails_url = url(r'^project/ngdetails/',

I will propose a backport to ocata later.

[1] https://review.openstack.org/#/c/541676/
[2] https://review.openstack.org/#/c/553970/

Submit two dependent submissions as below:

https://review.openstack.org/629373 Enable to refresh ngdetails view
https://review.openstack.org/629374 Fix Angular errors in openstack_auth

Reviewed: https://review.openstack.org/629373
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=f557a8dd34e91b60de2f4a192aad3a0861b4b5ac
Submitter: Zuul
Branch: stable/ocata

commit f557a8dd34e91b60de2f4a192aad3a0861b4b5ac
Author: Shu Muto <email address hidden>
Date: Thu Nov 16 16:55:46 2017 +0900

    Enable to refresh ngdetails view

    For now, refreshing ngdetails view by browser using F5 key or reload
    button, it causes 404 error from django. To fix this issue, this patch
    adds the url for '/ngdetails' into django.

    To reproduce navigations, each request for views.py requires
    'dashboard' and 'panel' object. Otherwise django side returns
    500 error.

    However the URL for request of details page (i.e. /ngdetails/)
    can not provide informations to set the proper navigation.

    So this patch set them to default dashboard and default panel.

    This patch focuses to prevent 500 error. So the issue for
    settings of proper navigation will be fixed by subsequent patch.

    Change-Id: Ib9f1fe48b3cdecff5ad56e68a5ba58a41cb35f38
    Closes-Bug: #1681627
    (cherry picked from commit 077163a03c9aea08efd56251e49d69eb1cc4d093)
    (cherry picked from commit a0fc40b4e85d3090e657cca9824de719b33a7ba2)
    Signed-off-by: Zhang Hua <email address hidden>

tags: added: in-stable-ocata
Hua Zhang (zhhuabj) on 2019-04-03
summary: - Page not found error on refreshing bowser (in AngularJS-based detail
- page)
+ [SRU] Page not found error on refreshing bowser (in AngularJS-based
+ detail page)
description: updated
tags: added: sts sts-sru-needed
Hua Zhang (zhhuabj) wrote :
Edward Hope-Morley (hopem) wrote :

@zhhuabj my apologies, the PR i mentioned above is for Cinder not Horizon so we will need to submit an SRU for Pike as well.

Hua Zhang (zhhuabj) wrote :

@Ed, the branch 12.0.3 has included those two fixed patches, so horizon pike 3:12.0.3-0ubuntu1~cloud1 released on Apr 2 has included them.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers