Bug 1575891

Summary: Load_all function in tendel-common sometimes gives object with wrong info
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: gowtham <gshanmug>
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: fbalak, gshanmug, nthomas, rhs-bugs, sankarshan
Target Milestone: ---   
Target Release: RHGS 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tendrl-ui-1.6.3-2.el7rhgs tendrl-ansible-1.6.3-4.el7rhgs tendrl-notifier-1.6.3-3.el7rhgs tendrl-commons-1.6.3-5.el7rhgs tendrl-api-1.6.3-3.el7rhgs tendrl-monitoring-integration-1.6.3-3.el7rhgs tendrl-node-agent-1.6.3-5.el7rhgs Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 07:05:38 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    

Description gowtham 2018-05-08 08:17:57 UTC
Description of problem:

When etcd directory exist for a particular object but it does not have
"data" directory then load_all return an object with some other object
value. For example, there is volume A, B, C then B does not have
data directory then load_all return 3 objects in the list but obj.value is
of A or C is assigned to B is value.

Version-Release number of selected component (if applicable):


How reproducible:
This is actually code implementation issue

Steps to Reproduce:
1.
2.
3.

Actual results:
Load all function should return list object with conflict data

Expected results:
Load all function should return list object with its own data

Additional info:

Comment 2 gowtham 2018-05-08 08:18:32 UTC
This is code implementation issue

Comment 3 Filip Balák 2018-05-10 13:53:22 UTC
Can you please provide version of selected component and reproducer? For testing purpose it would be good to see example of the data it should/shouldn't return and where to find it.

Comment 4 gowtham 2018-05-16 10:06:26 UTC
I don't know where it causes a problem while testing some other bug I saw load_all gives objects with wrong detail. I just fixed this because it may confuse when we debug some other problem. because this will leads to issue which is occurring sometime and sometime it won't raise. 
So for make code stable i fixed this problem.

Comment 5 Filip Balák 2018-05-16 12:11:36 UTC
Based on agreement from Bug Triage on 2018-05-10 I provide conditional qe_ack with following assumptions:

* dev team must have done code walkthrough or sanity unit validation of
  the change described in this BZ
* qe team will verify this BZ by running general regression tests

Comment 9 Filip Balák 2018-08-10 08:36:19 UTC
This change seems to not break any functionality during testing. Apart from regression tests there were also tested scenarios how tendrl reacts when data directory is removed from etcd. If importing cluster with removed data directory from more clusters then the data directory is generated again and correct cluster is imported. If volume data directory is removed and enable/disable profiling is triggered then the data directory is generated and profiling is enabled/disabled on correct volume.
--> VERIFIED

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

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