• Michael Hanselmann's avatar
    Handle EEXIST in utils.RenameFile · a426508d
    Michael Hanselmann authored
    
    
    This should fix an issue I've seen exactly once during testing. It might have
    been caused by parallel RPC calls to archive jobs.
    
    […] ganeti-noded:112 ERROR Error in RPC call […]
     File "/usr/lib/python2.4/site-packages/ganeti/backend.py", line 2365, in JobQueueRename
       utils.RenameFile(old, new, mkdir=True)
     File "/usr/lib/python2.4/site-packages/ganeti/utils.py", line 322, in RenameFile
       os.makedirs(os.path.dirname(new), mkdir_mode)
     File "/usr/lib/python2.4/os.py", line 159, in makedirs
       mkdir(name, mode)
    OSError: [Errno 17] File exists: '/var/lib/ganeti/queue/archive/0'
    Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    a426508d
utils.py 63.9 KB