gdcp bombs out with an error when asked to upload a socket
Closed this issue · 0 comments
Stack trace below. The file is a socket indeed.
The problem is not so much that gdcp failed on copying a socket (what does it mean to upload a socket to Drive anyways?), but that it stopped an upload that has been going on for days now, without an obvious way to resume.
When uploading to Drive, you have to start assuming that people will want to upload huge disks if they have the quota on Drive, and through very narrow pipes. This means that uploads will extend for days (mine would be over in ~90 days assuming that a full 1Mbit/s upload is saturated, which it is not!)
When upload times measure in months, the odds of something happening that will stop the upload are not negligible. A good upload program must be robust in face of this, and must be defensive faced with the real possibility that a resume would be needed.
It seems to be an easy fix to exclude sockets (e.g. line 172 from the stack trace), but I think that the brittleness of upload may be a more significant problem here.
(...snip...)
srwxrwxrwx 1 root root 1 Mar 13 2011 /mnt/backup/2015-05-05/home/filip/.gdesklets/sockets/%3A1004.0
/mnt/backup/2015-05-05/home/filip/.gdesklets/sockets/
Traceback (most recent call last):
File "/home/f/local/bin/gdcp", line 1251, in <module>
def cli_version(args):
File "/home/f/local/bin/gdcp", line 1248, in main
log.info("Transferred ownership for %i file(s)" % len(gdcp.files))
File "/home/f/local/bin/gdcp", line 1194, in cli
parser_transfer.set_defaults(func=cli_transfer_ownership)
File "/home/f/local/bin/gdcp", line 1225, in cli_upload
gdcp.print_failed()
File "/home/f/local/bin/gdcp", line 86, in upload
f.upload()
File "/home/f/local/bin/gdcp", line 172, in upload
allfiles = [x for x in allfiles if not os.path.islink(x)]
File "/home/f/local/bin/gdcp", line 86, in upload
f.upload()
File "/home/f/local/bin/gdcp", line 172, in upload
allfiles = [x for x in allfiles if not os.path.islink(x)]
File "/home/f/local/bin/gdcp", line 86, in upload
f.upload()
File "/home/f/local/bin/gdcp", line 172, in upload
allfiles = [x for x in allfiles if not os.path.islink(x)]
File "/home/f/local/bin/gdcp", line 86, in upload
f.upload()
File "/home/f/local/bin/gdcp", line 172, in upload
allfiles = [x for x in allfiles if not os.path.islink(x)]
File "/home/f/local/bin/gdcp", line 86, in upload
f.upload()
File "/home/f/local/bin/gdcp", line 172, in upload
allfiles = [x for x in allfiles if not os.path.islink(x)]
File "/home/f/local/bin/gdcp", line 86, in upload
f.upload()
File "/home/f/local/bin/gdcp", line 175, in upload
# File
File "/home/f/local/bin/gdcp", line 583, in _create_media_body
# Folders are special google apps docs which we consider separately
File "/usr/local/lib/python2.7/dist-packages/oauth2client/util.py", line 142, in positional_wrapper
return wrapped(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/googleapiclient/http.py", line 426, in __init__
fd = open(self._filename, 'rb')
IOError: [Errno 6] No such device or address: '/mnt/backup/2015-05-05/home/filip/.gdesklets/sockets/%3A1004.0'