Bug 1277216 - gdeploy produces warnings about wrong usage of argparse module
gdeploy produces warnings about wrong usage of argparse module
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: gdeploy (Show other bugs)
3.1
Unspecified Unspecified
unspecified Severity low
: ---
: RHGS 3.1.3
Assigned To: Sachidananda Urs
Anush Shetty
: ZStream
Depends On:
Blocks: 1299184
  Show dependency treegraph
 
Reported: 2015-11-02 12:10 EST by Martin Bukatovic
Modified: 2016-06-23 01:28 EDT (History)
5 users (show)

See Also:
Fixed In Version: gdeploy-2.0-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-23 01:28:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Bukatovic 2015-11-02 12:10:59 EST
Description of problem
======================

Python module argparse is used in a wrong way. On rhel 6 machines, this leads
to ugly warning being displayed every time gdeploy command is run.

Version-Release number of selected component (if applicable)
============================================================

gdeploy-1.0-12.el6rhs.noarch
python-2.6.6-64.el6.x86_64
python-argparse-1.2.1-2.1.el6.noarch

How reproducible
================

100 %

Steps to Reproduce
==================

On RHEL 6 Gluster Storage Server machnie, try to use gdeploy tool, eg:

 * gdeploy -h
 * gdeploy --version

Actual results
==============

Python module argparse complains about wrong usage of it's api:

~~~
# gdeploy -h
/usr/lib/python2.6/site-packages/argparse.py:1575: DeprecationWarning: The "version" argument to ArgumentParser is deprecated. Please use "add_argument(..., action='version', version="N", ...)" instead
  """instead""", DeprecationWarning)
usage: gdeploy [-h] [-v] [-vv] [-c CONFIG_FILE] [-k] [volumeset <hostIP>:<volumename> <key> <value>]

positional arguments:
  volumeset       Set options for the volume

optional arguments:
  -h, --help      show this help message and exit
  -v, --version   show program's version number and exit
  -c CONFIG_FILE  Configuration file
  -k              Keep the generated ansible utility files
  -vv             verbose mode
~~~

~~~
# gdeploy --version
/usr/lib/python2.6/site-packages/argparse.py:1575: DeprecationWarning: The "version" argument to ArgumentParser is deprecated. Please use "add_argument(..., action='version', version="N", ...)" instead
  """instead""", DeprecationWarning)
1.0
~~~

Expected results
================

Python module argparse doesn't complain. So for example:

~~~
# gdeploy --version
gdeploy 1.0
~~~
Comment 1 Martin Bukatovic 2015-11-02 12:12:37 EST
See proposed fix: https://github.com/gluster/gdeploy/pull/25
Comment 2 Sachidananda Urs 2015-11-03 02:15:59 EST
Merged into gdeploy-1.1
Comment 6 Anush Shetty 2016-04-11 01:24:38 EDT
Verified with gdeploy-2.0-2.el6rhs.noarch
Comment 8 errata-xmlrpc 2016-06-23 01:28:49 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2016:1250

Note You need to log in before you can comment on or make changes to this bug.