Heat - Select template doesn't check well template source method

Bug #1360244 reported by Marcos Lobo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
heat-dashboard
Confirmed
Low
Unassigned

Bug Description

On Horizon Icehouse 2014.1.1 release and Heat Icehouse 2014.1.1 release.

HOW TO REPRODUCE
---------------------------------
1.- Go to http://mydomain/dashboard/project/stacks/select_template
2.- Select "URL" template source
3.- Fill the URL field with an URL to a file with invalid syntax and click "Next"
3.- Horizon raises a correct error message about the syntax. OK
4.- Change template source to "Direct input"
5.- Fill textarea field with whatever characters (it doesn't matter) and click "Next"
6.- Horizon raises this error message: "Please specify a template using only one source method." ?????

CONCLUSION
--------------------
So, the problem is: Horizon doesn't remove the data from HTML fields, on "select template" webpage, when something was wrong. Then, when you try another template source, Horizon doesn't remove the data from the other HTML fields before to execute the HTML form.

My question, is this the behavior expected?. I was expecting that Horizon checks only the information about the "template source" that selected right now, not to check the previous selection.

Tags: heat
Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

I cannot reproduce this. I get 'ERROR: Template not in valid format: The template is not a JSON object or YAML mapping.' at step 6. Perhaps this depends on what you are entering in steps 3 and 5. Can you provide more specific details on what to enter on steps 3 and 5?

Akihiro Motoki (amotoki)
tags: added: heat
Revision history for this message
Marcos Lobo (marcos-fermin-lobo) wrote :

Step 3: I put this URL https://raw.githubusercontent.com/openstack/heat-templates/master/hot/hello_world.yaml
Step 5: I put this data: adasdasdsadasdsadsa

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

I overlooked the fact that you are running this on Icehouse, and I am running the latest master (juno). Can you reproduce this on master?

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

BTW, I tried the additional input you provided and still cannot reproduce the error.

Changed in horizon:
status: New → Incomplete
Revision history for this message
Miguel Grinberg (miguelgrinberg) wrote :

I stumbled upon a similar issue, and I'm using a devstack master.

There is a much easier way to reproduce that the steps indicated by the OP:

1. Click on "Launch Stack"
2. Set Template Source to "File", and select a template file. Do not click the Next button.
3. With a filename entered, switch the Template Source to URL, and enter a valid URL to a template.
4. Click Next. The error "Please specify a template using only one source method." is displayed.

The problem is that the form fields that hold File, URL and Direct Input templates are different, and there is always one visible at a time. The form validation expects only one to have content, but since two of these are always hidden I think validating that the hidden fields are empty is pointless, the form should take the template from the correct field, and ignore any content that exists on the other two.

Changed in horizon:
status: Incomplete → Confirmed
assignee: nobody → Miguel Grinberg (miguelgrinberg)
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/123615

Changed in horizon:
status: Confirmed → In Progress
Changed in horizon:
assignee: Miguel Grinberg (miguelgrinberg) → Lucas Palm (lapalm)
Lucas Palm (lapalm)
Changed in horizon:
assignee: Lucas Palm (lapalm) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/123615
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Akihiro Motoki (amotoki)
Changed in horizon:
status: In Progress → Confirmed
importance: Undecided → Low
Revision history for this message
Akihiro Motoki (amotoki) wrote :

heat panel is split out to heat-dashboard. Retargeting to heat-dashboard.

affects: horizon → heat-dashboard
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.