Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1264722 - oo-register-dns shows erros with any option
oo-register-dns shows erros with any option
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
2.2.0
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Vu Dinh
Jianwei Hou
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-20 22:00 EDT by Ma xiaoqiang
Modified: 2016-07-03 20:46 EDT (History)
7 users (show)

See Also:
Fixed In Version: openshift-origin-broker-util-1.37.4.1-1.el6op
Doc Type: Bug Fix
Doc Text:
Previously, there was a conflict in the `oo-register-dns` command between the two `-h` options which were associated with both the `--help` and `--with-node-hostname` options. This caused the command to fail with getoptlong object errors. This bug fix updates the command, and the `--help` and `-?` options now show usage information while the `-h` options is only associated with the `--with- node-hostname` option. As a result, these errors no longer occur.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-17 12:10:44 EST
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2666 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 2.2.8 security, bug fix, and enhancement update 2015-12-17 17:07:54 EST

  None (edit)
Description Ma xiaoqiang 2015-09-20 22:00:14 EDT
Description of problem:
oo-register-dns show erros with any option


Version-Release number of selected component (if applicable):
openshift-origin-broker-util-1.36.2.1-1.el6op.noarch

How reproducible:
100%


Steps to Reproduce:
1. run oo-register-dns with any option
#oo-register-dns --help
#oo-register-dns -h node1 -n 10.66.79.203  -d ose22-auto.com.cn

Actual results:
/opt/rh/ruby193/root/usr/share/ruby/getoptlong.rb:316:in `block (2 levels) in set_options': option redefined `-h' (ArgumentError)
        from /opt/rh/ruby193/root/usr/share/ruby/getoptlong.rb:306:in `each'
        from /opt/rh/ruby193/root/usr/share/ruby/getoptlong.rb:306:in `block in set_options'
        from /opt/rh/ruby193/root/usr/share/ruby/getoptlong.rb:285:in `each'
        from /opt/rh/ruby193/root/usr/share/ruby/getoptlong.rb:285:in `set_options'
        from /opt/rh/ruby193/root/usr/share/ruby/getoptlong.rb:184:in `initialize'
        from /usr/sbin/oo-register-dns:50:in `new'
        from /usr/sbin/oo-register-dns:50:in `<main>'


Expected results:
Show the help doc.

Additional info:
Comment 1 Vu Dinh 2015-10-23 15:32:07 EDT
PR <https://github.com/openshift/origin-server/pull/6287> fixes this issue.
Comment 2 openshift-github-bot 2015-10-25 01:16:02 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/b07b41cc39e0bc75bbfc2694ef2d9220568ff7ea
Bug 1264722: Fix oo-register-dns shows erros with any option

There is a command conflict as '-h' option is linked link both '--help'
and '--with-node-hostname' which causes 'getoptlong' object to fail.
In fact, '--help' should be linked to '-?' instead. This commit recrifies
the issue by linking '--help' back to '-?' as it shows in help message.

Bug <1264722>
Link <https://bugzilla.redhat.com/show_bug.cgi?id=1264722>

Signed-off-by: Vu Dinh <vdinh@redhat.com>
Comment 5 Ma xiaoqiang 2015-11-11 20:31:27 EST
Check on puddle [2.2.x/2015-11-11.1]

[root@broker ~]# oo-register-dns -h node3 -n 192.168.0.1 --domain ose22-auto.com.cn 
[root@broker ~]# nslookup node3.ose22-auto.com.cn
Server:		10.14.6.112
Address:	10.14.6.112#53

Name:	node3.ose22-auto.com.cn
Address: 192.168.0.1

[root@broker ~]# oo-register-dns --with-node-hostname node4 --with-node-ip 192.168.0.12 --domain ose22-auto.com.cn
[root@broker ~]# nslookup node4.ose22-auto.com.cn
Server:		10.14.6.112
Address:	10.14.6.112#53

Name:	node4.ose22-auto.com.cn
Address: 192.168.0.12
Comment 7 errata-xmlrpc 2015-12-17 12:10:44 EST
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://rhn.redhat.com/errata/RHSA-2015-2666.html

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