Horizon error on accessing psuedo-folder

Bug #1312222 reported by Nicholas Chase
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Lukas Bezdicka
Icehouse
Fix Released
High
Lukas Bezdicka

Bug Description

I have a fresh devstack installation on Ubuntu. When I create a public swift container, then upload a file into a pseudo-folder (for example, a file with an "Object Name" of "/photos/pic.jpg") the psuedo-folder seems to be automatically created in the UI, but if I click it I get:

NoReverseMatch at /project/containers/publicbucket/photos/
Reverse for 'breadcrumb.url' with arguments '(u'publicbucket/',)' and keyword arguments '{}' not found. 0 pattern(s) tried: []

Same thing happens if I create the pseudo-folder first.

Complete trace attached.

Revision history for this message
Nicholas Chase (nickchase) wrote :
Matthias Runge (mrunge)
Changed in horizon:
status: New → Confirmed
importance: Undecided → High
milestone: none → ongoing
Changed in horizon:
assignee: nobody → Gary W. Smith (gary-w-smith)
Changed in horizon:
assignee: Gary W. Smith (gary-w-smith) → nobody
Revision history for this message
Matthias Runge (mrunge) wrote :

this has been addressed in https://review.openstack.org/#/c/92428

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

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

commit dceb2cc8d6f0f02e1f741d82097861a950cd951b
Author: Lukas Bezdicka <email address hidden>
Date: Tue May 6 20:16:45 2014 +0200

    Fix pseudo-folder content listing

    Change-Id: Ib01eaea0493a294daed7032e6f9f82c2a0e8798a
    Closes-Bug: #1312222
    Closes-Bug: rhbz#1094783

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/93000

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

Reviewed: https://review.openstack.org/93000
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=e5f04c239530ba6ca820ddc9e6be69f0b84f58a4
Submitter: Jenkins
Branch: stable/icehouse

commit e5f04c239530ba6ca820ddc9e6be69f0b84f58a4
Author: Lukas Bezdicka <email address hidden>
Date: Tue May 6 20:16:45 2014 +0200

    Fix pseudo-folder content listing

    Change-Id: Ib01eaea0493a294daed7032e6f9f82c2a0e8798a
    Closes-Bug: #1312222
    Closes-Bug: rhbz#1094783
    (cherry picked from commit dceb2cc8d6f0f02e1f741d82097861a950cd951b)

tags: added: in-stable-icehouse
Julie Pichon (jpichon)
Changed in horizon:
milestone: ongoing → juno-1
assignee: nobody → Lukas Bezdicka (social-b)
Revision history for this message
Thomas Capricelli (orzelf) wrote :

Applied the patch locally, it works. thanks :)

Revision history for this message
John Pierce (john-pierce) wrote :

I had this exact same problem on my CentOS 6.5 OpenStack controller running latest stable yum version of horizon. So I applied this fix locally (removing tick marks around the url) as the fixed code reflects now, but alas I still got the same problem (or nearly the same problem) when I click on the pseudo-folder. I'd get this in the Apache error log:

NoReverseMatch: u"'horizon" is not a registered namespace

After a big stack trace. When I turned on template debugging I found this index.html mentioned as the source of the problem:

/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/containers/templates/containers/index.html

I then saw on line 16 the same single tick marks around the url 'horizon:project:containers:index' and then again on line 21 the same tick marks around that. So, on a pure hunch (cuz I'm not a DJango nor Python programmer), I removed the tick marks from this file on both these lines and, voila, all is well! I can navigate to pseudo-folders now. Very bizarre!

Am I finding a specific bug or is my installation messed up?

My line 16 of this index.html looks like this now:

<a href="{% url horizon:project:containers:index %}{{ container_name }}/">{{ container_name }}</a> : /

and my line 21 now looks like this:

<a href="{% url horizon:project:containers:index %}{{ container_name }}/{{ folder.1 }}">{{ folder.0 }}</a> /

I dunno why this works and why it was broken with tick marks, but just letting anyone who cares know. I'm not an OpenStack tester or contributor right now, so go gentle on me if I'm violating the process.

Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
Hu Yansheng (yansheng-hu) wrote :

I had this exact same problem as John Pierce (john-pierce) wrote on 2014-05-30.( CentOS 6.5 OpenStack controller running latest stable yum version of horizon, the patch doesn't work) when I click on the pseudo-folder. I still got:
" NoReverseMatch: u"'horizon" is not a registered namespace"

Revision history for this message
Hu Yansheng (yansheng-hu) wrote :

update file /usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/containers/templates/containers/index.html line 16&21 as John Pierce's comments, then it works well.

Revision history for this message
Julie Pichon (jpichon) wrote :

John, Hu, could one of you file a separate bug about this so we can track the additional fix appropriately? Thank you.

Revision history for this message
Hu Yansheng (yansheng-hu) wrote :

Julie and John, I created it, refer: https://bugs.launchpad.net/horizon/+bug/1331271

Revision history for this message
John Pierce (john-pierce) wrote : Re: [Bug 1312222] Re: Horizon error on accessing psuedo-folder

Thank you!
Try not to become a man of success but rather to become a man of
value. -- Albert Einstein

On Wed, Jun 18, 2014 at 2:19 AM, Hu Yansheng
<email address hidden> wrote:
> Julie and John, I created it, refer:
> https://bugs.launchpad.net/horizon/+bug/1331271
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1312222
>
> Title:
> Horizon error on accessing psuedo-folder
>
> Status in OpenStack Dashboard (Horizon):
> Fix Released
> Status in OpenStack Dashboard (Horizon) icehouse series:
> Fix Released
>
> Bug description:
> I have a fresh devstack installation on Ubuntu. When I create a
> public swift container, then upload a file into a pseudo-folder (for
> example, a file with an "Object Name" of "/photos/pic.jpg") the
> psuedo-folder seems to be automatically created in the UI, but if I
> click it I get:
>
> NoReverseMatch at /project/containers/publicbucket/photos/
> Reverse for 'breadcrumb.url' with arguments '(u'publicbucket/',)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
>
> Same thing happens if I create the pseudo-folder first.
>
> Complete trace attached.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/horizon/+bug/1312222/+subscriptions

Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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