Commit Graph

201 Commits

Author SHA1 Message Date
Sean Mooney 3367c25e77 stop using passlib
passlib is unmaintained and has not had a release since 2020
a recent bcrypt release just broke passlib
see https://github.com/pyca/bcrypt/issues/684

trove's use of passlib is pretty tirval so this change
just removes it as a depency and delegate the random password
generation in trove.common.utils to the generate_random_key
function in the trove.common.crypto_utils module

Change-Id: I6b6c64147c627025d5f89db6032d1c54445df94f
2024-03-26 14:46:55 +00:00
wuchunyang 2f755b64b3 Add network isolation for trove
this PR adds a network_isolation config option for trove,
with network_isolation enabled, trove guest agent will
plug the user-defined port to database container by
docker host_nic network driver which is implemented in this PR.

docker host_nic network driver is a simple driver to plug host
nic to a container. this driver supports ipv4,ipv6 and dual-stack.

for more details please see the story.

story: 2010733
task: 47957

Change-Id: I35d6f8b81a2c5e847cbed3f5bc6095dc1d387165
2023-08-03 11:35:04 +00:00
Tobias Urdin 4b9c3d3079 Use new get_rpc_client API from oslo.messaging
Use the new API that is consistent with
the existing API instead of instantiating the client
class directly.

This was introduced in release 14.1.0 here [1] and
added into oslo.messaging here [2]

[1] https://review.opendev.org/c/openstack/requirements/+/869340
[2] https://review.opendev.org/c/openstack/oslo.messaging/+/862419

Change-Id: Ia0178e905654aaf0d05c7396867332ea5a661760
2023-03-06 11:59:57 +00:00
Hirotaka Wakabayashi 559d6255e5 Removes the deprecated argument tenant from TroveContext
The tenant argument of RequestContext in oslo.context had been
deprecated long time ago and it was finally removed in
oslo.context-4.0.0. We should remove the tenant argument of
TroveContext that derives from RequestContext and we should also
update the requirements.txt in the master branch.

Task: 44723
Story: 2009906
Change-Id: I69c7098cc0d61fbbba1dbf2eca87df0dd6fd70ba
2022-03-17 09:04:45 +09:00
Lingxian Kong 5590ecdce0 Show user network ID for getting instance
Change-Id: Ia1e9112ae69e04f8c3e9e9d1b4a0189c743d7448
2021-08-02 14:25:54 +12:00
Ghanshyam Mann bcb8992f99 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: I790409da69df8479ad2fe152b15c32ba45067c23
2020-12-26 05:30:18 +00:00
Lingxian Kong d1af33f17b Support mysql 8.0
* MySQL 5.7 and MySQL 8.0 need different percona-xtrabackup package version.
  Added Percona XtraBackup 8 support for MySQL 8.x backup and restore.
* Construct different backup container image names for MySQL 5.7 and MySQL 8.0
  based on the default option value.
* Two docker images are uploaded for backup/restore:
  openstacktrove/db-backup-mysql5.7:1.0.0 and
  openstacktrove/db-backup-mysql8.0:1.0.0. Trove guest agent can automatically
  choose the approriate one based on the datastore version.
* Added option "secure-file-priv=NULL" in MySQL config template to fix
  https://github.com/docker-library/mysql/issues/541.
* Stop using IDENTIFIED BY in GRANT clause (also REVOKE). Starting with MySQL 8
  creating a user implicitly using the GRANT command is not supported.

Story: #2008275
Task: #41143

Change-Id: Ibdec63324b1b39ba9b8a38dbe529da17bbb06767
2020-10-23 23:50:39 +13:00
wangzihao e954184693 Remove six usage and basestring check
Remove basestring check.
Remove six Replace the following items with Python 3 style code.

- six.string_types
- six.int2byte
- six.indexbytes
- six.add_metaclass
- six.StringIO
- six.text_type
- six.integer_types
- six.binary_type
- six.BytesIO
- six.reraise

