Bug 1678223

Summary: Unable to schedule an NFS or Samba Database Backup in CloudForms 5.10
Product: Red Hat CloudForms Management Engine Reporter: Khushbu Borole <kborole>
Component: UI - OPSAssignee: Jerry Keselman <jkeselma>
Status: CLOSED CURRENTRELEASE QA Contact: Jaroslav Henner <jhenner>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.10.0CC: bmidwood, bzehrfuc, cbolz, dmetzger, greartes, hkataria, jkeselma, kborole, lavenel, mpovolny, nansari, ngupta, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1693728 (view as bug list) Environment:
Last Closed: 2019-12-13 14:55:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1679295, 1692488, 1693728    

Description Khushbu Borole 2019-02-18 10:21:40 UTC
Description of problem:
- Unable to schedule an NFS or Samba Database Backup.
- Though the URI for the backup is correctly specified in the 'uri' field, it does not accept the Schedule request.
- It does not display error on the CloudForms UI But, it does flash an error in production.log as below
`Validation failed: FileDepotSmb: Uri can't be blank`

Version-Release number of selected component (if applicable):
CloudForms Management Engine 5.10

How reproducible:
Every time while adding a schedule for database backup

Steps to Reproduce:
1. Setup a CloudForms Management Engine 5.10
2. Try adding the Database Backup for NFS or Samba
3. Fill in all the details
4. Press the Add button

Actual results:
It just refreshes the page and does not accept the Schedule Request.

Expected results:
It should accept the Schedule Request as it used to in previous versions

Error that flash in production.log:
[----] I, [2019-02-18T05:00:42.896290 #5131:d7e7a4]  INFO -- : Started POST "/ops/schedule_edit/1000000000027?button=save" for 127.0.0.1 at 2019-02-18 05:00:42 -0500
[----] I, [2019-02-18T05:00:42.902022 #5131:d7e7a4]  INFO -- : Processing by OpsController#schedule_edit as JS
[----] I, [2019-02-18T05:00:42.902316 #5131:d7e7a4]  INFO -- :   Parameters: {"action_typ"=>"db_backup", "depot_name"=>"any", "filter_typ"=>"", "log_userid"=>"", "log_aws_region"=>"", "openstack_region"=>"", "keystone_api_version"=>"", "v3_domain_ident"=>"", "swift_api_port"=>"5000", "security_protocol"=>"", "log_protocol"=>"Network File System", "description"=>"try", "enabled"=>"true", "name"=>"try", "timer_typ"=>"Once", "timer_value"=>"0", "start_date"=>"Mon Feb 18 2019 00:00:00 GMT+0530 (IST)", "start_hour"=>"16", "start_min"=>"0", "time_zone"=>"Kolkata", "uri"=>"vault.xxxx.x.x.x.x./xxx/", "uri_prefix"=>"nfs", "filter_value"=>"", "log_password"=>"[FILTERED]", "button"=>"save", "id"=>"1000000000027"}
[----] F, [2019-02-18T05:00:42.921079 #5131:d7e7a4] FATAL -- : Error caught: [ActiveRecord::RecordInvalid] Validation failed: FileDepotNfs: Uri can't be blank
/opt/rh/cfme-gemset/gems/activerecord-5.0.7.1/lib/active_record/validations.rb:78:in `raise_validation_error'
/opt/rh/cfme-gemset/gems/activerecord-5.0.7.1/lib/active_record/validations.rb:50:in `save!'

Comment 6 Jerry Keselman 2019-02-22 16:17:57 UTC
Additionally - https://bugzilla.redhat.com/show_bug.cgi?id=1643106 states that QE successfully tested NFS DB Backups using 5.10.1.2 today.  
Is there someone who can provide access to a system exhibiting this failure?  Thanks.

Comment 10 Jerry Keselman 2019-02-22 21:43:45 UTC
Still would like the QE system that is exhibiting this issue so I can debug.  Thanks.

Comment 14 Jerry Keselman 2019-02-27 15:31:14 UTC
Khushbu,

I have a fix for which a PR will be submitted today.  No need for the BlueJeans session.  I was able to reproduce with Harpreet's help.

Thanks.

Jerry

Comment 15 Jerry Keselman 2019-02-27 20:38:59 UTC
https://github.com/ManageIQ/manageiq/pull/18497

addresses this issue.

Comment 17 Jaroslav Henner 2019-07-04 09:34:25 UTC
It works fine in Version 5.11.0.11.20190625161125_392c61e

Comment 18 Jaroslav Henner 2019-10-21 17:39:04 UTC
I was trying to reproduce this on 5.10.5.1 to prepare a test for this and I didn't succeed.