Bug #72338 COMMANDS FAIL IF THE "PROTOCOL.XMLRPC.USER" OPTION IS NOT PROVIDED
Submitted: 14 Apr 2014 10:19 Modified: 13 Jan 2015 7:53
Reporter: Alfranio Correia Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Fabric Severity:S3 (Non-critical)
Version:1.4.2 OS:Any
Assigned to: Alfranio Correia CPU Architecture:Any

[14 Apr 2014 10:19] Alfranio Correia
Description:
Commands fail if the "protocol.xmlrpc.user" option is not provided neither in
the configuration file nor the command line:

Traceback (most recent call last):
  File "/usr/bin/mysqlfabric", line 427, in <module>
    main()
  File "/usr/bin/mysqlfabric", line 408, in main
    authenticate(group_name, command_name, config, options, args)
  File "/usr/bin/mysqlfabric", line 268, in authenticate
    username = auth_user or 'admin'
NameError: global name 'auth_user' is not defined

Fabric should assume "admin" in these cases.

How to repeat:
Follow these steps:

1. Remove the "protocol.xmlrpc.user" from the configuration file

2. Start Fabric

3. Try to run a command

Suggested fix:
Fix the issue as follows:

=== modified file 'scripts/mysqlfabric.py'
--- scripts/mysqlfabric.py
revid:alfranio.correia@oracle.com-20140325064735-a2p778b798s45b8z
+++ scripts/mysqlfabric.py      2014-03-25 11:41:58 +0000
@@ -265,7 +265,7 @@
             username = config.get(protocol_section, 'user')
         except NoOptionError:
             # Referred to default 'admin' user or command line argument
--user
-            username = auth_user or 'admin'
+            username = 'admin'

         try:
             password = config.get(protocol_section, 'password')