they are not maintained for a long time, and trove already switch
the tests to templest.
This commit removes the usage of them. more details see story.
Story: 2010882
Task: 48606
Depends-On: https://review.opendev.org/c/openstack/trove/+/914228
Change-Id: Ie021e0bd708cf8ed13853dea632312af38190205
Significant changes:
* Using docker image to install datastore.
* Datastore image is common to different datastores.
* Using backup docker image to do backup and restore.
* Support MariaDB replication
* Set most of the functional jobs as non-voting as nested
virtualization is not supported in CI.
Change-Id: Ia9c97a63a961eebc336b70d28dc77638144c1834
- Execute test groups in serial to make sure no more than 2 database
instance are created at the same time.
- Remove some unneccesary tests
- Remove unneeded datastore, e.g. 'Test_Datastore_1'
- Remove unsupported trovestack subcommands
- Move unsupported DIB elements to the 'deprecated-elements' folder
- Decrease default value of 'agent_call_high_timeout' to 5min
- Add initial_deplay for pooling task
- Use socket file to connect with database instead of using localhost
IP
Change-Id: Ie5030a671fbeb453eafa6cbe04e08da7b52e33c9
- 'HEALTHY' means the db service is responsive, 'ACTIVE' means the db
service is alive.
- Remove the CI job fakemodetests, but will add similar testing task in
the future.
- Fix the periodic CI job
- Remove MongoDB and related jobs
Change-Id: I5abe9091ba203297dc87db5fba139179166321f7
The service tenant deployment model means Trove creates most of the
resources(vm, volume, security group, etc.) relating to a database
instance in the Trove service tenant rather than the end user.
With this deployment model, most of the related resources behind the
scenes are invisible to the user, which is a more secure deployment
model for either private or public cloud provider.
DevStack should follow this model as it will be recommended for Trove
deployment in production.
Changes included in this patch that are necessary in order to make that
happen:
- Add 'admin' role to Trove service user(username: trove, project:
service) in DevStack.
- Create Trove management network resources for Trove service user in
DevStack.
- Enable Trove remote client configuration by default in DevStack.
- Mainly use alt_demo user in alt_demo project for integration tests,
config trove user as the admin role user in integration tests.
- Disable the module related tests(module_groups) for now because of no
use cases but need effort to fix all the failed tests in the service
tenant model.
Story: #2005445
Task: #30489
Change-Id: I2efb69d3d50344914a875b773f62a227dba2ccaf
Main goal is to have a working vm image registered in
trove after devstack installation.
It is a first step towards trovestack-redesign as described
in https://etherpad.openstack.org/p/trovestack-redesign
It is enabled by default during devstack installation with
trove enabled plugin, but it can be skipped by setting
DISABLE_TROVE_IMAGE_SETUP=TRUE
Implementation details:
* export environmental variables for diskimage-builder
* build an image with disk-image-create script
* register the newly created image in trove
* add tripleo-elements information to default settings
Change-Id: I6e57890c5b6fb65e9b8c63363f92e5a7c70e523e
Signed-off-by: Dariusz Krol <d.krol@samsung.com>
Functional tests are executed by trovestack script, which uses python
in default OS version which is 2.7.
This change wraps python in tox and executes trovestack int_tests in
virtual enviroment, starting them in python3.
Any future python version change could be managed by tox framework.
Change-Id: I3a849978241d3d0669ef9e1c802ff504ac3c32cb
Signed-off-by: Marcin Piwowarczyk <m.piwowarczy@samsung.com>
According bug description, replica should has volume size at least
as much as the master. Otherwise it maybe cause exception for
replica data. To solve this problem,I added judgement for volume
size when create a replica, which not smaller than master
volume size. And make this function as configurable by
CONF.verify_replica_volume_size.
Also provide a test case to validate the method.
Change-Id: I5e110ce672c1b1715bca1727d70d656301cd0d43
Closes-Bug: #1357500
This change uses the alt-demo network instead of sharing
the private network from the demo tenant. This should
fix the tempest tests on python-troveclient complaining
about this and also brings us one step closer to using
neutron entirely.
Tested with the demo tenant as well and it still
puts on a network without using the --nic parameter, the
only drawback is that the ip doesn't appear on the trove
show command.
The scenario and api tests were modified to always pass
in the nic parameter (as it probably should have been done
from the beginning anyways).
Change-Id: I9f3cbae3490e9995ba5f835fc2304442b83464e4
Closes-Bug: 1647001
This test was skipped in the scenario runs however it was
not disabled in the original api tests. Although it
doesn't fail as often there it still happens, so the
same change has been applied to it.
See: https://review.openstack.org/#/c/368230
The test will also print out the bug number during each run
as a reminder (using the new SkipKnownBug method).
Change-Id: I931d6d72a70cc93dcd8248d9840eadf1160b9bab
Related-Bug: #1622014
When the change for slave_of -> replica_of was reverted, the
test calls using the python interface (int-tests) were also
reverted. Unfortunately the scenario tests were not, so they
are now broken.
This fix synchronizes the calls to all use replica_of, which is
the preferred argument.
Closes-Bug: #1558584
Change-Id: I45c8c5a21c141ee7ebd8b5616bac174fe99eb907
This reverts commit 0c94a5bae0
Removing 'slave_of' from the instance create API was a
backward incompatible change.
The parameter should be removed if/when trove has a new
version in their API, or adopts microversions.
This change depends on the change which reverts the
removal of slave_of from python-troveclient since
the tests depend on that argument being available in the
client.
Note that the tests could later be updated to no longer
use 'slave_of' to avoid a deprecation warning from the
client.
Conflicts:
trove/tests/api/replication.py
NOTE(mriedem): The conflict was due to
5515c5291c.
Depends-On: I9b3ec6c101a89f30e61fc683808506c404e5474f
Change-Id: Ib6811293d99fbc20f6a52ee10de7c98bfb682b18
Partial-Bug: #1538506
This is another set of fixes to integration tests, as the datastore is not
inherited by the parent job when a backup or a replica is created.
See also:
- Ib3e78bb68aaf992177b9d9cd1d89e84fb54830ed
- Ice626b3d3f73e75222b1080afa58232e03459a8e
Also, fix the fake guestagent so that it works with the increased
timing coming from the fixed (now working) tests.
Change-Id: I8d2b5a4627eb9292ba4535696f9565a3c20a0783
Change set 245845 skipped two tests to break the deadly embrace
between the client and the controller. This change reverts that.
Change-Id: I7f81a7ed579694abaeb15be01ca54720f8a73810
Partial-Bug: #1461196
Depends-On: I9b905716b704ea9ec9332b48b05c49cccbd04c8b
Depends-On: I87c8a14c06fa5df60ea3ed6b09412dc32fafcec7
Commit https://review.openstack.org/#/c/245738/ eliminated slave_of in
the python-troveclient. The controller has long understood how to deal
with replica_of but there are a couple of tests that are still sending
in slave_of.
This commit removes slave_of from the tests and from the Trove public
API. The python-troveclient commit will depend on this commit as the
DSVM test(s) which are in the trove repository currently fail in that
change.
This commit also contains a change to tests/api/replication.py and
disables the test 'test_detach_replica' and
test_slave_is_not_read_only with a distinct SkipTest. This is to break
the deadly embrace between this change set and the related changeset
on the client side as circular dependencies across projects are not
allowed.
Change-Id: I87c8a14c06fa5df60ea3ed6b09412dc32fafcec7
Partial-Bug: #1461196
Related: I9b905716b704ea9ec9332b48b05c49cccbd04c8b
If integration tests are executed in an environment with multiple nics,
nova complains and the instance does not start. Given that the
shared_network parameter is already available with that specific
meaning, use it on instance creation.
The default value (None) should ensure that the default behavior
does not change.
Change-Id: I8554ebf111cad829deb34d3d23d18f72d7f13554
The datastore and its version is now always passed on instance creation for
integration tests.
Previously the default datastore (and version) were used, ignoring the
settings in the test configuration.
Change-Id: Ib3e78bb68aaf992177b9d9cd1d89e84fb54830ed
Depends-On: Ifa4496eb1c9e2fe053978c708e7fa1069f12cb3f
In the int-tests, the replication implementation verifies that the
backup used to create the replica is removed after the slave goes
active. This test runs right after the slave create, so on occasion
the backup still exists when the test runs, since the taskmanager
doesn't delete it until it also receives word that the instance is
up and running.
The test was modified to wait until the backup is gone.
The replication scenario test was also modified to include this
check at the end of its run.
Closes-Bug: #1518477
Change-Id: If815f496d6bf9111dd1f04bf02f61207a2317b2b
This patchset helps reducing the ignored pep8 errors.
Fixed some ignored hacking rules, as listed follows:
- E111 indentation is not a multiple of four
- E122 continuation line missing indentation or outdented
- E123 closing bracket does not match indentation of opening bracket's line
- E128 continuation line under-indented for visual indent
- E251 unexpected spaces around keyword / parameter equals
- E265 block comment should start with '# '
- E713 test for membership should be 'not in'
- H105 Don't use author tags
- H306 imports not in alphabetical order
Change-Id: Iadf2af4f6ec90420153ad63b5a41650392ef2cbd
Creating a replica did not check that the specified source was available.
It is necessary that the source's state is active and that it is not busy.
This is done by verifying the state and status of the master.
The new checks will throw a HTTP 422 UnprocessableEntity in cases when the
status is not ACTIVE or source is busy performing a task
Changes:
- adding validation step that checks if master exists and in proper state.
- added appropriate API and unit tests
Co-authored by: Denis Makogon <dmakogon@mirantis.com>
DocImpact
Change-Id: Ib4e37ff0036998bc53058e400054ed93fcc2e144
Closes-Bug: #1357704
The V2 implentation of replication, including:
- Ubuntu 14.04
- Mysql 5.6
- GTID Replication Strategy
- promote-to-replica-source
- eject-replica-source
- --replica_count option to create
- replica creation from incremental backups
By agreement with Slicknik (Trove PTL), the following
exclusions from the spec have been made:
- slave promoted to master by eject not replaced
- slave promoted by eject chosen by txn count
rather than most recent txn
Authored-By: Morgan Jones <morgan@parelastic.com>
Co-Authored-By: Peter Stachowski <peter@tesora.com>
Co-Authored-By: Doug Shelley <doug@parelastic.com>
Co-Authored-By: Duk Loi <duk@tesora.com>
Co-Authored-By: Petr Malik <pmalik@tesora.com>
Change-Id: I7f921b75e66081cac9ec5a60fb204d61162e9a12
Depends-On: I8eec708f41e791e3db04a2c7b7c12855118b64ac
Depends-On: I9075365a8fae754e29d27d6e371a1d8c8980e26b
Implements: blueprint replication-v2
The test_slave_user_removed int-test polls to check that the
slave user account is removed, but doesn't currently have a time
out set. This means that a failure in this test causes the entire
suite to spin, and ultimately time out. Fix this by adding a 3 min
timeout to this test.
Change-Id: I5f869c7d3cb0587409b5a12a89ed673e57552b82
Closes-bug: 1399583
Fixed the replication tests to re-authenticate the common test dbaas
client in order to ensure that we do not use a stale auth_token when
running the replication tests.
Change-Id: I37a2a4b7dca056e84b48c66cbe3b8c8fb6a2f1db
Closes-bug: 1394831
There is a time lag for the read_only system variable in the
detached replica to change from true to false, causing the test
to fail many times.Make the test_slave_is_not_read_only
poll unitl the value changes.
Change-Id: I6191cb7f85e18b30a16383675490a6186185ba5b
Closes-Bug: #1393914
Generates a unique user with a random password for each slave.
The replication user and password is passed to each slave during
the snapshot attach process. Replication user is deleted from
both the master and the slave during the detach process.
Co-Authored-By: Nikhil Manchanda <SlickNik@gmail.com>
Co-Authored-By: Denis Makogon <dmakogon@mirantis.com>
Change-Id: I9cb158a161714bfff90225227f5c652120393ba7
Closes-bug: 1357065
If the user attempts to delete an instance which has
replicas attached to it, forbid the delete.
Closes bug: #1362299
Change-Id: I644243aef74d9a34b7726139f9fa5ca8bdb1452c
During replication, backup of the master instance is
taken, and a slave is created using this backup.
This patch cleans up the backup which is created
during this process (irrespective of whether it was
successfully provisioned or not).
Closes-Bug: #1359354
Change-Id: Ic636ffeb0bbfb9e6cc02690efe812ffc11bda85c
When a slave is attached to a master site, this change will
mark the slave site as read-only to prevent the slave site
from being updated by users. Only users with root privileges
or slave priveleges will be able to update the database.
Change-Id: Idb6c54b85a23af9a468ff9d62b3110fa72ff7da0
Closes-bug: #1359392
Add a PATCH route to unset the slave_of property on an instance, i.e. to
detach a replica from its replication source.
Rename existing 'detach_replication_slave' functions to 'detach_replica'
to be consistent with the python-troveclient.
Add test case to tests/api/replication.py.
Partially Implements: blueprint replication-v1
Change-Id: I3596a3b76cc484b42db38f02e51c028d5ff2ed6c
The term 'slave' is very mysql specific. Deprecate the API terminology
that references 'slaves', and 'slave_of', and replace it with 'replicas',
and 'replica_of' instead which is more applicable across datastores of
different types.
Co-Authored-By: Greg Lucas <glucas@tesora.com>
Change-Id: Ief4bc83369fa3183a321d3e07b69b1801595ab15
Closes-bug: 1360310
Update the 'show' response for an instance:
- If the instance is a replication slave, include the slave_of id.
- If the instance is a replication master, include the list of slave
instance ids.
Update the 'list' response to include the slave_of id.
Add CheckInstance tests for slave/slave_of info.
(Unrelated: remove a #TODO comment that has already been addressed.)
Partially Implements: blueprint replication-v1
Closes-Bug: #1340359
Change-Id: If8a154083d0095606fb3ee115cc9b66ab788cbb4
Implements the snapshot capability for replication by
taking a backup of the master site, then using it
to populate the slave, then turning on replication.
Co-Authored-By: Greg Lucas <glucas@tesora.com>
Co-Authored-By: Nikhil Manchanda <SlickNik@gmail.com>
Partially implements: blueprint replication-v1
Change-Id: Ibd3214b2ffafb250f0cc794c6ee0ff6b0d2ed7da
Implement new strategy for replication
Implement replication strategy for mysql binlog replication.
Supporting methods in mysql service
Implement API methods in mysql manager
Define configuration settings for replication
Co-authored by: Nikhil Manchanda <SlickNik@gmail.com>
Co-authored by: Greg Lucas <glucas@tesora.com>
Partially implements: blueprint replication-v1
Change-Id: I70f0b5c37fe3c2d42426029bb627c141965eb524