OS Keystone role race condition during bootstrap

Bug #1829438 reported by Bjoern
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Unassigned

Bug Description

I encountered a race condition based on a previous OSA stein install where the credential migrated

https://github.com/openstack/openstack-ansible-os_keystone/blob/stable/stein/tasks/keystone_credential_create.yml#L87

tried to access a database which was not setup as the keystone_db_setup.yml is called later inside the main.yml. Once I moved the keystone_db_setup.yml before the credential_create playbook, the role successfully installed.

Error:

May 14 05:08:41 controller-3 keystone-manage[131151]: 2019-05-14 05:08:41.414 131151 CRITICAL keystone [-] Unhandled error: OperationalError: (pymysql.err.OperationalError) (1045
, u"Access denied for user 'keystone'@'infra-1.openstack.local' (using password: YES)")

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

Fix proposed to branch: master
Review: https://review.opendev.org/659676

Bjoern (bjoern-t)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_keystone (master)

Reviewed: https://review.opendev.org/659676
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_keystone/commit/?id=3afb763c103665f8c04f3d8ebeda8b207e1fcab7
Submitter: Zuul
Branch: master

commit 3afb763c103665f8c04f3d8ebeda8b207e1fcab7
Author: Bjoern Teipel <email address hidden>
Date: Thu May 16 16:59:54 2019 -0500

    Execute the keystone db setup earlier in the process

    As the keystone credential_migrate command can access
    the keystone database in cases the os_keystone role
    stopped prematurely, the db setup playbook is moved
    in front of the `keystone_credential_create.yml` playbook
    to prevent and race condition.

    Change-Id: I8c89be0ffb4f23b79c0463bff2eb135b9769eb2a
    Closed-Bug: #1829438

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_keystone (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/665218

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

Reviewed: https://review.opendev.org/665218
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_keystone/commit/?id=d074c927fdc372441d04764e2d1471bf11330909
Submitter: Zuul
Branch: stable/stein

commit d074c927fdc372441d04764e2d1471bf11330909
Author: Bjoern Teipel <email address hidden>
Date: Thu May 16 16:59:54 2019 -0500

    Execute the keystone db setup earlier in the process

    As the keystone credential_migrate command can access
    the keystone database in cases the os_keystone role
    stopped prematurely, the db setup playbook is moved
    in front of the `keystone_credential_create.yml` playbook
    to prevent and race condition.

    Change-Id: I8c89be0ffb4f23b79c0463bff2eb135b9769eb2a
    Closed-Bug: #1829438
    (cherry picked from commit 3afb763c103665f8c04f3d8ebeda8b207e1fcab7)

tags: added: in-stable-stein
Revision history for this message
VinceLe (legoll) wrote :

I think this bug status should be updated

Bjoern (bjoern-t)
Changed in openstack-ansible:
status: New → Fix Released
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.