Red Hat Bugzilla – Bug 1257880
cli/quota: enhance CLI and quotad communication
Last modified: 2016-05-11 18:48:49 EDT
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.
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/