Bug 1572090

Summary: Import cluster fails with TypeError
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Filip Balák <fbalak>
Component: web-admin-tendrl-commonsAssignee: Jeff Brown <jefbrown>
Status: CLOSED ERRATA QA Contact: Filip Balák <fbalak>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.4CC: dahorak, fbalak, gshanmug, mbukatov, nthomas, rhs-bugs, sankarshan
Target Milestone: ---   
Target Release: RHGS 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tendrl-commons-1.6.3-4.el7rhgs Doc Type: Bug Fix
Doc Text:
Cause: Calling ImportCluster API right after restarting all RHGSWA services Consequence: ImportCluster API call fails Fix: Ensure ImportCluster API job is processed only when al RHGSWA services are functional and have populated all the required context/data to DB Result: ImportCluster API call will always succeed after restarting RHGSWA services
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 07:05:15 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:
Bug Depends On:    
Bug Blocks: 1503137    
Attachments:
Description Flags
task page none

Description Filip Balák 2018-04-26 07:46:26 UTC
Created attachment 1427023 [details]
logs and configuration files

Description of problem:
Import without specified short Cluster Name failed with error:
```
Failure in Job 53bb0810-baa4-4e42-a882-df4c4cb3703a Flow tendrl.flows.ImportCluster with error:Traceback (most recent call last):#012  File "/usr/lib/python2.7/site-packages/tendrl/commons/jobs/__init__.py", line 213, in process_job#012    the_flow.run()#012  File "/usr/lib/python2.7/site-packages/tendrl/commons/flows/import_cluster/__init__.py", line 123, in run#012    raise ex#012TypeError: must be string, not None
```

Version-Release number of selected component (if applicable):
glusterfs-3.12.2-8.el7rhgs.x86_64
tendrl-ansible-1.6.3-2.el7rhgs.noarch
tendrl-api-1.6.3-1.el7rhgs.noarch
tendrl-api-httpd-1.6.3-1.el7rhgs.noarch
tendrl-commons-1.6.3-2.el7rhgs.noarch
tendrl-grafana-plugins-1.6.3-1.el7rhgs.noarch
tendrl-grafana-selinux-1.5.4-2.el7rhgs.noarch
tendrl-monitoring-integration-1.6.3-1.el7rhgs.noarch
tendrl-node-agent-1.6.3-2.el7rhgs.noarch
tendrl-notifier-1.6.3-2.el7rhgs.noarch
tendrl-selinux-1.5.4-2.el7rhgs.noarch
tendrl-ui-1.6.3-1.el7rhgs.noarch

How reproducible:
10%

Steps to Reproduce:
1. Install tendrl.
2. Import cluster, don't set Cluster Name in import wizard.
3. Check job progress.

Actual results:
Import failed with python TypeError.

Expected results:
Import should pass.

Additional info:
In attachment are logs and config files. In `fbalak-usm1-gl1.usmqe.lab.eng.brq.redhat.com/var/log/messages` directory is the error logged with additional details.

Comment 1 Filip Balák 2018-04-26 07:47:56 UTC
Created attachment 1427024 [details]
task page

Comment 2 Nishanth Thomas 2018-05-03 08:23:31 UTC
This is not reproducible in our setup. Require clear reproducer for further debugging.

Comment 3 gowtham 2018-05-03 08:52:45 UTC
this issue is fixed https://github.com/Tendrl/commons/pull/956

Comment 8 Filip Balák 2018-06-06 09:34:51 UTC
I did run script that discovered this issue 25x times (23x times the cluster was imported successfully) and this issue didn't appear.
--> VERIFIED

Tested with:
tendrl-ansible-1.6.3-4.el7rhgs.noarch
tendrl-api-1.6.3-3.el7rhgs.noarch
tendrl-api-httpd-1.6.3-3.el7rhgs.noarch
tendrl-commons-1.6.3-6.el7rhgs.noarch
tendrl-grafana-plugins-1.6.3-4.el7rhgs.noarch
tendrl-grafana-selinux-1.5.4-2.el7rhgs.noarch
tendrl-monitoring-integration-1.6.3-4.el7rhgs.noarch
tendrl-node-agent-1.6.3-6.el7rhgs.noarch
tendrl-notifier-1.6.3-3.el7rhgs.noarch
tendrl-selinux-1.5.4-2.el7rhgs.noarch
tendrl-ui-1.6.3-3.el7rhgs.noarch

Comment 11 errata-xmlrpc 2018-09-04 07:05:15 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-2018:2616