tdulcet / Distributed-Computing-Scripts

🖧 Distributed Computing Scripts for GIMPS, BOINC and Folding@home
MIT License
18 stars 12 forks source link

Errno 18 #15

Closed selroc closed 2 years ago

selroc commented 2 years ago
primenet.py -u selroc -g -w /home/sel/work0 -i worktodo.txt -T 150 -t 3600 -n 1
Proof file exponent is M112807829
MD5 of “/home/sel/work0/proof/112807829-8.proof” is 801854c154dd6f4154277400a5d47bb4
Filesize of “/home/sel/work0/proof/112807829-8.proof” is 126,908,869
Proof “/home/sel/work0/proof/112807829-8.proof” already uploaded
{'error_status': 409, 'error_message': 'Conflict', 'error_description': 'Proof already uploaded'}
Traceback (most recent call last):
  File "/mnt/SELROC_COMPUTE/gpucomputing/primenet.py", line 2246, in <module>
    uploadProofs(dir)
  File "/mnt/SELROC_COMPUTE/gpucomputing/primenet.py", line 615, in uploadProofs
    os.rename(filename, os.path.join(archive, entry))
OSError: [Errno 18] Invalid cross-device link: '/home/sel/work0/proof/112807829-8.proof' -> '/nfs/PROOF_STORE/112807829-8.proof'
tdulcet commented 2 years ago

Thanks for the bug report! It looks like you set the archive proofs option to a different filesystem, which is not supported by the os.rename() function I used. This is a simple fix to use shutil.move() instead. I am marking this as an enhancement, as I was not expecting people to more the proof files to a different filesystem, but I guess this is what you were referring to by NFS share in https://github.com/tdulcet/Distributed-Computing-Scripts/issues/12#issuecomment-961245195.

While it does not matter in this case, in any future please add the -d/--debug option so I can see all of the output, which I would recommend always adding. BTW, all of those options except -w and -t are saved to the config file, so you only need to provide them the first time the script is run. Also, the -n option is deprecated in favor of -W/--days_work.

selroc commented 2 years ago

Thank you, yes I was referring to NFS, Network File System.

tdulcet commented 2 years ago

No problem. I attempted to fix this in https://github.com/tdulcet/Distributed-Computing-Scripts/commit/dbd08930b48579241a7526dc1dc3f3982f895a73. Let me know if it now works for you.