Bug 1032459 - oo-install append superfluous mongo port when setting MONGO_HOST_PORT.
Summary: oo-install append superfluous mongo port when setting MONGO_HOST_PORT.
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: Luke Meyer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-20 09:14 UTC by Johnny Liu
Modified: 2014-05-15 14:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-15 14:40:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Johnny Liu 2013-11-20 09:14:46 UTC
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 20:37:35 UTC
This was a bug in openshift.sh which should now be fixed. Please give it another try.

Comment 3 Johnny Liu 2013-12-27 10:56:46 UTC
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.