Bug #72094 mysqlfabric commands should accept not only uuid but also host:port
Submitted: 21 Mar 2014 13:14 Modified: 23 May 2014 4:23
Reporter: Alfranio Correia Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Fabric Severity:S3 (Non-critical)
Version:1.4.0 OS:Any
Assigned to: Alfranio Correia CPU Architecture:Any

[21 Mar 2014 13:14] Alfranio Correia
Description:
Some Fabric commands such as "server.set_status", "group.promote" accept a reference to a server's uuid but not a reference to an address and port.
This is really annoying as users have to fetch and type this information.

How to repeat:
Check the code for or execute the following commands:

threat.report_error
threat.report_failure
group_name.promote
group.lookup_servers
group.remove
server.set_status
server.set_weight
server.set_mode

Suggested fix:
It would be great if either a uuid or an address (i.e. host:port) was accepted.
[14 May 2014 15:54] Martin Arrieta
I made a few tests about this bug. 

Basically I removed the UUID check before each MySQLServer.fetch on services/server.py and then I have added the check in the MySQLServer.fetch method on server.py.

[root@store BUG-72094]# mysqlfabric server set_status node1 spare
Procedure :
{ uuid        = c0a72e17-e05c-4996-b327-61a652070e8d,
  finished    = True,
  success     = True,
  return      = True,
  activities  =
}
[root@store BUG-72094]# mysqlfabric server set_status 8afe5f0f-da03-11e3-907e-0800274fb806 secondary
Procedure :
{ uuid        = b90adcef-302d-4ecf-988e-a0b9351e5f29,
  finished    = True,
  success     = True,
  return      = True,
  activities  =
}

It is just an idea :)

Regards, 

Martin.
[14 May 2014 15:55] Martin Arrieta
bundle with the patch.

Attachment: bug-72094 (application/octet-stream, text), 5.67 KiB.

[23 May 2014 4:23] Philip Olson
Fixed as of the upcoming MySQL Utilities 1.4.3 release, and here's the changelog entry:

Some Fabric commands, such as "server.set_status" and "group.promote",
accepted a reference to a MySQL server's uuid but not a reference to an
address and port.

Thank you for the bug report.