When the DRBDmanage daemon gets restarted in some way, the DBus
object used is no longer valid.
But it's not enough to get a new object; the function got invalid,
too, so it has to be fetched anew.
Closes-Bug: #
1420171
Change-Id: Ie4734d8e3a183957c1f9421a5794f9ef962650b7
try once to reconnect.
"""
try:
- return apply(fn, args)
+ return fn(*args)
except dbus.DBusException as e:
LOG.warn(_LW("got disconnected; trying to reconnect. (%s)") %
six.text_type(e))
self.dbus_connect()
- return apply(fn, args)
+ # Old function object is invalid, get new one.
+ return getattr(self.odm, fn._method_name)(*args)
def do_setup(self, context):
"""Any initialization the volume driver does while starting."""