glance wizard form var passing broken

Bug #1503396 reported by Kevin Fox
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Critical
Richard Jones

Bug Description

A user of the app-catalog-ui plugin reported horizon's broken with passing form vars from the app catalog to the glance wizard.

I've narrowed it down to commit:
0f39dea2c7e722781fe3374abbaada781488c2cc

Reverting the commit fixes the issue:

git diff 3d156f04759f27b8252915d09c09aa8fcf2a70d7..0f39dea2c7e722781fe3374abbaada781488c2cc | patch -R -p1

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

related patch that caused the issue: https://review.openstack.org/#/c/222438/

Changed in horizon:
assignee: nobody → Richard Jones (r1chardj0n3s)
Revision history for this message
Richard Jones (r1chardj0n3s) wrote :

I have attempted, and failed, to install Murano to reproduce the problem (since a cursory glance at the code didn't tell me anything in particular).

Could someone who can reproduce this problem please take a screenshot of the Javascript console with the error that's causing the problem?

Revision history for this message
Kirill Zaitsev (kzaitsev) wrote :

I belive, that this bug is not about murano, but about app-catalog-ui (https://github.com/openstack/app-catalog-ui).
The latter has support for murano, but the problem seems to be with glance support, right?

Revision history for this message
Chris Hoge (hoge) wrote :

I originally reported the bug. The way I produced it was to install devstack with App Catalog support from master. When trying to launch images or apps from the catalog, image data was not auto-filled. I resolved it for my needs by pinning to an earlier release candidate of horizon.

I don't have much more information, as I haven't been working on the App Catalog much in the last few weeks.

Revision history for this message
Kevin Fox (kevpn) wrote :

The plugin in question is here:
https://github.com/openstack/app-catalog-ui

Revision history for this message
Richard Jones (r1chardj0n3s) wrote :

OK, I will attempt to install devstack with app catalog support.

Revision history for this message
Richard Jones (r1chardj0n3s) wrote :

I have installed devstack with the above app-catalog-ui's README instructions included and no Application Catalog was visible in Horizon. If I add murano to the devstack it appears, but I can't get the murano install to actually work. I've now spent far too long trying to just reproduce an environment just to test this bug in app-catalog-ui :-(

Without some explicit instructions for reproducing an environment to test this bug with, I'm going to have to unassign myself from it.

Changed in horizon:
assignee: Richard Jones (r1chardj0n3s) → nobody
Revision history for this message
Christopher Aedo (docaedo) wrote :

Richard, I used this local.conf just now to spin up devstack with the app-catalog-ui: http://paste.openstack.org/show/480413/

It's important to note this is not Murano, and you do not need to install murano or anything other than "app-catalog-ui" in order to reproduce this bug. Once your environment is running, under Project, you should see "Catalog" below "Orchestration".

I apologize for not responding to this sooner, I though I was subscribed to this bug so would have been able to share some more info. I'll watch this bug, and can also be found on IRC (docaedo).

Revision history for this message
Richard Jones (r1chardj0n3s) wrote :

Thanks, Christopher!

Revision history for this message
Christopher Aedo (docaedo) wrote :

I think I was mistaken about the previous posted error. Here are the steps I followed to verify the suspected commit is at issue:

Run devstack with this local.conf: http://paste.openstack.org/show/480413/
cd /opt/stack/horizon
git checkout 6a76dbd2fc50f2c7f8369eb92ce46bbe88069a68
python manage.py compress --force
sudo service apache2 restart

[at this point, go to horizon in browser, and under Project/Catalog click on one of the glance images and choose Install - the "create an image" dialog should open and be prefilled including the URL for that glance image]

git checkout 0f39dea2c7e722781fe3374abbaada781488c2cc
python manage.py compress --force
sudo service apache2 restart

[return to horizon in browser, reload the catalog page, and try create an image - create an image dialog will now open with name and description filled, but "image location" will not be filled in]

In my browser (firefox) I'm not seeing any errors that seem related to this in any way - at this point I really can't make sense of why 0f39dea2 would have broken this one field.

Revision history for this message
Richard Jones (r1chardj0n3s) wrote :

I have successfully reproduced the problem, thanks for your help Christopher (note I needed to remove HOST_IP from your local.conf to make it work).

Revision history for this message
Richard Jones (r1chardj0n3s) wrote :

The reason the pre-filling of the form was working was that the Javascript code attached to the form wasn't working. The patch cited fixed the Javascript so it worked. The form variable filled in by the pre-fill (by Django) is now overridden by the AngularJS model value (copyFrom) which isn't set by the pre-fill, hence is blank, and thus the field is blank now. I have corrected the bug in the AngularJS code and the values now pre-fill correctly.

Note that Horizon now uses strict AngularJS dependency injection an errors appear in the console from the app-catalog-ui JS code as a result. They don't appear to prevent it working in my testing though.

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/251670

Changed in horizon:
assignee: nobody → Richard Jones (r1chardj0n3s)
status: New → In Progress
Revision history for this message
Christopher Aedo (docaedo) wrote :

Can confirm 251670 resolves the issue - thanks Richard!

Changed in horizon:
importance: Undecided → High
importance: High → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit 50a868094f3da1062bd8c476fda16fc18bad605c
Author: Richard Jones <email address hidden>
Date: Tue Dec 1 17:11:13 2015 +1100

    Fix Create Image angularjs code

    This code intended to allow pre-filling of the form values through
    Django's handling of GET parameters, but it did not do so as the
    code was incorrect. This was not previously noticed as the angularjs
    code wasn't actually being executed. Once it was, it broke. Ironic,
    I know.

    Change-Id: I8d641de9246fd4f43c96bf85d47bb648f4401def
    Closes-Bug: 1503396

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 9.0.0.0b3

This issue was fixed in the openstack/horizon 9.0.0.0b3 development milestone.

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.