EUDAT-GEF / GEF

The GEF
GNU General Public License v2.0
6 stars 9 forks source link

Container that downloads files from a volume is not removed after its job is done #133

Closed ubuntolog closed 7 years ago

ubuntolog commented 7 years ago

After download is initiated the corresponding container/swarm service is not removed. But if we try to remove it, we see the error: "caused by: task: non-zero exit (1)"

See the code https://github.com/EUDAT-GEF/GEF/blob/master/gefserver/pier/staging.go#L29

ubuntolog commented 7 years ago

Sorry, it was my alternative branch. In the master branch the container is not removed. It remains on the machine after downloading a file

emanueldima commented 7 years ago

I see that in the func (p *Pier) DownStreamContainerFile we don't close the tar stream (defer tarStream.Close()) before end, so probably that's why we cannot remove the container safely after copying.

ubuntolog commented 7 years ago

tarStream does not have Close() method