Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1356682

Summary: [API] API deployments allow 0 value for openshift_storage_size
Product: Red Hat Quickstart Cloud Installer Reporter: Landon LaSmith <llasmith>
Component: fusor-serverAssignee: dgao
Status: CLOSED ERRATA QA Contact: Landon LaSmith <llasmith>
Severity: high Docs Contact:
Priority: high    
Version: 1.0CC: dgao, jmatthew, llasmith, smallamp
Target Milestone: gaKeywords: Automation, Triaged
Target Release: 1.0   
Hardware: All   
OS: All   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-13 16:31:48 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:

Description Landon LaSmith 2016-07-14 17:17:55 UTC
Description of problem: Deploying QCI via the fusor api will allow a deployment to proceed with a default value of 0 for openshift_storage_size in the deployment object.

ISO Media Version: QCI-1.2-RHEL-7-20160711.t.1

How reproducible: 100%

Steps to Reproduce:
1. Create a RHEV deployment using the fusor API
2. Don't include a value for
PUT /fusor/api/v21/deployments/<deployment id -d

  {'deployment': {
       'openshift_storage_size': 0}

3. Validate deployment - GET /fusor/api/v21/deployments/<deployment id>/validate
4. Start deployment using the fusor API

Actual results: Deployment starts normally and failing during setup of OpenShift. setup.yaml fails during 'lsblk /dev/vdb'

Expected results: Deployment validation should return an error with 'openshift_storage_size should be greater than 0'

Additional info: Default value for openshift_storage_size should be minimum recommended size for a QCI OpenShift deployment

Comment 9 John Matthews 2016-07-25 12:42:19 UTC

Comment 10 John Matthews 2016-07-25 13:15:10 UTC
Moving to MODIFIED, PR isnt merged/built yet

Comment 11 John Matthews 2016-08-02 18:42:36 UTC

Comment 12 Landon LaSmith 2016-08-11 22:17:51 UTC
Moving back to assigned since it will properly fail deployment validation but specifying 0 for openshift_storage_size via the api call will still still return 200 code even when it doesn't pass validation

QCI Iso media version: QCI-1.0-RHEL-7-20160809.t.1

Comment 13 John Matthews 2016-08-12 16:20:50 UTC

Please treat this BZ as only for the validation check, i.e. when we do a check if the deployment is valid we get a response indicating issues.

Additionally, please file a new BZ for the suggestion you have of not allowing a bad value in the deployment when it's created.  This is a potential RFE for post-GA.

The reason we are not addressing the specific request you have in comment #12 for GA is that the workflow allows partial updates of the deployment object over multiple calls. As in, we expect the deployment object to built up as a user progresses through the wizard, many of the values will be zero/empty as the data is being built up, so we delay validation until the very end.

Post-GA we can re-examine this workflow.

Comment 14 Landon LaSmith 2016-08-12 17:07:30 UTC

Created RFE in response to comment #13 and marking as VERIFIED since it's no long possible to proceed with a deployment when the value is 0.

Comment 16 errata-xmlrpc 2016-09-13 16:31:48 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.