[Tracking] Need to fix create_nagios_user() function to use charm-helpers and fix relevant function in charm-helpers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
New
|
Undecided
|
Unassigned | ||
OpenStack Percona Cluster Charm |
New
|
Undecided
|
Unassigned |
Bug Description
The 21.04 release of the charms has a hotfix applied to the create_
i.e. in charmhelpers the:
def set_mysql_
function doesn't allow the password to be updated for any other user than 'root' as it requires access to the mysql.user table, which is only writable by root.
Things to fix:
1. The set_mysql_
2. The percona-cluster create_
3. Verify it using the bionic-nagios and bionic-nagios-ha bundles in the percona-cluster charm.
Reviewed: https:/ /review. opendev. org/c/openstack /charm- percona- cluster/ +/786947 /opendev. org/openstack/ charm-percona- cluster/ commit/ 432c3f0be45780b b2938ea39fab0c8 a6ef9057ba
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 432c3f0be45780b b2938ea39fab0c8 a6ef9057ba
Author: Alex Kavanagh <email address hidden>
Date: Mon Apr 19 20:27:55 2021 +0100
Ensure that nagios user gets created with a password
The associated bug is due to a change introduced in commit d55dcde
which was to ensure that the correct password update is used for
different versions of mysql (pre and post 5.7.5). However, this change
has broken the nagios user creation due to not setting the password.
This patch creates the nagios user and passord at the same time. The
updating of the password is only done if the account already exists.
The change also corrects the nagios password store in leader-settings to nagios. passwd' key instead of 'nagios-password'. This was an nagios. passwd' . This enables the key to work with
the 'mysql-
unfortuante error when the nagios change password was introduced. The
charm detects if the 'nagios-password' key is used on charm-upgrade and
moves it to 'mysql-
the standard MySQLHelper functions.
Finally, the ALTER command (on percona) doesn't update non-InnoDB tables
and thus needs to be run for each unit when the nagios password is
changed via the action. The changes in percona_utils.py enable this to
happen.
Whilst the change looks large it ONLY affects the nagios password parts
of the charm.
The related bug is a tracking bug to serve as a reminder to fix this in
charm-helpers and this charm (i.e. make the charm-helpers code work to
change a password for any user other than root, and then enable this
charm to use that code).
Change-Id: Ibc751bef7b4654 ebffdf843c556b1 93373e6e80c
Related-Bug: #1925377
Closes-Bug: #1925042