Bug #71428 fabric.server.set_status() is inconsistent with fabric.store.dump_servers()
Submitted: 20 Jan 2014 16:23 Modified: 7 Feb 2014 6:09
Reporter: Alfranio Tavares Correia Junior Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Fabric Severity:S3 (Non-critical)
Version:1.4.1 OS:Any
Assigned to: Alfranio Tavares Correia Junior CPU Architecture:Any
Tags: fabric

[20 Jan 2014 16:23] Alfranio Tavares Correia Junior
Description:
The mysqlfabric.server.set_status function requires a uuid and a status as parameters. The first parameter uniquely identifies the server and the
second determines its status which is one of the following strings: "PRIMARY", "SECONDARY", "SPARE" or "FAULTY".

The dump interface though returns an integer to represent a server's status. From an API's perspective, this is not a good idea.

How to repeat:
Check the code.

Suggested fix:
Make set_status() accept not only a string but also an integer as status.
[7 Feb 2014 6:09] Philip Olson
Fixed as of the upcoming MySQL Utilities 1.4.2 release, and here's the changelog entry:

The "server.set_status()" function's status parameter now accepts an
integer, to better coincide with the integer value provided by
"dump_servers()". The strings "PRIMARY", "SECONDARY", "SPARE" and "FAULTY"
also remain as acceptable values.

Thank you for the bug report.