Bug 1270339

Summary: Submitting a half finished provisioning request actually creates a request
Product: Red Hat CloudForms Management Engine Reporter: Pete Savage <psavage>
Component: ProvisioningAssignee: Brandon Dunne <bdunne>
Status: CLOSED ERRATA QA Contact: Pete Savage <psavage>
Severity: high Docs Contact:
Priority: high    
Version: 5.4.0CC: dclarizi, gmccullo, hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.5.0.10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-08 13:36:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pete Savage 2015-10-09 16:56:56 UTC
Description of problem: Submitting a half finished provisioning request actually creates a request.


Version-Release number of selected component (if applicable): 5.4.1, 5.4.2, 5.4.3


How reproducible: 100%


Steps to Reproduce:
1. Add a provider (vmware tested)
2. Infrastructure -> Virtual Machines -> Lifecycle -> Provision VMs
3. Choose a template
4. Enter name, email on first page
5. Enter VM name on catalog page
6. Hit submit

Actual results: Errors are shown on the screen stating that the environment selections are missing, but the request is submitted and Automation begins to work on it. It obviously fails when it tries to use the missing information.

Expected results: The errors should be displayed, but NO request should be created.


Additional info:

Comment 3 CFME Bot 2015-11-04 05:16:49 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/a973391c7b9e385de11f6f100af77d3df823846c

commit a973391c7b9e385de11f6f100af77d3df823846c
Author:     Brandon Dunne <bdunne>
AuthorDate: Tue Nov 3 18:06:47 2015 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Tue Nov 3 18:09:37 2015 -0500

    Test validation_method doesn't revert previous failures
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1270339

 spec/models/miq_request_workflow_spec.rb | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comment 4 CFME Bot 2015-11-04 05:19:19 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/189391e5452064e76045fcb4c791904a96011da1

commit 189391e5452064e76045fcb4c791904a96011da1
Author:     Brandon Dunne <bdunne>
AuthorDate: Tue Nov 3 18:08:03 2015 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Tue Nov 3 18:09:38 2015 -0500

    validation_method was setting previously invalid status back to valid
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1270339

 app/models/miq_request_workflow.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comment 5 CFME Bot 2015-11-04 05:25:49 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/96c0c26290aeab4dff4078e24e4092c35e629bfc

commit 96c0c26290aeab4dff4078e24e4092c35e629bfc
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Nov 2 16:57:36 2015 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Tue Nov 3 18:09:37 2015 -0500

    make_request validates and returns false or instance
    
    Only enumerate through all dialog fields looking for errors if validation failed
    Update comment on #validate_fields to describe its purpose since its name is deceiving
    https://bugzilla.redhat.com/show_bug.cgi?id=1270339

 .../application_controller/miq_request_methods.rb            | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

Comment 6 CFME Bot 2015-11-04 18:44:37 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=8d76a3767013909755496dae606c732261291a5c

commit 8d76a3767013909755496dae606c732261291a5c
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Nov 2 16:57:36 2015 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Nov 4 09:39:10 2015 -0500

    make_request validates and returns false or instance
    
    Only enumerate through all dialog fields looking for errors if validation failed
    Update comment on #validate_fields to describe its purpose since its name is deceiving
    https://bugzilla.redhat.com/show_bug.cgi?id=1270339

 .../application_controller/miq_request_methods.rb            | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

Comment 7 CFME Bot 2015-11-04 18:44:43 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=206e5a92c932f05c77dc981629b3c15d51441681

commit 206e5a92c932f05c77dc981629b3c15d51441681
Author:     Brandon Dunne <bdunne>
AuthorDate: Tue Nov 3 18:06:47 2015 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Nov 4 09:39:25 2015 -0500

    Test validation_method doesn't revert previous failures
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1270339

 spec/models/miq_request_workflow_spec.rb | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comment 8 CFME Bot 2015-11-04 18:44:48 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=4fa4873af9d0fa63557f731b142c45fc6bcd848b

commit 4fa4873af9d0fa63557f731b142c45fc6bcd848b
Author:     Brandon Dunne <bdunne>
AuthorDate: Tue Nov 3 18:08:03 2015 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Nov 4 09:39:27 2015 -0500

    validation_method was setting previously invalid status back to valid
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1270339

 app/models/miq_request_workflow.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comment 9 Pete Savage 2015-11-12 16:38:01 UTC
Verified in 5.5.0.10

Comment 11 errata-xmlrpc 2015-12-08 13:36:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551