Bug 1025469 - datastore directive does not install mongodb
Summary: datastore directive does not install mongodb
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-31 18:54 UTC by Eric Rich
Modified: 2017-03-08 17:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Previously the mongodb-server required mongodb. Now it does not. Consequence: We use the mongo client from mongodb to configure the server, so we do need it even if the host is just hosting mongodb. MongoDB configuration fails by hanging forever if the mongo client is not installed. Fix: The install script for OSE 2.0 explicitly installs mongodb at the same time as mongodb server. The same fix was put in the OSE 1.2 script and should go in the 1.2 docs as well; for now, it's not needed, but if we were to ship a mongodb-related errata against OSE 1.2 it would likely be this newer package and the same problem would arise. Result: The script installs the mongodb RPM as part of the datastore component and all proceeds successfully.
Clone Of:
Environment:
Last Closed: 2013-12-16 09:11:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Eric Rich 2013-10-31 18:54:45 UTC
Description of problem:

When installing a services or broker services node, IE:

    CONF_INSTALL_COMPONENTS="activemq,datastore"

mongodb does not get installed and thus causes line 1230 to hang. Because it can not find mongo as a component. 

wait_for_mongod()
{
  echo "Waiting for MongoDB to start ($(date +%H:%M:%S))..."
  while :
  do
    echo exit | mongo && break       #### This line
    sleep 5
  done
  echo "MongoDB is ready! ($(date +%H:%M:%S))"
}

Comment 2 Luke Meyer 2013-10-31 22:11:50 UTC
Can you give some more details about what was done and what output you saw? The log from the installer would be helpful. (You did capture the output right?)

The openshift.sh install script won't even run that bit of code until after mongodb is successfully installed (well... unless there's a new bug of course). It's normal for it to have to wait a bit to actually connect. If it doesn't ever connect, then maybe mongodb didn't get started. That would be a problem.

Comment 3 Luke Meyer 2013-11-04 22:33:01 UTC
I see now; mongodb-server no longer requires mongodb, so we need to explicitly install it. Probably a good idea to do for 1.2 as well. I'll update the script and mention it to docs.

Comment 4 Brenton Leanhardt 2013-11-06 20:39:48 UTC
commit 665da22dd5789b0977afab0c9f3634bdc4f0b27c
Author: Luke Meyer <lmeyer>
Date:   Tue Nov 5 07:28:25 2013 -0500

    <install> explicitly require mongodb RPM for datastore
    
    Previously mongodb-server required mongodb. Now it does not. However we
    use the mongo client from mongodb to configure the server, so we do need
    it even if the host is just hosting mongodb.

Comment 5 Luke Meyer 2013-11-06 20:49:41 UTC
Same fix put in 1.2 install script to future-proof it.

Comment 6 Ma xiaoqiang 2013-11-07 04:37:55 UTC
wget https://raw.github.com/openshift/openshift-extras/enterprise-2.0/enterprise/install-scripts/generic/openshift.sh
#vim openshift.sh
CONF_INSTALL_COMPONENTS="datastore"
#sh +x openshift.sh

Output:
+ sleep 5
+ :
+ mongo
+ echo exit
MongoDB shell version: 2.4.6
connecting to: test
bye
+ break
++ date +%H:%M:%S
+ echo 'MongoDB is ready! (20:07:22)'
MongoDB is ready! (20:07:22)


wget https://raw.github.com/openshift/openshift-extras/enterprise-1.2/enterprise/install-scripts/generic/openshift.sh
#vim openshift.sh
CONF_INSTALL_COMPONENTS="activemq,datastore"
#sh +x openshift.sh

Output:
exception: connect failed
+ sleep 5
+ :
+ mongo
+ echo exit
MongoDB shell version: 2.2.3
connecting to: test
bye
+ break
++ date +%H:%M:%S
+ echo 'MongoDB is ready! (20:45:25)'
MongoDB is ready! (20:45:25)


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