Change-Id: I4fb9033d152963c504ceb4d5c4d08f934ee4accb
2020-10-16 10:40:22 +08:00
Lingxian Kong d0cfb41b25 PostgreSQL support
Change-Id: I7c77b210f5a1438739daebffea104eda3bda1a45
2020-09-01 13:58:05 +12:00
melissaml 8cd3670bdd Remove translation sections from setup.cfg
These translation sections are not needed anymore, Babel can
generate translation files without them.

Change-Id: Ic81e52b5cf6c64d752358ab29a1f9a55bf25c88c
2020-05-27 08:31:09 +00:00
Zuul e77374b4f4 Merge "Cap jsonschema 3.2.0 as the minimal version" 2020-05-27 05:06:01 +00:00
Lingxian Kong aa1d4d2246 Datastore containerization
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
2020-05-27 10:31:50 +12:00
Hervé Beraud ed726fd2f7 Cap jsonschema 3.2.0 as the minimal version
Previous versions of jsonschema (<3.2.0) doesn't support python 3.8 [1].
Python 3.8 is part of the victoria supported runtimes [2] so we now force
to use jsonschema version 3.2.0 to avoid issues, remove ambiguity and ensure
that everything works with python 3 in general.

[1] https://github.com/Julian/jsonschema/pull/627
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: I511faa17b27eac827922957e4b36108da0dcd0c8
2020-05-26 22:14:31 +02:00
Lingxian Kong 7d78c74158 Add python-troveclient in requirements.txt
Change-Id: I2bd0d81171df85c05423e19ab2e4afa82fcf880e
2020-03-15 20:57:39 +13:00
Ghanshyam Mann e6f55c57d5 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Trove is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I6b448747c873bfc9c0138c0f7e3ca67ddce02dee
2019-12-05 22:38:19 +13:00
Minmin Ren 85d2b17c49 Fix tox debug mode
- add oslotest in test-requirement.txt for
fixing tox debug mode failed.
- Update jsonschema/sphinx following the global-requirments.txt
to pass zuul requirements-check job.
(See: https://review.openstack.org/649789
https://review.opendev.org/#/c/657890/)

Change-Id: I5f2cabc35415cac3c4e81afa9084cbd8677ccd22
Story: #2005615
Task: #30862
2019-05-13 10:27:00 +00:00
whoami-rajat ace53c47fa Add trove-status upgrade check command framework
This adds basic framework for trove-status upgrade
check commands. For now it has only "check_placeholder"
check implemented.
Real checks can be added to this tool in the future.

Change-Id: Idfeab4c06cba6f841c17ab6e255a29e8707bfa55
Story: 2003657
Task: 26162
2018-10-22 12:56:28 +05:30
Fan Zhang 4279fd253b Remove pycrypto from requirements
Remove pycrypto completely from requirements and fix the
related tests.

Closes-Bug: #1749574
Depends-On: I5c0c1a238023c116af5a84d899e629f1c7c3513f
Change-Id: Ibfedd9e2ab0a5e78959108112f57103a089f02d1
Signed-off-by: Fan Zhang <zh.f@outlook.com>
2018-06-14 12:56:05 +08:00
Zuul 9cdb08cb7b Merge "Switch to cryptography from pycrypto" 2018-06-13 06:05:19 +00:00
Zhao Chao 46a031e765 Switch to cryptography from pycrypto
PyCrypto isn't active developed for quite a while, cryptography is
recommended instead. This patch does this migration, but still keeps
pycrytpo as a fallback solution.

Random generation is also migrated to os.urandom as the cryptography
document suggests:
https://cryptography.io/en/latest/random-numbers/

Closes-Bug: #1749574

Change-Id: I5c0c1a238023c116af5a84d899e629f1c7c3513f
Co-Authored-By: Fan Zhang <zh.f@outlook.com>
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
2018-06-08 10:55:44 +08:00
Zhao Chao 48ac45dae1 Fix lower-constraints and uncap eventlet
The 'requirements-check' gate job will validate requirements.txt and
test-requirements.txt against lower-constraints.txt, i.e. the minimum
version should match between lower-constraints and requirements. The
change in lower-constraints.txt is produced by fix-lower-constraints.py
script from the requirements repo, and 'enum34' is added mannually.

This patch also include the commit about 'uncap eventlet' to make the
'requirements-check' actually working, because the change has been
already merged in the requirements repo. The original commit message by
Doug Hellmann is kept as below for futher referrence:

We will manage the eventlet version using constraints now. See the
thread starting at
http://lists.openstack.org/pipermail/openstack-dev/2018-April/129096.html
for more details.

Co-Authored-By: Doug Hellmann <doug@doughellmann.com>

Change-Id: I61a6904ea433e570420ccd46281162ff174a5737
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
2018-04-12 19:20:02 +08:00
OpenStack Proposal Bot 990d24efa1 Updated from global requirements
Change-Id: I9cae682c6b028752340dd0efb18a8980d12ec0b8
2018-03-26 08:30:13 +00:00
OpenStack Proposal Bot 856824c510 Updated from global requirements
Change-Id: Ie5b55091c64b7672267cfb052bb3fe2243b95fba
2018-03-15 09:38:39 +00:00
OpenStack Proposal Bot 792929d2bc Updated from global requirements
Change-Id: I78782d3acb01c83b402a667905bfe7fbcbd10f4d
2018-03-10 13:59:01 +00:00
OpenStack Proposal Bot 4ec51d72cd Updated from global requirements
Change-Id: Ifbd10f0c2453f3de97240770cb141eda5d9397e3
2018-01-16 12:56:32 +00:00
OpenStack Proposal Bot f1bd1d1426 Updated from global requirements
Change-Id: I16e9d66f27bb0fb192804668dd33597b7167844f
2017-12-23 10:18:00 +00:00
OpenStack Proposal Bot bf9b2b85e4 Updated from global requirements
Change-Id: I52601c01c210a2117e51e8e6f7b54416b493bef1
2017-11-29 09:25:31 +00:00
OpenStack Proposal Bot 703f77681a Updated from global requirements
Change-Id: I8c7e2ae3d7e7d1e268f0dac430cd6ad51f66430a
2017-11-16 11:30:47 +00:00
OpenStack Proposal Bot f725511314 Updated from global requirements
Change-Id: I28fe5569a671fb65fcedb9821d13b171edf96b53
2017-11-13 21:58:53 +00:00
OpenStack Proposal Bot 6fbef1cc71 Updated from global requirements
Change-Id: If697cc5a442bcd2c3720be28024642a97b773bea
2017-10-23 11:23:29 +00:00
OpenStack Proposal Bot 92e2029310 Updated from global requirements
Change-Id: I39a3891e016f4d8c1ee955c9670b3b11bead8988
2017-07-14 13:09:41 +00:00
OpenStack Proposal Bot 6ff164b48e Updated from global requirements
Change-Id: Ib2f8f902b3b2be921510bd95c92fc0e997e1141f
2017-06-09 20:50:28 +00:00
OpenStack Proposal Bot 4a82920da3 Updated from global requirements
Change-Id: I18fb55e558d11beb135d049ed8fb941f4cdca8fd
2017-06-08 16:30:27 +00:00
OpenStack Proposal Bot fb870b306e Updated from global requirements
Change-Id: I6f1d1e967b7cb6993294f984c995051351a7fadd
2017-06-08 06:12:38 +00:00
OpenStack Proposal Bot 321b38219c Updated from global requirements
Change-Id: Id6c203a23f3992a978730146e4ab4d28e43c3452
2017-05-31 16:47:47 +00:00
OpenStack Proposal Bot c0bdc90981 Updated from global requirements
Change-Id: I80932d354d61591a8fc1be0a94ad4df1fa3e37a1
2017-04-24 17:03:48 +00:00
OpenStack Proposal Bot ea0f67041e Updated from global requirements
Change-Id: Ib95e50140f81e6630f45e98b62e9ac4fd87bd524
2017-04-07 06:18:39 +00:00
Amrith Kumar 107bc5e4b4 we now need to have dib installed explicitly
dib is now going to have to be installed explicitly for us to actually
run the gate. the old method of just cloning the repo won't work with
dib v2.

There are other ways to accomplish this but I'm choosing this approach
knowing that it isn't ideal. First, what's the downside? This means
that dib gets installed wherever trove control plane is installed. Is
that necessary, NO. Is it the end of the world, NO.

What are the options?

- do what Octavia did and have a second requirements.txt in a folder
  called diskimage-create. Would this work, yes but we don't have such
  a mechanism right now and nothing would keep this requirements.txt
  file in sync with g-r that I know of.

- hardcode the pip install command somewhere in the devstack
  plugin. yes, this would work but this would also have no ability to
  sync with g-r.

So, while the solution proposed here isn't ideal, it strikes me as not
bad, and much less risk than the other two options.

We also need to figure out where the elements are and fix the path for
disk-image-create.

Some pep8 failures appears to have crept in as well, those are
addressed.

Change-Id: Ic64d91e082102057417995a0f6851d03b9e0ca74
2017-03-10 08:14:20 -05:00
OpenStack Proposal Bot 4a4ff5b544 Updated from global requirements
Change-Id: I6d5572bb49cd5f245af59f87ce40f8f9a858e85d
2017-03-02 11:57:16 +00:00
OpenStack Proposal Bot cdb22e1191 Updated from global requirements
Change-Id: I705dd4d0774dd373da725b7451de521a35a574f6
2017-01-24 20:02:33 +00:00
Jenkins 9b707297f2 Merge "Remove netifaces useless requirement" 2017-01-06 23:53:36 +00:00
OpenStack Proposal Bot f108c4ad37 Updated from global requirements
Change-Id: I6ab1bd4a064bf6a7cdc9a691fe3683ff7e51e3bb
2017-01-05 09:52:38 +00:00
Bertrand Lallau 8cc08c7614 Remove netifaces useless requirement
This patch cleans up the requirements.txt list to remove
netifaces module actually replaced by oslo_utils.

Change-Id: I556ff34c7740352a5da25d5e6b6556741b0ecd1f
2017-01-04 22:31:22 +01:00
OpenStack Proposal Bot 97266f9a66 Updated from global requirements
Change-Id: Iac67b16cee3dbaa8f9f35a7c26eddc4eba14e562
2016-12-23 22:19:45 +00:00
OpenStack Proposal Bot fb237d15b7 Updated from global requirements
Change-Id: Ife09e2bd4d02c115e6bed4da065a687218c44da6
2016-12-22 00:06:20 +00:00
Petr Malik 21250cf20c Add support for Oslo Policies to Trove
The Oslo Policy library provides support for RBAC policy
enforcement across all OpenStack services.

Update the devstack plugin to copy the default policy file
over to /etc/trove in the gate environments.

Note: Not adding a rule for 'reset-password' instance
action as that API was discontinued years ago
and is now just waiting for removal (Bug: 1645866).

DocImpact
Co-Authored-By: Ali Adil <aadil@tesora.com>

Change-Id: Ic443a4c663301840406cad537159eab7b0b5ed1c
Implements: blueprint trove-policy
2016-12-06 21:51:21 +00:00
OpenStack Proposal Bot d0adcc8951 Updated from global requirements
Change-Id: Ifbc96b3c70eccb840a21305872e16796b2fad794
2016-11-30 23:16:38 +00:00
OpenStack Proposal Bot 34c9447590 Updated from global requirements
Change-Id: Ia76fbc6a497156f031aee412407c6d3e1c85d6b0
2016-11-24 21:35:35 +00:00
OpenStack Proposal Bot 873642eb2e Updated from global requirements
Change-Id: Ib18d150231c79ee179f2efd86a762751ef0f32f6
2016-11-18 21:34:52 +00:00
Jenkins 48dcbb6dcd Merge "Multi-Region Support" 2016-11-18 15:50:39 +00:00