Bug 1589321

Summary: Cluster not available after unmanage
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Filip Balák <fbalak>
Component: web-admin-tendrl-apiAssignee: Shirshendu Mukherjee <smukherj>
Status: CLOSED NOTABUG QA Contact: sds-qe-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.4CC: mbukatov, negupta, nthomas, rhs-bugs, sankarshan, shtripat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-13 06:24:43 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:

Description Filip Balák 2018-06-08 16:58:45 UTC
Description of problem:
When cluster is unmanaged then it takes several seconds before it is listed in get cluster API call (https://github.com/Tendrl/api/blob/master/docs/clusters.adoc) and available to import again.

Version-Release number of selected component (if applicable):
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

How reproducible:
100%

Steps to Reproduce:
1. Prepare WA with imported cluster.
2. Unmanage cluster.
3. Execute:
curl -XGET -H "Authorization: Bearer <access-token>" -H "Content-Type: application/json" http://<wa-server>/api/1.0/clusters
4. Wait for a minute.
5. Execute again:
curl -XGET -H "Authorization: Bearer <access-token>" -H "Content-Type: application/json" http://<wa-server>/api/1.0/clusters

Actual results:
First API call returns empty list. The second one returns list with the unmanaged cluster.

Expected results:
Unmanaged cluster should be returned by first and second API call.

Additional info:

Comment 1 Neha Gupta 2018-06-12 13:05:12 UTC
@fbalak UI is polling the cluster list API call after every 10 seconds. Hence, the updated data will be reflected in UI by maximum 10 seconds if the backend/API already contains the updated data.

Comment 2 Martin Bukatovic 2018-06-12 14:32:41 UTC
Based discussion during "RHGS-3.4.0 In-flight bug triage" meeting on 2018-06-12
and technical details from comment 1, we will:

 * close this bug
 * create a doc BZ for this behavior (BZ 1590391)

I'm asking Nishanth to close the BZ, if he agrees with my summary here.

Comment 3 Martin Bukatovic 2018-06-12 14:42:53 UTC
Also, note that details from Neha doesn't explain the reproducer described in
this BZ, as REST API only is used. Could you provide more details about related
sync intervals for backed as well?

Comment 4 Shubhendu Tripathi 2018-06-13 06:04:30 UTC
@Martin, this is expected behavior as while un-manage cluster all the cluster details get deleted and after this delete, a round of node-agent sync from one for the cluster nodes makes sure cluster is ready for import again. So you would see a lag between cluster getting un-managed and then re-appearing ready to import back in UI.