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

Bug #1681627 reported by hongbin
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Shu Muto
Ubuntu Cloud Archive
Invalid
Undecided
Unassigned
Ocata
Fix Released
Undecided
Unassigned
Pike
Fix Released
Undecided
Unassigned
Zun UI
Fix Released
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)
description: updated
description: updated
hongbin (hongbin034)
Changed in zun-ui:
importance: Undecided → Critical
status: New → Triaged
Shu Muto (shu-mutou)
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun-ui (master)

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

Changed in zun-ui:
status: Triaged → In Progress
Akihiro Motoki (amotoki)
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)
Changed in horizon:
milestone: none → pike-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zun-ui (master)

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
Revision history for this message
Bence Romsics (bence-romsics) wrote : Re: Page not found error on refreshing bowser

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)
Changed in zun-ui:
status: Fix Released → In Progress
Akihiro Motoki (amotoki)
Changed in horizon:
status: Fix Released → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun-ui (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0rc1

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/zun-ui 0.2.0

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

Akihiro Motoki (amotoki)
Changed in horizon:
milestone: pike-rc1 → pike-rc2
Ying Zuo (yingzuo)
Changed in horizon:
milestone: pike-rc2 → queens-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

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)
Changed in horizon:
milestone: queens-1 → queens-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Ying Zuo (yingzuo)
Changed in horizon:
milestone: queens-2 → queens-3
Ying Zuo (yingzuo)
Changed in horizon:
milestone: queens-3 → queens-rc1
Akihiro Motoki (amotoki)
summary: - Page not found error on refreshing bowser
+ Page not found error on refreshing bowser (in AngularJS-based detail
+ page)
Revision history for this message
Akihiro Motoki (amotoki) wrote : Re: 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.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

bug 1746706 is filed on the navigation issue.

Revision history for this message
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)
Changed in horizon:
assignee: Akihiro Motoki (amotoki) → Shu Muto (shu-mutou)
Changed in horizon:
assignee: Shu Muto (shu-mutou) → Akihiro Motoki (amotoki)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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)
Changed in zun-ui:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/541676

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.0.0rc1

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/pike)

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
Revision history for this message
Gloria Gu (gloria-gu) wrote : Re: Page not found error on refreshing bowser (in AngularJS-based detail page)
Akihiro Motoki (amotoki)
Changed in horizon:
assignee: Akihiro Motoki (amotoki) → Shu Muto (shu-mutou)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.3

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

Revision history for this message
Giuseppe Petralia (peppepetra) wrote : Re: Page not found error on refreshing bowser (in AngularJS-based detail page)

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

Revision history for this message
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.

Revision history for this message
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
Revision history for this message
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/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/629373

Revision history for this message
Hua Zhang (zhhuabj) wrote : Re: Page not found error on refreshing bowser (in AngularJS-based detail page)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/ocata)

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
Revision history for this message
Edward Hope-Morley (hopem) wrote : Re: Page not found error on refreshing bowser (in AngularJS-based detail page)

Pike patch will be included in PR done in bug 1822192

Hua Zhang (zhhuabj)
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
Revision history for this message
Hua Zhang (zhhuabj) wrote :
Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

@zhhuabj ack thanks, lets get the ocata sru underway then

Revision history for this message
Corey Bryant (corey.bryant) wrote :

@zhhuabj it looks like upstream stable/ocata is still in extended maintenance mode. Would you be able to submit the patch to stable/ocata?

Revision history for this message
Hua Zhang (zhhuabj) wrote :

@corey, yeah, I have submitted the patch to stable/ocata before, see https://bugs.launchpad.net/horizon/+bug/1681627/comments/27, and they have already been merged by upstream as well now. thanks.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

@Hua, thanks I somehow missed that last time. By the way I don't think this fix landed in our pike package. At least I did a quick grep for "ngdetails" and didn't find the first LOC from the stable/pike upstream patch. Anyway Pike is EOL now but we should at least change the status above from Fix released to won't fix.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

@Hua, sorry I'm confused on what's needed for Ocata.

The SRU Details mentioned we need:

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

and

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

Are the ngdetails_url changes available in any upstream commits?

Thanks,
Corey

Revision history for this message
Hua Zhang (zhhuabj) wrote :

@corey,

for Pike, how did you do a quick grep for "ngdetails" ? just now I downloaded the source package (sudo apt-get source openstack-dashboard=3:12.0.3-0ubuntu1~cloud1) and confirmed the following two changes have been in Pike.

https://review.opendev.org/#/c/541676/
https://review.opendev.org/#/c/553970/

for Ocata, yeah, the ngdetails_url changes for Ocata have been available in upstream (https://review.opendev.org/#/c/629374/4/openstack_dashboard/urls.py)

https://review.openstack.org/629373
https://review.openstack.org/629374

Revision history for this message
Corey Bryant (corey.bryant) wrote :

I was confused by the bug description because it sounded like there were 3 patches required, but it looks like just the 2 are required. Also for pike I was confused because the "# add URL for ngdetails" bits were missing but they are removed by the other patch so pike looks ok.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

s/missing/moved/

Revision history for this message
Corey Bryant (corey.bryant) wrote : Please test proposed package

Hello hongbin, or anyone else affected,

Accepted horizon into ocata-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:ocata-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-ocata-needed to verification-ocata-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-ocata-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-ocata-needed
Changed in cloud-archive:
status: New → Invalid
Revision history for this message
Hua Zhang (zhhuabj) wrote :

Successfully verified ocata-proposed openstack-dashboard=3:11.0.4-0ubuntu1~cloud2.6, it works, thanks.

tags: added: verification-ocata-done
removed: verification-ocata-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote : Update Released

The verification of the Stable Release Update for horizon has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package horizon - 3:11.0.4-0ubuntu1~cloud2.6
---------------

 horizon (3:11.0.4-0ubuntu1~cloud2.6) xenial-ocata; urgency=medium
 .
   * Enable to refresh ngdetails view (LP: #1681627)
     - d/p/0001-Enable-to-refresh-ngdetails-view.patch
     - d/p/0002-Fix-Angular-errors-in-openstack_auth.patch

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon ocata-eol

This issue was fixed in the openstack/horizon ocata-eol release.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.