Detect when local file is lost before 1x redundancy
Created by: mtlynch
Bug Report
Sia should detect if the file it's trying to upload is no longer present on the filesystem.
To reproduce:
$ head -c 300M </dev/urandom > /tmp/testfile.txt
$ ./siac renter upload /tmp/testfile.txt testfile.txt
Uploaded '/tmp/testfile.txt' as testfile.txt.
$ rm /tmp/testfile.txt
$ ./siac renter -v
...
File size Available Progress Redundancy Renewing Sia path
314.57 MB No 50.00% 0.00 Yes testfile.txt
Expected
./siac renter -v
output indicates that the source file is missing and the upload is stuck.
renter.log
contains information about the error
Actual
./siac renter -v
does not indicate any problems except that the user will notice no upload progress.
renter.log
contains a vague error message that does not specify a particular file or say that it's missing:
2017/11/25 05:40:51.070595 download.go:501: Not enough workers to finish download: insufficient hosts to recover file
2017/11/25 05:40:51.078194 download.go:501: Not enough workers to finish download: insufficient hosts to recover file
2017/11/25 05:40:51.145722 download.go:501: Not enough workers to finish download: insufficient hosts to recover file
2017/11/25 05:40:51.150447 download.go:501: Not enough workers to finish download: insufficient hosts to recover file
This caused a blocking bug in the Sia Minio integration: https://github.com/minio/minio/pull/5233
Environment
- Sia version: 47514b49
- OS: Ubuntu 16.04 LTS x64