Comment 0 for bug 583412

Revision history for this message
Guillermo Gonzalez (verterok) wrote :

if DBus exposed Folders.delete is called with a non-existent/invalid folder id, the error/failure signal isn't broadcasted via DBus

Here is the log of a test:

guillermo@naug:~/$ DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-kHzQHKyGAY,guid=6899de014c95a809a352e0f94bf55de7 dbus-send --print-reply --session --dest=com.ubuntuone.SyncDaemon --type=method_call /folders com.ubuntuone.SyncDaemon.Folders.delete string:''

2010-05-20 13:09:58,989 - ubuntuone.SyncDaemon.DBus - DEBUG - Folders.delete: dbus.String(u'')
2010-05-20 13:09:58,990 - ubuntuone.SyncDaemon.VM - INFO - delete_volume: dbus.String(u'')
2010-05-20 13:09:58,990 - ubuntuone.SyncDaemon.ActionQueue - DEBUG - DeleteVolume share:--- node:--- DeleteVolume() queueing in the %s META_QUEUE
2010-05-20 13:09:58,991 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: SYS_META_QUEUE_WAITING, args:(), kw:{}
2010-05-20 13:09:58,991 - ubuntuone.SyncDaemon.StateManager - DEBUG - received event 'SYS_META_QUEUE_WAITING'
2010-05-20 13:09:58,991 - ubuntuone.SyncDaemon.StateManager - DEBUG - sending event to QueueManager
2010-05-20 13:09:58,991 - ubuntuone.SyncDaemon.QueueManager - DEBUG - Changing state IDLE -> WORKING_ON_METADATA
2010-05-20 13:09:58,992 - ubuntuone.SyncDaemon.QueueManager - DEBUG - In WORKING_ON_METADATA: running META_QUEUE
2010-05-20 13:09:58,992 - ubuntuone.SyncDaemon.ActionQueue - DEBUG - DeleteVolume share:--- node:--- DeleteVolume() starting
2010-05-20 13:09:58,992 - ubuntuone.SyncDaemon.ActionQueue - DEBUG - DeleteVolume share:--- node:--- DeleteVolume() running
2010-05-20 13:09:58,994 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: SYS_STATE_CHANGED, args:(), kw:{'state': QUEUE_MANAGER (error=False connected=True online=True) Queue: WORKING_ON_METADATA Connection: With User With Network}
method return sender=:1.0 -> dest=:1.15 reply_serial=2
guillermo@naug:~/canonical/ubuntuone/current$ 2010-05-20 13:09:59,056 - ubuntuone.SyncDaemon.ActionQueue - WARNING - DeleteVolume share:--- node:--- DeleteVolume() failure NO_PERMISSION
2010-05-20 13:09:59,056 - ubuntuone.SyncDaemon.ActionQueue - DEBUG - DeleteVolume share:--- node:--- DeleteVolume() cleanup
2010-05-20 13:09:59,057 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: AQ_DELETE_VOLUME_ERROR, args:(), kw:{'error': 'NO_PERMISSION', 'volume_id': ''}
2010-05-20 13:09:59,057 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: VM_VOLUME_DELETE_ERROR, args:('', 'NO_PERMISSION'), kw:{}
2010-05-20 13:09:59,057 - ubuntuone.SyncDaemon.DBus - ERROR - Unable to handle VM_VOLUME_DELETE_ERROR for volume_id=u'' as it's not a share or UDF

The DBusInterface should hanlde this case and broadcast the error/faiure signal, as the client will probably wait for a success/failure response.