panko create mongo user is not idempotent

Bug #1681747 reported by Eduardo Gonzalez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
High
Eduardo Gonzalez
Ocata
Fix Released
High
Eduardo Gonzalez
Pike
Fix Released
High
Eduardo Gonzalez

Bug Description

When running kolla-ansible deploy more than once,
panko task fails to create user/db in mongodb.

TASK [panko : Creating Panko MongoDB database] *********************************
fatal: [localhost -> localhost]: FAILED! => {"changed": false, "cmd": ["docker", "exec", "-t", "mongodb", "mongo", "--host", "192.168.100.215:27017", "--eval", "db = db.getSiblingDB(\"panko\"); db.createUser({user: \"panko\", pwd: \"DLEZgyHsHh4zBzG0ZHKY77xva3qCWo8h1lmT6MG2\", roles: [ \"readWrite\", \"dbAdmin\" ]})"], "delta": "0:00:00.183725", "end": "2017-04-11 10:40:36.425679", "failed": true, "failed_when_result": true, "rc": 252, "start": "2017-04-11 10:40:36.241954", "stderr": "", "stdout": "MongoDB shell version: 2.6.12\r\nconnecting to: 192.168.100.215:27017/test\r\n2017-04-11T10:40:36.409+0100 Error: couldn't add user: User \"panko@panko\" already exists at src/mongo/shell/db.js:1086", "stdout_lines": ["MongoDB shell version: 2.6.12", "connecting to: 192.168.100.215:27017/test", "2017-04-11T10:40:36.409+0100 Error: couldn't add user: User \"panko@panko\" already exists at src/mongo/shell/db.js:1086"], "warnings": []}

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)

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

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

Reviewed: https://review.openstack.org/455624
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=39627f0456562ec452d610713df41a7a71dd47a0
Submitter: Jenkins
Branch: master

commit 39627f0456562ec452d610713df41a7a71dd47a0
Author: Eduardo Gonzalez <email address hidden>
Date: Tue Apr 11 10:50:47 2017 +0100

    Fix panko mongo idempotency

    Panko fails to create users in mongo when deploy
    is executed more than once.

    Change-Id: I89d164220e874f7cffe0f2c70797c61a147bcafb
    Closes-Bug: #1681747

Changed in kolla-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/457908

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/ocata)

Reviewed: https://review.openstack.org/457908
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=eaec5e3511c3427da8750535792090a40485b47b
Submitter: Jenkins
Branch: stable/ocata

commit eaec5e3511c3427da8750535792090a40485b47b
Author: Eduardo Gonzalez <email address hidden>
Date: Tue Apr 11 10:50:47 2017 +0100

    Fix panko mongo idempotency

    Panko fails to create users in mongo when deploy
    is executed more than once.

    Change-Id: I89d164220e874f7cffe0f2c70797c61a147bcafb
    Closes-Bug: #1681747
    (cherry picked from commit 39627f0456562ec452d610713df41a7a71dd47a0)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 5.0.0.0b2

This issue was fixed in the openstack/kolla-ansible 5.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 4.0.2

This issue was fixed in the openstack/kolla-ansible 4.0.2 release.

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.