4181 Commits

Author SHA1 Message Date
Lingxian Kong
0ef474a70c Support keypair in devstack
Since Trove already supports to specify a Nova keypair when creating
instance for management convenience, devstack needs to be changed to
create the management keypair and add to Trove config file.

One extra change in this patch is to use a single config file for Trove
API, task-manager and conductor.

Change-Id: I1e6c4f4305104815bdf89b31776a4955de61bc89
Story: 2005429
Task: 30463
2019-08-29 15:41:58 +12:00
Zuul
259e0f6f09 Merge "Support python3 in guest agent" 2019-08-28 01:54:40 +00:00
Lingxian Kong
7b9a752eb0 Support python3 in guest agent
Story: #2006455
Task: #36376
Change-Id: I62323ac1c1edfbf0378d0c89e156fdb3a879aa88
2019-08-27 15:03:45 +12:00
Lingxian Kong
2ee891ddfc Make volume type optional
Without this patch, creating db instance will fail if no volume type is
provided:

  Validation error: instance['volume']['type'] None is not of type 'string' (HTTP 400)

even if `cinder_volume_type` is configured in trove config file.

Change-Id: I3487e45840f72875ffd6cfb6ca75b4bbf60ab51e
2019-08-26 22:22:48 +12:00
Zuul
40821578f9 Merge "Release note for backup filtering" 2019-08-26 04:33:41 +00:00
Lingxian Kong
858be70657 Release note for backup filtering
Change-Id: Ie7a8b4ccc90dc83fa7ced1b3c6361b9ff81f8d83
Story: #2006433
Task: #36345
2019-08-26 15:52:31 +12:00
Lingxian Kong
f32c6f81ec Filtering description for backup API
Story: #2006433
Task: #36344
Change-Id: I044b804e2ebdc6ecf545cb802114c5b774bb0645
2019-08-26 15:45:30 +12:00
Zuul
77dab835e6 Merge "Improve devmode=flase when building the image" 2019-08-25 23:35:33 +00:00
Lingxian Kong
dfa5ce93d5 Improve devmode=flase when building the image
During debugging, the following changes are also included:

- Support to specify an image ID to run the integration test.
- Fix the reboot function bug.
- Remove the unsuccessful restart test.

How to run integration test with dev_mode=false:

    ADMIN_PASSWORD=password \
    SERVICE_PASSWORD=password \
    DEV_MODE=false \
    /opt/stack/trove/integration/scripts/trovestack gate-tests mysql mysql

Change-Id: I31d4ee579a554f4c98f9facb9fd4b7779665a3dd
2019-08-25 23:11:54 +12:00
Zuul
19f29e1539 Merge "Fix backup tests" 2019-08-25 10:46:52 +00:00
Zuul
75bc6b5a28 Merge "Fix all_projects filtering for backups" 2019-08-25 10:46:51 +00:00
Zuul
f21bb6c137 Merge "[train][goal] Run 'trove-tempest-ipv6-only' job" 2019-08-25 10:46:47 +00:00
Lingxian Kong
652180aa16 Fix all_projects filtering for backups
Change-Id: Ie0f7bb9fad73cb29084702d1044ae3ed7eb3b8ce
2019-08-25 12:17:25 +12:00
Zuul
32df11c867 Merge "Support new mysql8.0 utf8mb4 character and collation sets" 2019-08-25 00:00:00 +00:00
Kasper Hasior
9b215e6cd7 Fix backup tests
This patch add an additional possibility when checking instance status
after backup - backup may be done fast so we may get response 'ACTIVE'.

Change-Id: I93efba6aa11842ee2499550ab9293b65d75448e0
Story: #2005422
Task: #30444
Signed-off-by: Kasper Hasior <k.hasior@samsung.com>
2019-08-24 22:04:05 +00:00
Zuul
c247e4842e Merge "Support backup filtering" 2019-08-24 12:39:12 +00:00
Lingxian Kong
d43b4209e9 Support backup filtering
Support to filter backups by instance_id and all_projects(admin only by
default).

Story: #2006433
Task: #36343

Change-Id: Ia483bbafb8d106a9d46ab908cf5659f06fb3b7ed
2019-08-23 21:02:01 +12:00
Lingxian Kong
9cf00dfbdf Fix python3 failure inside guest when doing restore
When the guest agent is running in Python 3, when doing restore, an
exception is raised:
http://paste.openstack.org/show/762068/

