Bug #72044 MysqlFabric exception when using dump sharding_information with no shards

Submitted: 15 Mar 2014 0:23 Modified: 26 Apr 2016 19:05
Reporter: Andres Eduardo Sanchez Rodriguez Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Fabric Severity:S3 (Non-critical)
Version:1.4.2 OS:Linux (2.6.39-200.24.1.el6uek.x86_64)
Assigned to: CPU Architecture:Any

[15 Mar 2014 0:23] Andres Eduardo Sanchez Rodriguez
Description:
An exception is thrown by dump sharding_information commands when no shards are inside a definition / setup.

How to repeat:
1.- Check dump sharding information commands.

bash-4.1$ mysqlfabric dump sharding_information
Command :
{ success     = True
  return      = [0, 0, 1, [['oltp', 'oltp', 'emp_no', '30001', '2', 'RANGE', 'my_group2', 'my_group4']]]
  activities  =
}

2.- Ensure no shards remain in setup, if they are remove them

-bash-4.1$ mysqlfabric sharding disable_shard 2
Procedure :
{ uuid        = ed0ddb21-2c96-47a6-ba53-39c6308057d1,
  finished    = True,
  success     = True,
  return      = True,
  activities  =
}
-bash-4.1$ mysqlfabric sharding remove_shard 2
Procedure :
{ uuid        = 4c0d04fb-a8ba-4d26-99fb-d432c7103518,
  finished    = True,
  success     = True,
  return      = True,
  activities  =
}

3.- Try dump sharding_information and you will get an exception
-bash-4.1$ mysqlfabric dump sharding_information
Traceback (most recent call last):
  File "/usr/bin/mysqlfabric", line 427, in <module>
    main()
  File "/usr/bin/mysqlfabric", line 410, in main
    fire_command(cmd, *cargs)
  File "/usr/bin/mysqlfabric", line 343, in fire_command
    result = command.dispatch(*(command.append_options_to_args(args)))
  File "/usr/lib/python2.6/site-packages/mysql/fabric/command.py", line 356, in dispatch
    status = self.client.dispatch(self, *args)
  File "/usr/lib/python2.6/site-packages/mysql/fabric/protocols/xmlrpc.py", line 717, in dispatch
    return getattr(self, reference)(*args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.6/site-packages/mysql/fabric/protocols/xmlrpc.py", line 663, in request
    return self.parse_response(result)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1361, in parse_response
    return self._parse_response(file, None)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 1: "<type 'exceptions.TypeError'>:cannot marshal None unless allow_none is enabled">
-bash-4.1$ 

Suggested fix:
Message indicating no shard exist should be prompted.
[17 Mar 2014 13:46] Mats Kindahl
Thank you for the bug report. Verified as described.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.