commit 5ee23cf83def70b541858958659dc33a6bb5b0b6
Author: John Fulton <email address hidden>
Date: Mon Jun 27 14:45:35 2022 -0400
Limit standalone ceph-admin user creation to a single host
When 'openstack overcloud ceph user enable --standalone' is
run, call Ansible with '--limit undercloud'.
Bug #1979093 happened because Ansible was running the user
module on the same host as if it were two hosts. The module
is idempotent but not race safe. E.g. when user execution A
and user execution B are run on the same host, A's check that
the user does not exist might be true but before A goes on to
create the user, B could have created it first depending on
scheduling.
The python-tripleoclient uses Ansible --limit when creating
the ceph-admin user so only _admin nodes get the private key.
This works for multinode but standalone only has one node, so
for that condition redefine the limit list to that single node.
Reviewed: https:/ /review. opendev. org/c/openstack /python- tripleoclient/ +/847844 /opendev. org/openstack/ python- tripleoclient/ commit/ 5ee23cf83def70b 541858958659dc3 3a6bb5b0b6
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 5ee23cf83def70b 541858958659dc3 3a6bb5b0b6
Author: John Fulton <email address hidden>
Date: Mon Jun 27 14:45:35 2022 -0400
Limit standalone ceph-admin user creation to a single host
When 'openstack overcloud ceph user enable --standalone' is
run, call Ansible with '--limit undercloud'.
Bug #1979093 happened because Ansible was running the user
module on the same host as if it were two hosts. The module
is idempotent but not race safe. E.g. when user execution A
and user execution B are run on the same host, A's check that
the user does not exist might be true but before A goes on to
create the user, B could have created it first depending on
scheduling.
The python- tripleoclient uses Ansible --limit when creating
the ceph-admin user so only _admin nodes get the private key.
This works for multinode but standalone only has one node, so
for that condition redefine the limit list to that single node.
Change-Id: I2f62cdfcb88edb 5552cbd7351b624 0f78376c93d
Closes-Bug: #1979093