Change-Id: I44830465a3e436aa790eb43f0cef0c3d92dbd974
2019-08-23 15:14:37 +12:00
Ghanshyam Mann
86299525fb [train][goal] Run 'trove-tempest-ipv6-only' job
As part of Train community goal 'Support IPv6-Only Deployments and Testing'[1],
Tempest has defined the base job 'devstack-tempest-ipv6' which will
deploy services on IPv6.

Depends on commit has added the new job 'trove-tempest-ipv6-only'
which is derived from 'devstack-tempest-ipv6'.

Verification structure will be:
- 'devstack-IPv6' deploy the service on IPv6
- 'devstack-tempest-ipv6' run will verify the IPv6-only setting and listen address
- 'trove-tempest-ipv6-only' will run the tests.

Run the ipv6 job on trove gate also.

Depends-On: https://review.opendev.org/#/c/677014/

Story: #2005477
Task: #35937

[1] https://governance.openstack.org/tc/goals/train/ipv6-support-and-testing.html

Change-Id: I2ecfcef4a03ccc574d4fd3b026183342cb1fa242
2019-08-16 18:39:53 +00:00
Zuul
214a6a0b1f Merge "Fix 31-fix-init-script for Postgresql" 2019-08-16 01:45:05 +00:00
Zuul
484d1b53b7 Merge "Update api-ref location" 2019-08-15 09:32:23 +00:00
Zuul
24206b794a Merge "Add a designate V2 API dns driver" 2019-08-15 06:19:42 +00:00
Zuul
b7a45f7291 Merge "Refactor variables in plugin.sh to simplify setting a datastore" 2019-08-15 06:13:25 +00:00
Zuul
bbad4bf383 Merge "Add Python 3 Train unit tests" 2019-08-15 06:13:20 +00:00
Sam Morrison
73fc73a346 Support new mysql8.0 utf8mb4 character and collation sets
https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html
https://dev.mysql.com/doc/refman/8.0/en/charset-collation-names.html

Change-Id: I5080de7b4b190053f1bcc1c4c815992c9a5889b7
2019-08-14 22:10:24 +00:00
Mark Kirkwood
7d2e986778 Fix 31-fix-init-script for Postgresql
Ironically the fix is never applied as the systemd file uses
/run not /var/run.

Change-Id: Ie6022a13c181f5c27e19b54bd49d9a77c90dc1ac
2019-08-14 22:09:56 +00:00
Mark Kirkwood
e85c843445 Refactor variables in plugin.sh to simplify setting a datastore
Remove several variables local to plugin.sh so it is possible to
set a non default datastore by changing only the 3 most obvious ones:

TROVE_DATASTORE_TYPE
TROVE_DATASTORE_VERSION
TROVE_DATASTORE_PACKAGE

Change-Id: I782757647985bdfb859043fe68e2b4cd27569ab3
2019-08-14 22:09:43 +00:00
Sam Morrison
62a2385790 Add a designate V2 API dns driver
Change-Id: Iafb36333a37146787c57eded139b4c2e071d69b0
2019-08-14 22:09:27 +00:00
zhufl
69e6652c92 Remove invalid assert state
This is to remove invalid assert state of self.assertTrue('cluster').

Change-Id: I84aa5a39c9a9d9c410cc780ddc162768d37cab32
2019-08-14 22:09:13 +00:00
Andreas Jaeger
5ca55e487a Update api-ref location
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.

Note that redirects will be set up as well but let's point now to the
new location.

For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html

Change-Id: I8adf15cf87ed517c8b71d86c23732b804f44aaff
2019-08-14 22:08:50 +00:00
Corey Bryant
cc16d3b3bc Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I1fe23c6115bd6b9aac0bf2bd4fec9c6eaee88c40
Story: #2005924
Task: #34254
2019-08-15 09:50:49 +12:00
Andreas Jaeger
7b3483723a Fix Trove CI jobs
Changes to get jobs working

1) After [1] devstack no longer changes the ownership of the whole
   /opt/stack tree to the stack user unconditionally. Switch to the
   stack user when running integration test.

2) Add bindep.txt file[2]. The default fallback file is not installed
   anymore and therefore a bindep.txt file is needed to add install
   additional packages.

3) Use trovestack script rather than devstack to build image so many
   global variables could be used for consistency. By default, devstack
   won't build image.

4) Remove the tools/test-setup.sh as it is not used any more.

5) Instance upgrade test keeps failing in CI for some reason, although
   it's always passed on my local environment. In order not to block
   other patches, skip the instance upgrade tests temporarily.

[1] https://review.opendev.org/203698
[2] http://lists.openstack.org/pipermail/openstack-discuss/2019-June/006888.html

