TRACEBACK if no output file specified while image download
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance Client |
Invalid
|
Undecided
|
Ravi Shekhar Jethani |
Bug Description
While downloading image data via 'glance client' we require to explicitly specify where the output should go. We need to specify output file either via '--file' command option or via stdout redirection. If we do not explicitly specify we get an error message which is fine but current implementation(on master) causes a TRACEBACK on the service side. Although the TRACEBACK is not fatal but it does look bad.
Steps to reproduce:
$ glance image-download <IMAGE ID>
Sample command output:
vagrant@ubuntu16:~$ glance image-download af9105b5-
No redirection or local file specified for downloaded image data. Please specify a local file with --file to save downloaded image or redirect output to another source.
Sample glance api log output:
2016-10-18 15:26:25.481 DEBUG glance.
pt/stack/
2016-10-18 15:26:25.482 DEBUG glance.
t/stack/
2016-10-18 15:26:25.483 DEBUG glance.
2016-10-18 15:26:25.528 DEBUG glance.
2016-10-18 15:26:25.532 INFO eventlet.
File "/usr/local/
write(
File "/usr/local/
wfile.
File "/usr/lib/
self.flush()
File "/usr/lib/
self.
File "/usr/local/
tail = self.send(data, flags)
File "/usr/local/
return self._send_
File "/usr/local/
return send_method(data, *args)
error: [Errno 104] Connection reset by peer
We have same behavior for both v1 and v2 glance clients.
We can avoid this TRACEBACK by simply moving checks for command options before even connecting to glance service
Changed in glance: | |
assignee: | nobody → Ravi Shekhar Jethani (ravishekar-jethani) |
summary: |
- Command arguments checked after initiating download + TRACEBACK if no output file specified while image download |
description: | updated |
This is the correct behaviour for python- glanceclient. The fact that we close the connection before consuming the socket on the client side indicates a problem with the way eventlet handles this. This shouldn't result in an error in our logs and the entirety of that traceback comes from eventlet.