Bug 1277216 - gdeploy produces warnings about wrong usage of argparse module
Summary: gdeploy produces warnings about wrong usage of argparse module
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: gdeploy
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: RHGS 3.1.3
Assignee: Sachidananda Urs
QA Contact: Anush Shetty
URL:
Whiteboard:
Depends On:
Blocks: 1299184
TreeView+ depends on / blocked
 
Reported: 2015-11-02 17:10 UTC by Martin Bukatovic
Modified: 2016-06-23 05:28 UTC (History)
5 users (show)

Fixed In Version: gdeploy-2.0-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-23 05:28:49 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:1250 0 normal SHIPPED_LIVE gdeploy update for Red Hat Gluster Storage 3.1 update 3 2016-06-23 09:11:59 UTC

Description Martin Bukatovic 2015-11-02 17:10:59 UTC
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 17:12:37 UTC
See proposed fix: https://github.com/gluster/gdeploy/pull/25

Comment 2 Sachidananda Urs 2015-11-03 07:15:59 UTC
Merged into gdeploy-1.1

Comment 6 Anush Shetty 2016-04-11 05:24:38 UTC
Verified with gdeploy-2.0-2.el6rhs.noarch

Comment 8 errata-xmlrpc 2016-06-23 05:28:49 UTC
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.