* Update charm-percona-cluster from branch 'master'
to a86390aeabca27167e26f38afb202e7daf39b185
- Additional check to replace missing seeded file
The additional check is based on cluster being bootstrapped and the last
backup being a SST.
The change includes new function for checking the last backup was SST and unittests to verify said function as well as the main charm_check_func where the check is used and seeded file is replaced.
Closes-Bug: #2000107
Signed-off-by: Rafael Lopez <rafael.lopez@canonical.com>
Change-Id: I8e516059da5299cc0e0ce8ef0802d3a46abb1a54
* Update charm-percona-cluster from branch 'master'
to 43b98b64167822c82cb54c659b2a58f5eff63e55
- Minimal update to tox.ini for tests to pass
- remove pip.sh
- unpin top level requirements
- update charm-tools version for pep8 test
- update osci.yaml tox_extra_args for compatibility
Signed-off-by: Rafael Lopez <rafael.lopez@canonical.com>
Change-Id: Iec9fbd296d6d5b5fa647739d5588218c28e0a773
* Update charm-percona-cluster from branch 'master'
to 9905ca13eeed890411d29c4bb5527caf3991a84e
- Revert "Added NRPE requested governor CPU check"
This is being handled in the nrpe charm now.
See MP #427905 in LP:
https://code.launchpad.net/~mertkirpici/charm-nrpe/+git/charm-nrpe/+merge/427905
This reverts commit 7d240fa35479028793f7059530b68b538c4a6bd8.
Signed-off-by: Mert Kırpıcı <mert.kirpici@canonical.com>
Change-Id: Iad0cf612e1333a1d89b6ccaca5161e84b7b020aa
* Update charm-percona-cluster from branch 'master'
to a3f65978a7b6719a901406a31eaf338d9c2f61c3
- Fix log message when catching `get_wsrep_value` exception
`get_wresp_value` can fail in `cursor.execute()` and no log
message would be written.
This commit fix and ensure the right message is logged.
Closes-Bug: #1942936
Change-Id: Idbb1170bbf43fdecec233137d6581bf8f799baa9
* Update charm-percona-cluster from branch 'master'
to 66f004c2baa6fe17f933886315769711da869e92
- Add an option to allow MySQL service to log to syslog.
This patch provides one of the alternative solution to address the
problem that the error log might grow too large.
Closes-bug: #1812950
Change-Id: If7c0c71492eb30f24cbcc03ca05a67e6ea571f4e
* Update charm-percona-cluster from branch 'master'
to 6e42563bf402b4fa839eb2f58129247b1c16f535
- Sync test-requirements.txt from release-tools
Change-Id: I8c880069d152603ca3dded43bdedf39e4565385f
* Update charm-percona-cluster from branch 'master'
to 6751832bb65606ee54d8701bcff1a6c0fee5aa37
- Migrate percona-cluster to charmcraft build
- add *.charm to .gitignore
- add build-requirements.txt
- add charmcraft.yaml (build on 18.04, run on 18.04)
- modify osci.yaml to do build
- add rename.sh to clean-up naming of charms
- modify bundles to work with *.charm and use the charmhub
- modify tox.ini to include the build target
Note that this charm doesn't officially support xenial, but the bundle
has been left in the tests for debugging/test purposes. It Launchpad it
will be build on bionic to run on bionic.
This patch adds *.charm to the .gitignore to ensure that any built
artifacts are ignored.
Change-Id: Icd4942262a8dfcd3a194684571861121d92f8ed2
* Update charm-percona-cluster from branch 'master'
to 6ff8acbd6a1f2249c41d84fcf3308e0dbf4d59eb
- Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.
Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: Ie96a81d19be4f14efc7067ddb9c47827f5255ccf
* Update charm-percona-cluster from branch 'master'
to 50f3f31f47ac7c569ec168b71e154bf5783eb72d
- Switch to yoga unit jobs and add py39
Change-Id: I951c774ef57b5437d7e624936f67fdbf6c383d58
* Update charm-percona-cluster from branch 'master'
to 393afdd1e7c7a07b9b0675fadb1da4fbd6fff5c1
- Remove xenial metadata and function tests
Drop xenial metadata and function tests as the next release of
the charms won't support xenial. xenial-queens-ha-series-upgrade
was not dropped as it still seems useful to test.
Change-Id: I27005eb7c149f788a14a68fad1b700b374697dd3
* Update charm-percona-cluster from branch 'master'
to e1ca4001ac5ae40ccf83770b2b614d3577b14f20
- charm-helpers sync for 21.10 release
- charm-helpers sync for new charm-helpers changes
- update tox/pip.sh to ensure setuptools<50.0.0
Change-Id: If2397cf401d1bcec3ff7c622fa9e3477291fc7eb
* Update charm-percona-cluster from branch 'master'
to 75fcf19f33dff690565d24ab06226d908ae0ef08
- Add max_connect_errors configuration option.
This change adds the config option max_connect_errors for MySQL to this
charm and sets a default of 100.
Commit also includes the inclusion of this (default) config setting in the
unit tests.
Closes-Bug: #1776908
Change-Id: I33b9e29bd64ad8a1fec0edc3dfd657a87648b537
* Update charm-percona-cluster from branch 'master'
to fc9b9dbcb9bfa26d37aa8e6afe6540591ddd72e5
- Don't configure databases to replicate w/out async
Check that that the asynchronous replication relations exist prior
to providing the databases_to_replicate to the templating engine
code. Specifying the databases-to-replicate config option is not
supposed to apply when the asynchronous relation is not established.
Closes-Bug: #1934680
Change-Id: Iedd0532268f0bf533305412105590c5afdd7c0ec
* Update charm-percona-cluster from branch 'master'
to 274165bcacf9c340dff966bc50446e5ecbd371ce
- setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:
UserWarning: Usage of dash-separated 'description-file' will not be
supported in future versions. Please use the underscore name
'description_file' instead
[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb
Change-Id: I32a6b4aa31c9b58ac632025670f50a065120c109
* Update charm-percona-cluster from branch 'master'
to 570ab6f465a5d20f9dc443eaaac1ab8b31abb931
- Updates to flip all libraries back to master
This patchset updates all the requirements for charms.openstack,
charm-helpers, charms.ceph, zaza and zaza-openstack-tests back
to master branch.
Change-Id: Iecc63d575d0ed1b1d533766888e16b061adb626c
* Update charm-percona-cluster from branch 'master'
to 432c3f0be45780bb2938ea39fab0c8a6ef9057ba
- 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
the 'mysql-nagios.passwd' key instead of 'nagios-password'. This was an
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-nagios.passwd'. This enables the key to work with
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: Ibc751bef7b4654ebffdf843c556b193373e6e80c
Related-Bug: #1925377
Closes-Bug: #1925042
* Update charm-percona-cluster from branch 'master'
to 4f51930798ff9f5315b3e901e963380eb6ca5ab8
- 21.04 sync - add 'hirsute' in UBUNTU_RELEASES
The 'hirsute' key in c-h/core/host_factory/ubuntu.py:
UBUNTU_RELEASES had been missed out, and is needed for
hirsute support in many of the charms. This sync is to
add just that key. See also [1]
Note that this sync is only for classic charms.
[1] https://github.com/juju/charm-helpers/pull/598
Change-Id: Ia190032a975de9bd242c724e54407918be817bc5
* Update charm-percona-cluster from branch 'master'
to cc72eee4821c62bd19431a40ca1648b7f9c828d4
- 21.04 libraries freeze for charms on master branch
* charm-helpers sync for classic charms
* build.lock file for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
- ensure stable/21.04 branch for charms.openstack
- ensure stable/21.04 branch for charm-helpers
Change-Id: I520e34a35b250954c0691250c779eee6e804c749
* Update charm-percona-cluster from branch 'master'
to 6b7b31e8b14c7f7d1cc24be6cb42c6657dfdc92e
- Merge "Add new osci.yaml"
- Add new osci.yaml
This change is preparatory to migration Ubuntu OpenStack CI
from Jenkins to Zuul
Change-Id: Id44d2037d5743bc882388141d726194c51d82fbf
* Update charm-percona-cluster from branch 'master'
to d55dcdebc9049c509e2f5ab40c8d497dc0a3236d
- Ensure that correct password update is used for mysql version
On mysql pre 5.7.5 and older (e.g. xenial) a different password update
SQL statement is needed. Detect the ubuntu version (assuming the
packages are used) and use the version for that password.
Change-Id: Ifd73f20c2523de164fb23e8f5a5e757393d489e3
Closes-Bug: #1916672
* Update charm-percona-cluster from branch 'master'
to af9c467e353ca8e9254809f8f289fc383284da5e
- Updates for testing period for 20.01 release
Includes updates to charmhelpers/charms.openstack for cert_utils
and unit-get for the install hook error on Juju 2.9
* charm-helpers sync for classic charms
* rebuild for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
- ensure master branch for charms.openstack
- ensure master branch for charm-helpers
* Include NoNetworkBinding late fix.
func-test-pr: https://github.com/openstack-charmers/zaza/pull/409
Change-Id: I1a97004410c5cf4ef98164281137bce46756b12c
* Update charm-percona-cluster from branch 'master'
to 7bbfb3408ef5dd0475d4f2e9314613969f324f72
- Merge "Updates for testing period for 20.01 release"
- Updates for testing period for 20.01 release
* charm-helpers sync for classic charms
* rebuild for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
- ensure master branch for charms.openstack
- ensure master branch for charm-helpers
Change-Id: I99b9f3570549921b40c937a983c2624e254bc677
* Update charm-percona-cluster from branch 'master'
to 712bb3d7e8f2bc1e7f7916d6d166cccd260a844d
- Remove Disco and Eoan bits
Change-Id: I6f9833e4b5a17e6b5a2ada4426bf02a991253dca
* Update charm-percona-cluster from branch 'master'
to eac7bceb0c307694f1d7e724b69b1178df0a59a6
- Merge "Raise file limits to allow max-connections >4190"
- Raise file limits to allow max-connections >4190
Install a systemd unit override with LimitNOFILE raised to the required
number based on the same calculation the server performs to ensure both
the requested max_connections and table_open_cache values can be met.
The MySQL server does make some attempt to do this itself when started
as root which worked under Xenial, however in Bionic the systemd service
is started as the mysql user with LimitNOFILE=5000. As a result, the
server cannot raise the limit itself and caps max-connections to 4190,
table-open-cache to 200 and logs a warning to that effect:
[Warning] Changed limits: max_connections: 4190 (requested 12000)
More background:
https://www.percona.com/blog/2017/10/12/open_files_limit-mystery/
Change-Id: I25b429cc9b4970e3d7ef39bb9e6d738fe943686f
Closes-Bug: #1905366
* Update charm-percona-cluster from branch 'master'
to 4335d0b525235bf16c2faa8343141cd807fb2b90
- Improve deprecation text
This improves the messaging surrounding the
deprecation of this charm.
Fix links.
The removed upstream links will be placed in the
linked CDG resource (on upgrading to non-focal
series).
Change-Id: I6c00fa9f452583cdf5072938e57b4cf611a3115f
* Update charm-percona-cluster from branch 'master'
to 11ee1ef563e3e7a3213fce6ef6151fe5283d0161
- NRPE: Monitor threads connected to MySQL.
Add a NRPE check to monitor the number of threads connected
to the MySQL database, in proportion to the maximum number of connections.
For this check, a nagios user will be created. This user does not have any
permissions set, does not have access to any database and can only connect
from localhost.
Warning and Critical thresholds (in percentage) can be configured.
Add an action to reset nagios's password. This action could only be run
on the leader unit.
Closes-Bug: #1816759
Change-Id: Id35b0331322c2744a9f839b3eb153eed1bc53aac
* Update charm-percona-cluster from branch 'master'
to 2962cc9a9aa768138d9f7e9e534fa75a5520e738
- Ensure that c.c.unitdata.kv is properly mocked out
As unit tests run concurrently, it's important that all tests use a
mocked out version of the kv() store. Otherwise, unit tests can race
and fail due to SQLite lock erros. See linked bug for details.
Change-Id: I7e16a566531a7faf9d3a960c3df524fd46976a2a
Closes-Bug: #1905760
* Update charm-percona-cluster from branch 'master'
to da304cbea6bbabd3a348421b81894a60261fd646
- Merge "React to `source` or `key` changes"
- React to `source` or `key` changes
After changing the `source` or `key` in the configuration,
the `config-changed` hook was activated, but did not call `add_source`
and `apt_update`.
This logic has been added to the `config-changed` hook as well as
the state changed to `blocked` if the addition of a new source
or key fails.
Closes-Bug: #1893034
Change-Id: I0e7afd5a06c4945341329dd96e8eef3016367386
* Update charm-percona-cluster from branch 'master'
- Move cold boot section to CDG
Also move the section up the page to reflect
its importance.
Depends-on: Ic7ad2622b6aa3c8ae8821a8f5f531534d8cfb3d6
Change-Id: I31ba8a968cd7f42d639e1843e66714dbd0a067aa
* Update charm-percona-cluster from branch 'master'
- Batch update to land Ubuntu Groovy support into the charms
Cherry-Pick from 09752a1527
Change-Id: I6896ca04c10468466d2956909bc9a8df69319f03
* Update charm-percona-cluster from branch 'master'
- Sync libraries & common files prior to freeze
* charm-helpers sync for classic charms
* charms.ceph sync for ceph charms
* rebuild for reactive charms
* sync tox.ini files as needed
* sync requirements.txt files to sync to standard
Change-Id: I1bf6a834b3678f631f6335af9f0e8b779f863c66
* Update charm-percona-cluster from branch 'master'
- Fix series-upgrade issue where seeded file goes missing
During resume on a non-leader unit, the 'seeded' file can go missing
when the package syncs over to the /var/lib/mysql or
/var/lib/percona-xtradb-cluster directories (vivid+). It's not really
clear why it doesn't do this every time (i.e. not every non-leader unit
fails), but this fix ensures that if the unit *is* seeded prior to the
series-upgrade, then it stays seeded after the series upgrade.
The related zaza-openstack-tests change [1] is about fixing the
series-upgrade test.
Note there is no trusty-mitaka test here as the charm doesn't support
trusty. The last version of percona-cluster in the charm store that
supports trusty is rev. 276
[1]: https://github.com/openstack-charmers/zaza-openstack-tests/pull/406
Change-Id: I628be1c24081d7e0e150e5064c5fa4ab694632e9
Closes-bug: #1868326
* Update charm-percona-cluster from branch 'master'
- Remove Groovy from metadata
Also remove unused Disco test bundle.
Change-Id: I4357def0540caa1911c0a47821f1bfddf5da7028
* Update charm-percona-cluster from branch 'master'
- Updates for 20.08 cycle start for groovy and libs
- Adds groovy to the series in the metadata
- Classic charms: sync charm-helpers.
- Classic ceph based charms: also sync charms.ceph
- Reactive charms: trigger a rebuild
Change-Id: Id9e0319806471fa4d074c77bff105e2083313e19
* Update charm-percona-cluster from branch 'master'
- Remove series upgrade steps
The information provided in the CDG is now favoured.
Change-Id: I0f90c4fc9d1928579fc538bfea87e01aa23e6311
* Update charm-percona-cluster from branch 'master'
- Merge "Mark seeded on cluster-relation-changed"
- Mark seeded on cluster-relation-changed
When a node is bootstrapped and the other join, they will receive a copy of
the database via SST with the help of XtraBackup, during this process the
/var/lib/percona-xtradb-cluster will be emptied so after this the seeded
file will be missing. Since the action bootstrap-pxc will trigger the
cluster-relation-changed hook it's a good place to call mark_seeded().
Change-Id: I8510bb81435a3096d6a005610fce88ff2b7ffeab
Closes-Bug: #1868326
Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/203
* Update charm-percona-cluster from branch 'master'
- Merge "Fix mysqldump function for distro below Eoan. Add test."
- Fix mysqldump function for distro below Eoan. Add test.
Fix mysqldump action by checking distro version and removing
unsupported flags from the mysqldump command.
DocImpact
Closes-Bug: #1878272
Implements: MySQL dump test
Change-Id: Iddf1ff408e5657e96ced6f853dfc42acf47072c1
* Update charm-percona-cluster from branch 'master'
- Format based on README template
This is a move towards a more standardised README.
The Series Upgrade section should probably eventually
be moved to the series-upgrade appendix in the CDG.
Change-Id: I9ca724dc9b3db02dc32f6462f5e24cc453d0dd3e
* Update charm-percona-cluster from branch 'master'
- Merge "Remove Amulet leftover and support Python 3.8"
- Remove Amulet leftover and support Python 3.8
Support Python 3.8 by pulling a version of charm-helpers containing https://github.com/juju/charm-helpers/pull/423
Change-Id: I1167c67fa23482862900989d5105162af2599309
Closes-Bug: #1828424