This patch adds support for upgrading Redis datastore - both single
instance and cluster.
It is achievied in a similar way to MySQL/Mariadb. Steps are:
+ For each node do:
+ stop database
+ preserve configuration files,
+ unmount data volume,
+ create new instance with new datastore,
+ enter restarting mode
+ mount data volume,
+ restore configuration files,
+ reload datastore
Note that due to the Redis Cluster design and Trove approach (all
nodes are master nodes) we do not perform real rolling upgrade - some
Redis slots may be unavailable while upgrading node associated with
them.
This patch adds also a user documentation about upgrading datastores
using Redis as an example.
Story: #2005421
Task: #30443
Co-Authored-By: Kasper Hasior <k.hasior@samsung.com>
Change-Id: I60cddb3a41d2cc7024cbec3d2fd2038d79446507
Signed-off-by: Kasper Hasior <k.hasior@samsung.com>
This patch extends adds a new field 'instance_ids' in payloads of two
cluster events:
- DBaaSClusterShrink (during start and end notification),
- DBaaSClusterGrow (during end notification).
Moreover, additional end notifications after growing and shrinking
cluster have been added.
The purpose of this change if to enable better integration with
tools for monitoring resources usage.
Change-Id: I2c39b2c3bff65f88e46944eda22209bdc92803bc
Signed-off-by: Kasper Hasior <k.hasior@samsung.com>
Co-Authored-By: Kasper Hasior <k.hasior@samsung.com>
Story: #2005520
Task: #30639
The keystone CLI is deprecated in favor of
python-openstackclient, update docs using
openstack CLI instead of keystone CLI.
Change-Id: Ifddb5d0d38e4353e17e14ecd65a0d086a6886763
The commands used by constraints need at least tox 2.0. Update to
reflect reality, which should help with local running of constraints
targets.
Change-Id: Ifc2c2ad88d77fb2590b5bb598458bdfd4a423a9e
DevStack builds a mysql guest image by default, but trovestack is used
heavily in Trove functional test and image building is also part of the
script.
This patch disables the image building in devstack for all functional
CI jobs except the mysql ones so we could save some time for those jobs.
Change-Id: Iefef03066c1a054bf760f83a66ce7795ad92c44a
Story: #2005490
Task: #30590
When we upgrade mariadb version we mount volumes with data and
config files.
As we use new images we cannot make assumption that UIDs are the same
as on the old image so we set a new files and directories owner.
Two new functions have been added: _restore_directory() and
_restore_home_directory() in class Manager which are responsible to
copy files from the volume to the instance file system and to change
owner and group of the files.
The new function is located in base Manager class as it very likely
that other datastores may use it as well.
Co-Authored-By: Przemysław Godek <p.godek@partner.samsung.com>
Change-Id: I3c39f51b471081eeabed55070dc91807544a2dda
Story: #2005398
Task: #30391
Signed-off-by: Kasper Hasior <k.hasior@samsung.com>
For now mariadb scenario single test case fails because the script
cannot find cloudinit file.
This change adds cloudinit file creation if the file doesn't exist.
Before this patch we were getting the following message:
tee: /etc/trove/cloudinit/mysql.cloudinit: No such file or
directory
#!/bin/sh
ERROR: InvocationError for command /opt/stack/trove/integration/
scripts/trovestack gate-tests mariadb mariadb-supported-single
(exited with code 1)
Change-Id: Iea74dc2c58b1c4376c698f0084454cfcbb3f3b7d
Signed-off-by: Kasper Hasior <k.hasior@samsung.com>
If we do not pass kwargs to exception, the parameter will be deemed
as message and will be displayed directly. This is to pass kwargs to
some exceptions, to get better format of error message.
Change-Id: Ia7d0ec0152de9ee4bdf10c8de80e8d32bbf4a42b
Now Trove doesn't support to specify keypair when creating the db
instance, the ssh key is injected into the guest agent image at the
build time, which makes it very hard to manage.
This patch adds a config option `nova_keypair` that is used as keypair
name when creating db instance. The old way of the image building will
be changed in the subsequent patches.
Change-Id: I41d4e41fc4bc413cdd48b8d761429b0204481932
Story: #2005429
Task: #30462
- Add a new element 'guest-agent' for image building. This element is
used when dev_mode=false, so that the trove code is downloaded into
the image during the building phase rather than during the guest
agent initialization.
- Improve trovestack sub-command 'build-image'.
./trovestack build-image ${datastore_type} \
${guest_os} \
${guest_release} \
${dev_mode}
- Improve documentation.
Story: #2005387
Task: #30375
Change-Id: I9d7acbd6a97f8c01b48b0f2cf94398d549d89124
So far, when Swift wasn't installed, there was no error handlig
in trove API.
This change adds LogsNotAvailable exception which is raised when
swift endpoints are not available.
Change-Id: I9a8a75b40bde90163560cdd758f17f9a98a41f0a
Story: #2005378
Task: #30360
Signed-off-by: Kasper Hasior <k.hasior@samsung.com>
Trove mainly uses trovestack script to trigger the CI tests, including
the guest agent image building, so the image building in devstack could
be skipped to decrease the testing duration.
Change-Id: I26fa0adc1a5e39612be15b75d37d22ea1cca3be1
Story: #2005391
Task: #30380
For now, after upgrading mariadb in guestagent logs we were constantly
getting message:
"DB server is not installed or is in restart mode, so for now we'll
skip determining the status of DB on this instance."
It is caused by the fact that we do not exit restart mode.
This patch adds exiting restart mode after successful upgrade.
Change-Id: Iabf2466f3f68838a54ca15714e832968b2803572
Story: #2005396
Task: #30389
Signed-off-by: Kasper Hasior <k.hasior@samsung.com>
SecurityGroup API extension is not mentioned in Trove API doc. Security
group information could be retrieved from Neutron.
Change-Id: Ifb134eaada09ca4dc739eddb5772681b486cad93
Story: #2005366
Task: #30341
For systems with systemd there is a wrapper program to bootstrap
Galera Cluster - galera_new_cluster.
This patch introduces a simple method to find a location of a given
executable.
Using this method we can check if a command 'galera_new_cluster' exists
- if it is present it is used to bootstrap Galera Cluster.
Co-Authored-By: Jacek Kaniuk <j.kaniuk@samsung.com>
Change-Id: Iab8f6dd7f908f1e031135e2136abeb228890108a
Signed-off-by: Kasper Hasior <k.hasior@samsung.com>