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
- 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
`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
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
- 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
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
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
- charm-helpers sync for new charm-helpers changes
- update tox/pip.sh to ensure setuptools<50.0.0
Change-Id: If2397cf401d1bcec3ff7c622fa9e3477291fc7eb
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
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
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
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
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
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
* 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
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
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
* 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
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
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
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
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
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
Also move the section up the page to reflect
its importance.
Depends-on: Ic7ad2622b6aa3c8ae8821a8f5f531534d8cfb3d6
Change-Id: I31ba8a968cd7f42d639e1843e66714dbd0a067aa
* 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
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
- 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