Glance client no longer outputs to stdout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance Client |
Invalid
|
High
|
Unassigned |
Bug Description
For several years glance client output to stdout by default.
I would rely on uploading a small text file as a pseudo image and verify it existed with, for example:
$ glance image-download 96ed6a3f-
The behaviour seems to have changed:
$ glance image-download 96ed6a3f-
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.
A couple of things
1) It concerns me that this basic behaviour, which has been constant for around 3 years was changed. It signals that any command cannot be considered stable.
2) the behaviour is, in my view, non-standard
If I do:
$ glance image-download 96ed6a3f-
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.
And I note that the exit status is '0' I must then presume that the content of my image is the text string '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.' (The message is printed to stdout not to stderr.)
and if I then do:
$ glance image-download 96ed6a3f-
I would expect /tmp/img1 to contain the same string: "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." (That's how things typically work.)
3) it is not symmetric
I can create an image without specifying an input file
$ glance image-create ....
we used to be able to download without specifying an output file
4) I can no longer display to stdout without invoking another command
I need to do
$ glance image-download 96ed6a3f-
to display the image without first piping it into a file.
Are folks open to reverting the behaviour?
tags: | added: 1.0.0-potential |
I do see that Cindy had good intentions with the change, but I totally agree with you on this one.