Bug 1257880

Summary: cli/quota: enhance CLI and quotad communication
Product: [Community] GlusterFS Reporter: Vijaikumar Mallikarjuna <vmallika>
Component: cliAssignee: Vijaikumar Mallikarjuna <vmallika>
Status: CLOSED WONTFIX QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, smohan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-15 06:48:36 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 Vijaikumar Mallikarjuna 2015-08-28 10:05:25 UTC
In the current CLI framework CLI can hang when executing 'gluster volume quota volname list' if quotad is not running.
Bug# 1242819 has more information on this issue.

This is fixed with temporary solution: http://review.gluster.org/#/c/11990/


The temporary solution should be reverted once the CLI quotad communicated is enhanced in the framework

Below is the review comments from the patch# 11990

> Krishnan Parthasarathi		Aug 26 2:27 PM
>
> You could fix this by mimicking how CLI process ensures that it is connected to glusterd before sending RPCs. Note,
> this approach is not completely safe from a disconnect when an RPC is in flight.
> The time window where this could happen is small and we haven't seen it yet.
> The reason I suggest we do it this way is uniformity. Connections that CLI make should use the same pattern (read structure of code) to handle similar services.
> It gives us opportunity to fix issues that remain in the pattern once and reap benefits across problem areas.
>
> ## Implementation details
>
>  * See cli_cmd_needs_connection(), which returns a boolean depending on the cmd, e.g volume-start.
>
>  * See how cli_cmd_process uses the above function and state->await_connected to ensure that CLI is connected to glusterd before issuing any RPCs.

Comment 1 Vijaikumar Mallikarjuna 2016-02-15 06:48:36 UTC
AS of now with the current CLI framework we will not be able to fix the problem. For now we will go with the current fix of using a separate thread to broadcast result: http://review.gluster.org/#/c/11990/