Bug 1027268 - syntax error is seen in oo-accept-broker
syntax error is seen in oo-accept-broker
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
2.0.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Brenton Leanhardt
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-06 08:00 EST by Johnny Liu
Modified: 2017-03-08 12 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-16 04:11:08 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)

  None (edit)
Description Johnny Liu 2013-11-06 08:00:08 EST
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 15:10:06 EST
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 00:14:43 EST
(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 18:41:54 EST
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-07 21:59:34 EST
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.