Zaqar does not enforce writes to majority

Bug #1372335 reported by Flavio Percoco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
Critical
Flavio Percoco

Bug Description

Mongodb's driver uses the default write-concern which is `acknowledge`. This write concern is not enough to guarantee reliability, hence it needs to be changed.

A saner default would `majority`.

Tags: monogdb
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zaqar (master)

Fix proposed to branch: master
Review: https://review.openstack.org/123720

Changed in zaqar:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/123721

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/123750

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

Reviewed: https://review.openstack.org/123720
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=6e502137f13d7b2a2e056dfe90a118eb2680ea24
Submitter: Jenkins
Branch: master

commit 6e502137f13d7b2a2e056dfe90a118eb2680ea24
Author: Flavio Percoco <email address hidden>
Date: Wed Sep 24 13:22:19 2014 +0200

    Don't register options in __init__

    Each driver currently registers its own config options in the
    constructor. This is not a good thing and has caused things like
    `dynamic_conf` to happen.

    This patch adds a method that is called in the constructor of the base
    class that goes through the driver's options and registers them. The
    method catches duplicated exceptions. We don't care about those for now
    and we assume the driver consumer knows what it's doing.

    Bug: #1372335
    Change-Id: I3341416332a0e620e428308f463d1bb635927a5d

Changed in zaqar:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/123721
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=188632806c2fdb6e9306708484c71153a49fd248
Submitter: Jenkins
Branch: master

commit 188632806c2fdb6e9306708484c71153a49fd248
Author: Flavio Percoco <email address hidden>
Date: Wed Sep 24 14:53:53 2014 +0200

    Accept existing conf in dynamic_conf

    Currently, dynamic_conf doesn't accept an existing conf object and
    creates one from scratch every time. This patch adds a `conf` keyword to
    both `can_connect` and `dynamic_conf` to re-use the already loaded
    options from existing config objects.

    This work is needed for the bug mentioned bellow.

    Bug: #1372335
    Change-Id: I471a33a80504802339accd82e632620d101a23df

Thierry Carrez (ttx)
Changed in zaqar:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/123750
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=a1163331fcb3253ae6af5e4cb8c528eb3679baf1
Submitter: Jenkins
Branch: master

commit a1163331fcb3253ae6af5e4cb8c528eb3679baf1
Author: Flavio Percoco <email address hidden>
Date: Wed Sep 24 16:51:38 2014 +0200

    Add first reliability enforcement

    This patch adds an reliability enforcement for mongodb's driver. It
    forces deployers to use replicasets or mongos as a mongodb cluster for
    Zaqar. In addition to that, it forces deployers to provide a write
    concern > 2 and/or majority.

    If none of this are met, the driver will raise a RuntimeException and
    fail to start. If no write concern is provided, majority will be used.

    Change-Id: Ie74a4b441654243b3ed7e7fd6c40863969cd446d
    Closes-bug: #1372335

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zaqar (proposed/juno)

Fix proposed to branch: proposed/juno
Review: https://review.openstack.org/126896

Changed in zaqar:
milestone: juno-rc1 → juno-rc2
Thierry Carrez (ttx)
Changed in zaqar:
status: Fix Released → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zaqar (proposed/juno)

Reviewed: https://review.openstack.org/126896
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=c78d36dcd7e9b63325f593fff6d9aac6bb4f9c87
Submitter: Jenkins
Branch: proposed/juno

commit c78d36dcd7e9b63325f593fff6d9aac6bb4f9c87
Author: Flavio Percoco <email address hidden>
Date: Wed Sep 24 16:51:38 2014 +0200

    Add first reliability enforcement

    This patch adds an reliability enforcement for mongodb's driver. It
    forces deployers to use replicasets or mongos as a mongodb cluster for
    Zaqar. In addition to that, it forces deployers to provide a write
    concern > 2 and/or majority.

    If none of this are met, the driver will raise a RuntimeException and
    fail to start. If no write concern is provided, majority will be used.

    Change-Id: Ie74a4b441654243b3ed7e7fd6c40863969cd446d
    Closes-bug: #1372335
    (cherry picked from commit a1163331fcb3253ae6af5e4cb8c528eb3679baf1)

Changed in zaqar:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in zaqar:
milestone: juno-rc2 → 2014.2
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.