RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1212174 - mongodb fails to start in rdo trunk
Summary: mongodb fails to start in rdo trunk
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RDO
Classification: Community
Component: openstack-packstack
Version: trunk
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: Juno
Assignee: Javier Peña
QA Contact: Ami Jeain
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-15 17:50 UTC by wes hayutin
Modified: 2015-04-23 23:44 UTC (History)
9 users (show)

Fixed In Version: openstack-packstack-2014.2-0.23.dev1468.gd049ea9.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-23 23:44:02 UTC
Embargoed:
mskalick: needinfo+


Attachments (Terms of Use)
mongodb manifest log (101.15 KB, application/octet-stream)
2015-04-15 17:50 UTC, wes hayutin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 174301 0 None None None Never

Description wes hayutin 2015-04-15 17:50:21 UTC
Created attachment 1014916 [details]
mongodb manifest log

Description of problem:

00:48:03.570 ERROR : Error appeared during Puppet run: 172.16.32.70_mongodb.pp
00:48:03.570 Error: Unable to connect to mongodb server! (172.16.32.70:27017)
00:48:03.570 You will find full trace in log /var/tmp/packstack/20150415-163612-BOeT7a/manifests/172.16.32.70_mongodb.pp.log
00:48:03.570 Please check log file /var/tmp/packstack/20150415-163612-BOeT7a/openstack-setup.log for more information

https://rhos-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/RDO/view/delorean/job/rhos-jenkins-rdo-kilo-delorean-centos-7.0-aio-packstack-neutron-ml2-vxlan-qpidd-tempest-rpm-minimal/43/console

See attached logs and logs in the job for more information

Comment 1 Christian Berendt 2015-04-15 18:33:53 UTC
I think this is a problem with a moved configuration file. Packstack generates the configuration file /etc/mongodb.conf, but mongodb-server ships and uses /etc/mongod.conf (on CentOS 7.1). Because of that mongod only listens on the loopback device and it is not possible to connect to MongoDB using the address deinfed in CONFIG_MONGODB_HOST.

I think adding "config => '/etc/mongod.conf'," to templates/mongodb.pp solves the issue for CentOS 7.1. This should be backported to the Juno branch, I am working with this branch at the moment and this branch is affected, too.

Comment 2 Alan Pevec (Fedora) 2015-04-15 23:30:28 UTC
As a quick workaround, we could create a symlink for backward compatibility.

https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-1458/mongodb-2.6.9-1.el7
was pushed to stable yesterday causing this issue.

But isn't such change breaking all EPEL users not just RDO??

Comment 3 Marek Skalický 2015-04-16 06:59:19 UTC
Yes, with mongodb 2.6.7 there was the renaming of config files (https://lists.fedoraproject.org/pipermail/devel/2015-January/207346.html , https://lists.fedoraproject.org/pipermail/devel/2015-February/207389.html ).


MongoDB has "%triggerpostun server -- %{name}-server < 2.6.7-3" script to allow users to upgrade and run mongodb with old configuration. But it is processed only during rpm/yum upgrade. With new installation mongodb uses new config file.

It worked for example with mongodb-2.6.8-1.el7?

Comment 4 Alan Pevec (Fedora) 2015-04-16 08:18:58 UTC
Alright, then it needs to be fixed in openstack-packstack.

Comment 5 Marek Skalický 2015-04-16 09:10:04 UTC
One note about adding symlink mongodb.conf->mongod.conf:
- with new installations it will work fine
- during upgrade if /etc/sysconfig/mongod is changed, mongodb have to use the old name (mongodb.conf), so it could collide with your symlink

Comment 6 Javier Peña 2015-04-16 10:04:45 UTC
I have been checking the options, and I think we also have a packaging issue here. Looking at the different versions of mongodb-server for the supported combinations in Packstack we have:

- Fedora 21 with RDO: version 2.4.x (config file is /etc/mongodb.conf)
- CentOS 7 and RHEL 7 with EPEL and RDO: version 2.6.x (config file is /etc/mongod.conf)
- RHEL 7 with RHEL OSP: version 2.6.x (config file is /etc/mongodb.conf)

The easiest fix will be to check, from Packstack, which combination we are in and set "config => '/etc/mongod.conf'," as needed, as specified in comment 1. However, this inconsistency in packaging between different versions is making life quite hard.

Comment 7 Christian Berendt 2015-04-16 10:18:52 UTC
This should not be fixed in Packstack itself (maybe as a temporary workaround). It should be fixed in puppetlabs/puppetlabs-mongodb and a new version of puppetlabs/puppetlabs-mongodb should be released.

I proposed a PR for puppetlabs/puppetlabs-mongodb: https://github.com/puppetlabs/puppetlabs-mongodb/pull/193. Pleaes have a look at the PR if this is a correct solution for the issue.

Comment 8 Javier Peña 2015-04-16 10:35:42 UTC
(In reply to Christian Berendt from comment #7)
> This should not be fixed in Packstack itself (maybe as a temporary
> workaround). It should be fixed in puppetlabs/puppetlabs-mongodb and a new
> version of puppetlabs/puppetlabs-mongodb should be released.
> 
> I proposed a PR for puppetlabs/puppetlabs-mongodb:
> https://github.com/puppetlabs/puppetlabs-mongodb/pull/193. Pleaes have a
> look at the PR if this is a correct solution for the issue.

I'm not sure if this PR would work, because it depends on $::mongodb::globals::version, which has to be set before the package is installed (if I'm not mistaken).

Comment 9 Christian Berendt 2015-04-16 10:40:57 UTC
Maybe. I have not read the whould code of puppetlabs/puppetlabs-mongodb. Let's wait for feedback on the PR.

Independent of a fix of the issue in puppetlabs/puppetlabs-mongodb we should fix the issue in Packstack itself right. At the moment Packstack is broken when enabling Ceilometer. Another solution is dropping MongoDB from Packstack, replacing it with MySQL as storage backend for Ceilometer.

Comment 10 Javier Peña 2015-04-16 10:59:27 UTC
I have proposed https://review.openstack.org/174301 as a quick fix from the Packstack side. On some initial tests, it works for me on the following combinations:

- Fedora 21 with RDO Kilo
- CentOS 7 with RDO Kilo
- RHEL 7 with RHEL OSP 6 (Juno)

Comment 11 Javier Peña 2015-04-16 15:44:25 UTC
https://review.openstack.org/174301 is now merged.

Comment 12 Christian Berendt 2015-04-16 15:45:57 UTC
Can you please back port for Juno and trigger a new release of Packstack for the Juno branch?

Comment 13 Javier Peña 2015-04-16 16:12:01 UTC
Proposed https://review.openstack.org/174445 with the backport.

Comment 14 Alan Pevec 2015-04-20 11:59:58 UTC
https://review.gerrithub.io/230643


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