Change-Id: I35e17afb9e827b1fead9d28dbf32f11ce4034a9b
2019-08-14 21:20:34 +12:00
Lingxian Kong
dae5bc1bc7 Re-define the 'nics' parameter for creating database
Change-Id: I7a522b1f6d421ecbed0cedcdb2edd1f90b9b672b
2019-07-29 15:21:52 +12:00
Zuul
f72015179e Merge "Update the outdated content" 2019-06-24 09:16:15 +00:00
Zuul
07c079e8cd Merge "Fix incorrect use of raise in template test" 2019-06-24 09:16:13 +00:00
Zuul
5cfa3a4b01 Merge "Ignore new 'sys' mysql database by default" 2019-06-24 09:16:12 +00:00
Zuul
6c1362dfe5 Merge "Use newer style mysql syntax for users/passwords" 2019-06-24 09:16:11 +00:00
Sam Morrison
0dba070df7 Support renamed postgresql log functions
In postgres 10 some xlog functions have been renamed [1]

[1] https://wiki.postgresql.org/wiki/New_in_postgres_10

Change-Id: I5b25678dbf495a5f876b7bbd6d7da368dbe5a29c
2019-06-21 15:08:52 +10:00
Sam Morrison
8c951069fa Use newer style mysql syntax for users/passwords
The sytax used for creating users and setting passwords
was deprecated in mysql 5.7 and is not valid in mysql 8.0. [1]

Change to use CREATE USER to create users as opposed
to creating users with GRANT syntax.

Setting passwords also does not use the PASSWORD keyword
anymore. [2]

[1] https://dev.mysql.com/doc/refman/5.7/en/grant.html
[2] https://dev.mysql.com/doc/refman/5.7/en/set-password.html

Change-Id: I0387238ec434073f95dd76f13f1f40c7cec8d1eb
2019-06-19 16:59:28 +10:00
Sam Morrison
aaff2b48bf Fix incorrect use of raise in template test
Change-Id: Ie397fd4f7b27a38910b329d70ada6d884118e13a
2019-06-18 18:45:04 +10:00
Sam Morrison
ca351598d4 Ignore new 'sys' mysql database by default
Mysql 8.0 has a new database 'sys' [1] that should be ignored by
trove by default.

[1] https://dev.mysql.com/doc/refman/8.0/en/sys-schema.html

Change-Id: Ie2b60e36bd9e20bb55b36d3c6b21e9ff1dc56fde
2019-06-18 18:29:12 +10:00
chenxing
4bcb8a026c Update the outdated content
Change-Id: I7743b848e69a81e4aefb2191779a4cd9d4c7b666
Closes-Bug: #1729211
2019-06-14 12:10:01 +00:00
Lingxian Kong
49a11dd9c7 trovestack guide
Also fixed the migration script issue after upgrading SQLAlchemy
version from 1.2.19 to 1.3.4

Change-Id: Ia0d954237dd3c9c2b2ebedf440fa3c656da30777
2019-06-11 00:09:42 +12:00
Zuul
4f4a87a771 Merge "Enable service tenant deployment model by default in DevStack" 2019-06-08 07:57:46 +00:00
Zuul
18469204a2 Merge "Remove the trove-tox-apiexamples CI job" 2019-06-07 23:25:05 +00:00
Lingxian Kong
2e052b0262 Enable service tenant deployment model by default in DevStack
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
2019-06-08 00:46:21 +12:00
Zuul
502b619c39 Merge "Remove flavor operations from API doc" 2019-06-06 04:46:00 +00:00
Lingxian Kong
f83899867e Remove flavor operations from API doc
Trove doesn't need to expose resources directly from Nova.

Change-Id: If705470330f51be9b78914ac2d456c62348c4329
2019-06-06 16:15:05 +12:00
Lingxian Kong
35301fa898 Fix the structure in releasenotes folder
Change-Id: I4a232fb3148faec690d1bc2096001c5eb6108954
2019-06-06 16:09:51 +12:00
Lingxian Kong
37e8dedac2 Remove the trove-tox-apiexamples CI job
- The job relies on python-troveclient, sometimes python-troveclient
  only changes the URL sending to Trove but neither request nor
  response.
- The job is hard to maintain, especially when there are changes
  relating the API. The recommended way is to manually update the API
  doc and add tests in trove-tox-fakemodetests job.
- Remove that trovestack subcommand as well.

Change-Id: I108203915ef79ef93bbfbb15acdb7480854878e0
2019-06-06 15:57:26 +12:00