Mongodb complains about not being master on primary mongo

Bug #1428696 reported by Sergey Yudin
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Sergey Yudin
5.1.x
Won't Fix
High
MOS Maintenance
6.0.x
Won't Fix
High
MOS Maintenance

Bug Description

Fuel Version: 5.1.1

Way to reproduce: NA, appears randomly

Description:
When mongo first starts up it calls for election(even with single node) and if we will start configureing mongo we will get something like:

http://paste.openstack.org/show/zo9FyOOuWwpYXJlq7NqP/

Proposed solution:
We need to wait till node will finish the election and will become master even in single node replset before starting messing around with mongo.
https://review.openstack.org/161753

Changed in fuel:
assignee: nobody → Sergey Yudin (tsipa740)
status: New → In Progress
Changed in fuel:
milestone: none → 6.1
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

@Sergey, what the status update do you have?

Changed in fuel:
importance: Undecided → High
Revision history for this message
Sergey Yudin (tsipa740) wrote :
Revision history for this message
Sergey Yudin (tsipa740) wrote :

Should i do same patch for 5.1 and 6.0 branches?

Revision history for this message
Bartłomiej Piotrowski (bpiotrowski) wrote :

Let's wait until your patch hits master branch.

Revision history for this message
Sergey Yudin (tsipa740) wrote :

It finally passed tests and got some reviews.

Guys, how i can proceed with this to get it merged?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/161753
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=ae86f256520915162759bb663d1ed55cc36f1291
Submitter: Jenkins
Branch: master

commit ae86f256520915162759bb663d1ed55cc36f1291
Author: Sergey V. Yudin <email address hidden>
Date: Thu Mar 5 15:30:40 2015 +0000

    Waiting for mongo elections

    We need to wait till node will finish the elections
    and will become master even in single node
    replset before proceeding with Mongo configuration.

    Closes-Bug: #1428696

    Change-Id: I4e78771ceb1250ea64c0bc70a297111281a24d28

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Anastasia Palkina (apalkina) wrote :

Verified on ISO #202

"build_id": "2015-03-16_22-54-44", "ostf_sha": "e86c961ceacfa5a8398b6cbda7b70a5f06afb476", "build_number": "202", "release_versions": {"2014.2-6.1": {"VERSION": {"build_id": "2015-03-16_22-54-44", "ostf_sha": "e86c961ceacfa5a8398b6cbda7b70a5f06afb476", "build_number": "202", "api": "1.0", "nailgun_sha": "874df0d06e32f14db77746cfeb2dd74d4a6e528c", "production": "docker", "python-fuelclient_sha": "2509c9b72cdcdbe46c141685a99b03cd934803be", "astute_sha": "93e427ac49109fa3fd8b0e1d0bb3d14092be2e8c", "feature_groups": ["mirantis"], "release": "6.1", "fuelmain_sha": "608b72a6f79a719cf01c35a19d0091fe20c8288a", "fuellib_sha": "924d73ae4766646e1c3a44d7b59c4120985e45f0"}}}, "auth_required": true, "api": "1.0", "nailgun_sha": "874df0d06e32f14db77746cfeb2dd74d4a6e528c", "production": "docker", "python-fuelclient_sha": "2509c9b72cdcdbe46c141685a99b03cd934803be", "astute_sha": "93e427ac49109fa3fd8b0e1d0bb3d14092be2e8c", "feature_groups": ["mirantis"], "release": "6.1", "fuelmain_sha": "608b72a6f79a719cf01c35a19d0091fe20c8288a", "fuellib_sha": "924d73ae4766646e1c3a44d7b59c4120985e45f0"

Changed in fuel:
status: Fix Committed → Fix Released
Changed in fuel:
status: Fix Released → Confirmed
Revision history for this message
Aleksandr Didenko (adidenko) wrote :

It still does not work on envs with single mongo node because we're getting empty array here:

https://github.com/stackforge/fuel-library/blob/master/deployment/puppet/osnailyfacter/modular/roles/mongo_primary.pp#L16

It's happenning because with single mongo node we have no 'mongo' roles, only one 'primary-mongo' role. If I understand correctly, we're supposed to get an array of all mongo nodes (primary-mongo and mongo roles) there.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-library (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/165758

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/165758
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=c080de8ea1fd857d5385db3a68e58a75b70f8858
Submitter: Jenkins
Branch: master

commit c080de8ea1fd857d5385db3a68e58a75b70f8858
Author: Aleksandr Didenko <email address hidden>
Date: Thu Mar 19 12:04:12 2015 +0200

    Fix replica set parameter for primary-mongo

    Don't configure replica set if we have only one mongo node.

    Change-Id: I3febf7e9c99e105e3018e48910f59f4f260dfde3
    Related-bug: #1428696

Changed in fuel:
status: Confirmed → Fix Committed
Revision history for this message
Anastasia Palkina (apalkina) wrote :

Verified on ISO #226

"build_id": "2015-03-24_22-54-44", "ostf_sha": "a4cf5f218c6aea98105b10c97a4aed8115c15867", "build_number": "226", "release_versions": {"2014.2-6.1": {"VERSION": {"build_id": "2015-03-24_22-54-44", "ostf_sha": "a4cf5f218c6aea98105b10c97a4aed8115c15867", "build_number": "226", "api": "1.0", "nailgun_sha": "3b9f2c83c63653113701971492a6d8039db2cce2", "production": "docker", "python-fuelclient_sha": "3624051242c83fdbdd1df9a0e466797c06b75043", "astute_sha": "631f96d5a09cc48bfbddcbf056b946c8a80438f0", "feature_groups": ["mirantis"], "release": "6.1", "fuelmain_sha": "320b5f46fc1b2798f9e86ed7df51d3bda1686c10", "fuellib_sha": "acd7659a727ab890076de41272c2054744be4d20"}}}, "auth_required": true, "api": "1.0", "nailgun_sha": "3b9f2c83c63653113701971492a6d8039db2cce2", "production": "docker", "python-fuelclient_sha": "3624051242c83fdbdd1df9a0e466797c06b75043", "astute_sha": "631f96d5a09cc48bfbddcbf056b946c8a80438f0", "feature_groups": ["mirantis"], "release": "6.1", "fuelmain_sha": "320b5f46fc1b2798f9e86ed7df51d3bda1686c10", "fuellib_sha": "acd7659a727ab890076de41272c2054744be4d20"

CentOS, 1 controller, 1 compute, 1 cinder, 1 mongo. Deployment was successful

Changed in fuel:
status: Fix Committed → Fix Released
Revision history for this message
Vitaly Sedelnik (vsedelnik) wrote :

Won't Fix for 5.1.1-updates and 6.0-updates as we don't expect new 5.1.1 and 6.0 deployments

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.