Bug 1032459 - oo-install append superfluous mongo port when setting MONGO_HOST_PORT.
oo-install append superfluous mongo port when setting MONGO_HOST_PORT.
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: Luke Meyer
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-20 04:14 EST by Johnny Liu
Modified: 2014-05-15 10:40 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-15 10:40:55 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 Johnny Liu 2013-11-20 04:14:46 EST
Description of problem:
Using oo-install to setup env with build roles on different vms, after installation is finished, found MONGO_HOST_PORT is set to wrong value.
MONGO_HOST_PORT="db.my-ose.com.cn:27017:27017"

Seen from /tmp/openshift-deploy-prepare.log, get the following message.
+ datastore_replicants=db.my-ose.com.cn:27017
++ echo db.my-ose.com.cn:27017
++ sed -e 's/\([^:,]\+\)\(,\|$\)/\1:27017\2/g'
+ datastore_replicants=db.my-ose.com.cn:27017:27017

Seem oo-install append superfluous mongo port for datastore_replicants


Version-Release number of selected component (if applicable):
oo-install-20131119-1827

How reproducible:
Always

Steps to Reproduce:
1. Run oo-install
Host Information
+----------------+-------------+
| Host           | bb          |
| Roles          | Broker      |
| SSH Host       | 10.4.59.184 |
| User           | root        |
| IP Addr        | 10.4.59.184 |
| Install Status | new         |
+----------------+-------------+
+----------------+----------------+
| Host           | msg            |
| Roles          | MsgServer      |
| SSH Host       | 10.4.59.138    |
| User           | root           |
| IP Addr        | 192.168.59.140 |
| Install Status | new            |
+----------------+----------------+
+----------------+----------------+
| Host           | db             |
| Roles          | DBServer       |
| SSH Host       | 10.4.59.142    |
| User           | root           |
| IP Addr        | 192.168.59.135 |
| Install Status | new            |
+----------------+----------------+
+----------------+-------------+
| Host           | node        |
| Roles          | Node        |
| SSH Host       | 10.4.59.188 |
| User           | root        |
| IP Addr        | 10.4.59.188 |
| Install Status | new         |
+----------------+-------------+

2. After installation finished, check broker.conf
3.

Actual results:
MONGO_HOST_PORT="db.my-ose.com.cn:27017:27017"

Expected results:
MONGO_HOST_PORT="db.my-ose.com.cn:27017"

Additional info:
Comment 2 Luke Meyer 2013-12-23 15:37:35 EST
This was a bug in openshift.sh which should now be fixed. Please give it another try.
Comment 3 Johnny Liu 2013-12-27 05:56:46 EST
Verified this bug with oo-install-ose-20131220-1511, and PASS.


In /tmp/openshift-deploy.log, could see the following logic:
+ datastore_replicants=db.my-ose.com.cn:27017
++ for repl in '${datastore_replicants//,/ }'
++ [[ db.my-ose.com.cn:27017 =~ : ]]
++ printf ,%s db.my-ose.com.cn:27017
+ datastore_replicants=,db.my-ose.com.cn:27017
+ datastore_replicants=db.my-ose.com.cn:27017


# grep MONGO_HOST_PORT /etc/openshift/broker.conf
# Eg: MONGO_HOST_PORT="<host1:port1>,<host2:port2>..."
MONGO_HOST_PORT="db.my-ose.com.cn:27017"

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