Bug 1027268 - syntax error is seen in oo-accept-broker
Summary: syntax error is seen in oo-accept-broker
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-06 13:00 UTC by Johnny Liu
Modified: 2017-03-08 17:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-16 09:11:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Johnny Liu 2013-11-06 13:00:08 UTC
Description of problem:
Check code of dns_bind_update_record function in oo-accept-broker.
It is using "$10", not "${10}". 


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


How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Brenton Leanhardt 2013-11-06 20:10:06 UTC
Is there a particular line number causing the problem?  I ran oo-accept-broker -v and didn't have any syntax errors.

Comment 3 Johnny Liu 2013-11-07 05:14:43 UTC
(In reply to Brenton Leanhardt from comment #2)
> Is there a particular line number causing the problem?  I ran
> oo-accept-broker -v and didn't have any syntax errors.

This is really a minor issue, no obvious error is seen when running oo-accept-node, 
# oo-accept-broker -v
<--snip-->
INFO: checking bind dns plugin configuration
INFO: DNS Server: 10.4.59.165
INFO: DNS Port: 53
INFO: DNS Zone: ose-1105.com.cn
INFO: DNS Domain Suffix: ose-1105.com.cn
INFO: DNS Update Auth: key
INFO: DNS Key Name: ose-1105.com.cn
INFO: DNS Key Value: *****
INFO: adding txt record named testrecord.ose-1105.com.cn to server 10.4.59.165: key0
INFO: txt record successfully added
INFO: deleteing txt record named testrecord.ose-1105.com.cn to server 10.4.59.165: key0
INFO: txt record successfully deleted
<--snip-->

Take note the above output, the test DNS record value is "key0", actually the value passed to dns_bind_update_record function is "this_is_a_test", but in the code, it is using $10, then the value of this var is replaced by "key0".
$1="key"
$10="key0"
it should be:
${10}="this_is_a_test"

Comment 5 openshift-github-bot 2013-11-07 23:41:54 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/096f6ecb3b4df40b71c4ebda6f434bcc8379d17f
Bug 1027268 - syntax error is seen in oo-accept-broker

Comment 6 Johnny Liu 2013-11-08 02:59:34 UTC
Verified this bug with openshift-origin-broker-util-1.17.0-1.git.175.379e798.el6op.noarch, and PASS.

# oo-accept-broker -v
<--snip-->
INFO: checking bind dns plugin configuration
INFO: DNS Server: 192.168.59.220
INFO: DNS Port: 53
INFO: DNS Zone: ose-1107.com.cn
INFO: DNS Domain Suffix: ose-1107.com.cn
INFO: DNS Update Auth: key
INFO: DNS Key Name: ose-1107.com.cn
INFO: DNS Key Value: *****
INFO: adding txt record named testrecord.ose-1107.com.cn to server 192.168.59.220: this_is_a_test
INFO: txt record successfully added
INFO: deleteing txt record named testrecord.ose-1107.com.cn to server 192.168.59.220: 
INFO: txt record successfully deleted
<--snip-->


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