Bug 1460158 - Validation failed: Status is not included in the list
Summary: Validation failed: Status is not included in the list
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.0
Assignee: Greg McCullough
QA Contact: Shveta
URL:
Whiteboard:
Depends On:
Blocks: 1477616 1477617
TreeView+ depends on / blocked
 
Reported: 2017-06-09 09:31 UTC by Gellert Kis
Modified: 2020-09-10 10:41 UTC (History)
11 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1477616 1477617 (view as bug list)
Environment:
5.7.2.1
Last Closed: 2018-03-06 14:54:15 UTC
Category: ---
Cloudforms Team: Unknown
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 3 Bronagh Sorota 2017-06-12 14:01:43 UTC
hi Greg,
This looks like an Automate issue. If the root cause turns out to be a Providers issue just punt it back to me.

Thanks,
Bronagh

Comment 11 Greg McCullough 2017-07-28 16:55:06 UTC
A hotfix is possible and we are working on putting a PR together which would then need to be back-ported to 5.7.

We have identified that the MiqProvisionRequestTemplate instance in the miq_requests table in the db has a value of "Denied" for the status column which is causing the issue.  The code change will ensure that this value is not copied when the miq_requests record is copied to the miq_request_tasks table.

There are two possible work-arounds:
1) Recreate the catalog item.  (Customer has verified this is working)
2) Reset the status column to "Ok" for all MiqProvisionRequestTemplate records in the miq_requests table.  If needed this could be performed with a Rails console command like this: "MiqProvisionRequestTemplate.update_all(:status => "Ok")"

My concern is that the root cause is unclear as to how this template record would end up with a denied status.  We have not experienced this issue before and may be related to custom automation logic.  (For example, the service approval workflow.)

My suggestion is that we drop the severity of this issue as the customer appears to be working now and has a work-around and we continue to work with them to try to identify the root cause.  We will also have a PR to prevent this issue going forward at the time of service ordering.

Comment 13 CFME Bot 2017-07-31 14:41:24 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/25bdd91cedd3fc3b9d246364040d4aa5d8c7c45f

commit 25bdd91cedd3fc3b9d246364040d4aa5d8c7c45f
Author:     Drew Bomhof <dbomhof>
AuthorDate: Fri Jul 28 17:30:30 2017 -0400
Commit:     Drew Bomhof <dbomhof>
CommitDate: Mon Jul 31 09:51:57 2017 -0400

    Force status removal and default value
    
    When we copy the MiqRequest to MiqRequestTask there is a case where status was not passing
    validation if it was originally set to 'Denied'
    
    This addresses that issue by removing the status column at copy and then setting the default value to 'Ok' in
    the MiqRequestTask
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1460158

 app/models/miq_request.rb       | 14 +++++++++++---
 app/models/miq_request_task.rb  |  1 +
 spec/models/miq_request_spec.rb | 15 +++++++++++++++
 3 files changed, 27 insertions(+), 3 deletions(-)

Comment 16 Shveta 2017-11-02 01:19:04 UTC
Fixed in 5.9.0.4.20171024163837_ef71ea6


Note You need to log in before you can comment on or make changes to this bug.