Bug #73233 Cmds that accept both a UUID and address might hang if a wrong address is given
Submitted: 8 Jul 2014 14:39 Modified: 9 Sep 2014 23:46
Reporter: Alfranio Junior Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Fabric Severity:S3 (Non-critical)
Version:1.4.3 OS:Any
Assigned to: CPU Architecture:Any

[8 Jul 2014 14:39] Alfranio Junior
Description:
Commands accept either a UUID or an address (i.e. host:port) to specify a server. The code is ignoring though the fact that a wrong address might be provided and in consequence the execution would hang similar to what happened in BUG#72119.

How to repeat:
Check the code or try:

mysqlfabric server set_weight localhost:32274 0.5

Suggested fix:
Before using the address check whether it is valid or not: there must be a server in the state store with the specified address.
[9 Sep 2014 23:46] Philip Olson
Fixed as of the upcoming MySQL Utilities/Fabric 1.4.5 release, and here's the changelog entry:

Commands accept either a UUID or an address (i.e. host:port) to specify a
server. The code was ignoring that a wrong address could be provided, and
in consequence the execution could hang. The address is now validated
before it is used. 

If the server belongs to a group, the address is checked against the information stored in the state store.

If the server is not part of a group, Fabric will try to
access the server until a timeout is reached. The default value for this
timeout is defined through the option "unreachable_timeout" in the
"servers" section in the configuration file, and it affects the following
commands: 

 * server lookup_uuid address [--timeout=NONE] ... 
 * server clone group_id destn_address [--timeout=NONE] ... 
 * group add group_id address [--timeout=NONE] ... 

Thank you for the bug report.