Command "fuel --fuel-version" redirects content to stderr

Bug #1393849 reported by Yaroslav Lobankov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Low
Vladimir Sharshov

Bug Description

VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "5.1.1"
  api: "1.0"
  build_number: "19"
  build_id: "2014-11-17_21-00-23"
  astute_sha: "fce051a6d013b1c30aa07320d225f9af734545de"
  fuellib_sha: "add3fdd3e2af57b20dbb73a6bc53a9ccc4701c9a"
  ostf_sha: "64cb59c681658a7a55cc2c09d079072a41beb346"
  nailgun_sha: "2fcab95dc43a248ba867065e96ab764ee73882d1"
  fuelmain_sha: "ff22ca819e6eb7c63b6d7978fdd80ef9b84457d9"

[root@fuel ~]# fuel --fuel-version | grep release
api: '1.0'
astute_sha: fce051a6d013b1c30aa07320d225f9af734545de
auth_required: true
build_id: 2014-11-17_21-00-23
build_number: '19'
feature_groups:
- mirantis
fuellib_sha: add3fdd3e2af57b20dbb73a6bc53a9ccc4701c9a
fuelmain_sha: ff22ca819e6eb7c63b6d7978fdd80ef9b84457d9
nailgun_sha: 2fcab95dc43a248ba867065e96ab764ee73882d1
ostf_sha: 64cb59c681658a7a55cc2c09d079072a41beb346
production: docker
release: 5.1.1
release_versions:
  2014.1.3-5.1.1:
    VERSION:
      api: '1.0'
      astute_sha: fce051a6d013b1c30aa07320d225f9af734545de
      build_id: 2014-11-17_21-00-23
      build_number: '19'
      feature_groups:
      - mirantis
      fuellib_sha: add3fdd3e2af57b20dbb73a6bc53a9ccc4701c9a
      fuelmain_sha: ff22ca819e6eb7c63b6d7978fdd80ef9b84457d9
      nailgun_sha: 2fcab95dc43a248ba867065e96ab764ee73882d1
      ostf_sha: 64cb59c681658a7a55cc2c09d079072a41beb346
      production: docker
      release: 5.1.1

[root@fuel ~]# fuel --fuel-version 2>&1 | grep release
release: 5.1.1
release_versions:
      release: 5.1.1

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

How is this supposed to be a bug?

Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
Revision history for this message
Dima Shulyak (dshulyak) wrote :

Thomas, maybe i am missing something, but usually command line apps output goes to stdout (1 fd), and for example fuel env output will go to the stdout as well, but fuel --fuel-version for some reason redirected to stderr

Changed in fuel:
importance: Undecided → Low
milestone: none → 6.1
status: New → Confirmed
Revision history for this message
Bartłomiej Piotrowski (bpiotrowski) wrote :

Things like --help or --version are usually (coreutils and a lot of more utilities) printed on stderr, not stdout. I hardly consider this a bug.

Revision history for this message
Dima Shulyak (dshulyak) wrote :

Can you provide examples of such application?

virsh --version and virsh --help prints output to stdout,
atleast for me virsh --help would be unusable without an ability to grep by content

And in general what would be the motivation to print out those things to stderr, over stdout?

Revision history for this message
Bartłomiej Piotrowski (bpiotrowski) wrote :

Hm, I wrote before about coreutils, but I was apparently testing BSD grep on OS X. You are right that, stdout seems to be de facto standard now and using stderr should be seen as a bug.

Evgeniy L (rustyrobot)
tags: added: low-hanging-fruit size-s
Dmitry Pyzhov (dpyzhov)
tags: added: module-client
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Vladimir Sharshov (vsharshov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-fuelclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/170154

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Vladimir Sharshov (vsharshov) wrote :

Looks like upstream bug:

* http://bugs.python.org/msg211217
* http://bugs.python.org/issue18920

Move it to 7.0

Changed in fuel:
status: In Progress → Confirmed
milestone: 6.1 → 7.0
assignee: Vladimir Sharshov (vsharshov) → Fuel Python Team (fuel-python)
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Vladimir Sharshov (vsharshov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/201539

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-fuelclient (master)

Change abandoned by Vladimir Sharshov (<email address hidden>) on branch: master
Review: https://review.openstack.org/170154
Reason: New version: https://review.openstack.org/#/c/201539/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (master)

Reviewed: https://review.openstack.org/201539
Committed: https://git.openstack.org/cgit/stackforge/python-fuelclient/commit/?id=67bc0e915a1786fd0b0995e890e088e7c0a7feb0
Submitter: Jenkins
Branch: master

commit 67bc0e915a1786fd0b0995e890e088e7c0a7feb0
Author: Vladimir Sharshov (warpc) <email address hidden>
Date: Tue Jul 14 15:33:15 2015 +0300

    Return --fuel-version output to stdout insted of stderr

    Change-Id: I20895c219be4bb492f47f2e36763bc45c9628df5
    Closes-Bug: #1393849

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Yaroslav Lobankov (ylobankov) wrote :

Verified on

VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "7.0"
  openstack_version: "2015.1.0-7.0"
  api: "1.0"
  build_number: "82"
  build_id: "2015-07-23_10-59-34"
  nailgun_sha: "d1087923e45b0e6d946ce48cb05a71733e1ac113"
  python-fuelclient_sha: "471948c26a8c45c091c5593e54e6727405136eca"
  fuel-agent_sha: "bc25d3b728e823e6154bac0442f6b88747ac48e1"
  astute_sha: "b1f37a988e097175cbbd14338286017b46b584c3"
  fuel-library_sha: "58d94955479aee4b09c2b658d90f57083e668ce4"
  fuel-ostf_sha: "94a483c8aba639be3b96616c1396ef290dcc00cd"
  fuelmain_sha: "68871248453b432ecca0cca5a43ef0aad6079c39"

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.