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:
This was a bug in openshift.sh which should now be fixed. Please give it another try.
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"