Bug #2729
Race condition in hash calculation in downloader.sh
Status: | Closed | Start date: | 02/13/2014 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Jaime Melis | % Done: | 0% | |
Category: | Drivers - Storage | |||
Target version: | Release 4.6 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: | OpenNebula 4.4 |
Description
This statement runs the hasher in a subshell:
$command | tee >( decompress "$decompressor" "$TO" ) \ >( hasher $HASH_TYPE ) >/dev/null
However, it may happen that the hasher has not yet finished writing the hash value to a file when this instruction is executed:
HASH_RESULT=$( cat $HASH_FILE)
A workaround would be to poll the existance of the file before doing the cat.
Related issues
Associated revisions
Bug #2729: Race condition in hash calculation in downloader.sh
Bug #2729: Fix the race condition for stdout destinations as well as
as file destinations
History
#1 Updated by Javi Fontan over 7 years ago
- Related to Bug #2499: marketplace download error added
#2 Updated by Jaime Melis over 7 years ago
- Status changed from New to Closed
- Resolution set to fixed
#3 Updated by Javi Fontan over 7 years ago
- Assignee changed from Javi Fontan to Jaime Melis
#4 Updated by Jaime Melis over 7 years ago
- Related to Bug #2629: md5 mismatch when uploading a file to Sunstone through a proxy server added