Bug 1369908

Summary: [API] Fusor api allows null values for "openshift_storage_host" and "openshift_export_path" causing failures during mount of nfs during OSE deployment
Product: Red Hat Quickstart Cloud Installer Reporter: Landon LaSmith <llasmith>
Component: fusor-serverAssignee: Dylan Murray <dymurray>
Status: CLOSED ERRATA QA Contact: Landon LaSmith <llasmith>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.0CC: dymurray, tsanders
Target Milestone: gaKeywords: Automation, Triaged
Target Release: 1.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-13 16:37:29 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-08-24 16:41:37 UTC
Description of problem: In an api deployment, the fusor server will all null values for "openshift_storage_host" and "openshift_export_path" causing failures during the OSE deployment and the storage location for docker is mounted.

E, [2016-08-24T11:27:09.649869 #19379] ERROR -- : Error running command: sudo safe-mount.sh '2' '' '' 'nfs'
E, [2016-08-24T11:27:09.650246 #19379] ERROR -- : Status code: 1
E, [2016-08-24T11:27:09.650658 #19379] ERROR -- : Command output: ["sudo: unable to send audit message: Permission denied\n", "mount.nfs: Failed to resolve server : Name or service not known\n", "Failed to mount nfs share\n"]
W, [2016-08-24T11:27:09.651621 #19379]  WARN -- : Could not mount the NFS share ':' in order to inspect it. Please check that the NFS share exists. ["sudo: unable to send audit message: Permission denied\n", "mount.nfs: Failed to resolve server : Name or service not known\n", "Failed to mount nfs share\n"]

QCI ISO Media Version: QCI-1.0-RHEL-7-20160823.t.1

How reproducible: 100%

Steps to Reproduce:
1. Install QCI
2. Create storage location for RHV/OSE (NFS was used this run)
3. Create a deployment for RHV and OSE
4. Submit empty values for OpenShift storage. Returns 200 OK
PUT /fusor/api/v21/deployments/<deployment id> -d

  {'deployment': {
      'openshfit_storage_host': '',
      'openshift_export_path': '',      
      'openshift_storage_type': 'NFS'
  }
5. Verifying deployment does not return an error for missing openshift storage values
GET /fusor/api/v21/deployments/<deployment id>/validate


Actual results: Deployment fails during OSE install. Deployment log shows "Error running command: sudo safe-mount.sh '2' '' '' 'nfs'"

Expected results: Submitting null values for openshift storage locations should return an error. Deployment validation endpoint should check for null values in  "openshift_storage_host" and "openshift_export_path".

Comment 3 Landon LaSmith 2016-08-24 16:50:03 UTC
Calling validate endpoint returns "Could not mount the NFS share ':' in order to inspect it. Please check that the NFS share exists." as a warning not an error.

Comment 5 Dylan Murray 2016-08-29 18:12:05 UTC
https://github.com/fusor/fusor/pull/1193

Comment 6 Landon LaSmith 2016-08-31 17:37:58 UTC
VERIFIED. Failure to specify a value for openshfit_storage_host and/or openshift_export_path prevented the deployment from validating successfully.

QCI Media Version: QCI-1.0-RHEL-7-20160831.t.0

Comment 8 errata-xmlrpc 2016-09-13 16:37:29 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/RHEA-2016:1862