summaryrefslogtreecommitdiff
path: root/trove/common
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix inspect.getargspec() deprecation warning"Zuul2023-04-181-1/+1
|\
| * Fix inspect.getargspec() deprecation warninglikui2023-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() [1] https://docs.python.org/3/library/inspect.html#inspect.getargspec Story: 2010694 Task: 47804 Change-Id: Ica14e66d2130dbc5949a6567673e68e8bb450061
* | container_registry_password should be secretTakashi Kajinami2023-02-201-1/+2
| | | | | | | | | | | | | | | | | | | | The [guest_agent] container_registry_password option takes a credential to access a container registry, thus its value should be hidden from debug logs. Story: 2010594 Task: 47456 Change-Id: I8f595fff616606a96e70d1712a3a2e65c85b3476
* | Fix the missing log request-idHa Minh Cong2022-11-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This PS ensure oslo Context.update_store method is called, to ensure that thread-local context object is updated before Trove service render log Story: 2010451 Task: 46951 Change-Id: I5258853aed33cbcd26a5b6d68a5e5a4b9aa1fd48 Signed-off-by: Ha Minh Cong <conghm1@viettel.com.vn>
* | Fix deprecation warningsTakashi Natsume2022-10-153-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following deprecation warnings. * DeprecationWarning: Using the 'user' argument is deprecated in version '2.18' and will be removed in version '3.0', please use the 'user_id' argument instead * DeprecationWarning: Property 'user' has moved to 'user_id' in version '2.6' and will be removed in version '3.0' Change-Id: I18802ae1e2318eae3c62a26459178b259c728ac4 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* | Fix illegal shell characters18.0.0.0rc118.0.0wu.chunyang2022-09-142-0/+15
| | | | | | | | | | | | | | | | | | | | This change checks if the user input is legal. if illegal, we raise an InvalidValue excepiton. Story: 2010004 Task: 45128 Change-Id: Ib81646b8f8a01fcbc31d033ec205491b76a7b755
* | Fix the missing of guest-agent.conf in guest vmwu.chunyang2022-08-161-2/+2
| | | | | | | | | | | | | | | | This PS sets the injected_config_owner to ubuntu and the injected_config_group to root. Story: 2010231 Task: 46023 Change-Id: I77f9d0332a123594eae434c6e1cc795242e4022d
* | Fix docker start failed in guest-agentwuchunyang2022-08-091-2/+2
| | | | | | | | | | | | | | docker_insecure_registries is a StrOpt, but the default value is '[]' which is true for a string. Change-Id: I4b8841cc77324f274bc8210d328bc42ddef5d056
* | Adds a configuration to use a local docker registryHirotaka Wakabayashi2022-07-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds an configuration to use a local docker registry for development and test purpose. Using this option in development, * Developers can test images in local docker registry * Developers don't mind DockerHub's pull ratelimit * Developers can save bandwidth * Developers can test database quickly Story: 2010125 Task: 44793 Change-Id: I762702654bc4430b8432dd96bf869408b2947ff8
* | Merge "Adds new configurations for injected file owner"Zuul2022-05-111-0/+6
|\ \
| * | Adds new configurations for injected file ownerHirotaka Wakabayashi2022-05-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds configuration options for file owner information of injected files in GuestVM to trove.conf. File owner information should not be hardcoded as "trove" because it depends on user environments. Original problem is guest instance creation failure due to the lack of guestagent configuration files because of the recent code chage[1]. That patch was introduced since Yoga. [1]:https://review.opendev.org/c/openstack/trove/+/823632 Task: 45239 Story: 2010021 Change-Id: Iaccfe84c912025ec6d96e66ffa6ad7a4b9537b6e
* | | Uses glance to get image_id when creating a clusterHirotaka Wakabayashi2022-04-225-10/+16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR uses glance to get a valid image_id when creating a cluster. Clusters API currently checks the "image_id" column in "datastore_versions" table, which has no valid image_id(NULL) since Victoria due to the following code and docs change[1]. The original problem of this patch is that nova api throws BadRequest exception with "Block Device Mapping is Invalid" message when creating a cluster. [1]: https://opendev.org/openstack/trove/commit/1d24b65052bbfb8f7dff5744c7bb44a58a2336c6 Task: 45004 Story: 2009982 Change-Id: I2a2932e261f47d9c8ec275bf9bd41b26983230c7
* | Adds docker daemon config to injected filesHirotaka Wakabayashi2022-03-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds docker daemon config to injected files when docker_bridge_network_ip option is defined in trove.conf. Original problem is that Trove developers unable to transfer files between GuestVMs and Controller host when controller host address range is same with docker bridge network one. Task: 44805 Story: 2009928 Change-Id: I6ad7eb7b2a7fb0686604b69d0175ec0d06f60384
* | Stop using deprecated functions in std Python libHirotaka Wakabayashi2022-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR stops using the following deprecated functions in std Python lib. * parser.readfp We should use parser.read_file(readline_generator(fp))[1]. * importing modules from collections directly. We should use collections.abc instead of using collections directly.[2] -- [1]: https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.readfp [2]: https://github.com/python/cpython/pull/5460 Task: 44767 Story: 2009917 Change-Id: I61bf4299ad2acd8ee26b4aab66875b10287020e1
* | Removes the deprecated argument tenant from TroveContextHirotaka Wakabayashi2022-03-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Adapt to file injection deprecation in novaBo Tran2022-01-241-2/+2
| | | | | | | | | | | | Story: #2009770 Task: #44247 Change-Id: I34d47e709a9a7478cb6a85d6e6e37da3f92e40b0
* | Allow regular user to get quotas16.0.0.0rc116.0.0Lingxian Kong2021-08-251-0/+1
| | | | | | | | | | | | | | | | | | The project user can query the project's own resource quota. Story: 2009140 Task: 43082 Change-Id: Iebac740e982a89fcf882a2cfc3e447ac53ee6656
* | Merge "Replace deprecated import of ABCs from collections"Zuul2021-08-021-2/+2
|\ \
| * | Replace deprecated import of ABCs from collectionsTakashi Kajinami2021-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | ABCs in collections should be imported from collections.abc and direct import from collections is deprecated since Python 3.3. Change-Id: Ic4c1cb4d9ce7595d1e684c26229a5148b5f4befa
* | | Show user network ID for getting instanceLingxian Kong2021-08-022-0/+78
|/ / | | | | | | Change-Id: Ia1e9112ae69e04f8c3e9e9d1b4a0189c743d7448
* | Use Block Storage API v3 instead of API v2Lingxian Kong2021-08-021-1/+1
| | | | | | | | | | | | | | | | Block Storage API v2 was deprecated during Pike cycle and is being removed during Xena cycle, and current v3 API should be used instead. Change-Id: Iac35c8a580b0e15c397cb5e78bb228fea9730f06 Ref: https://review.opendev.org/c/openstack/requirements/+/801759
* | Add periodic task to remove postgres archived wal filesLingxian Kong2021-07-231-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | * Added a periodic task for postgresql datastore to clean up the archived WAL files. * Added a check when creating incremental backups for postgresql. * A new container image ``openstacktrove/db-backup-postgresql:1.1.2`` is uploaded to docker hub. Story: 2009066 Task: 42871 Change-Id: I235e2abf8c0405e143ded6fb48017d596b8b41a1
* | Use bridge network for db containerLingxian Kong2021-06-221-1/+1
|/ | | | | | | | | - Changed the network mode of database container to "bridge" and exposed the service ports. - Use socket file to connect with the database. - Upgrade the backup container image for postgressql. Change-Id: Id5b119f8a474befc3a2cd6e061bbffc4ae5f7bb6
* Fix check_subnet_router filtersDmitriy Rabotyagov2021-04-131-0/+6
| | | | | | | | | | | | Device owner of router ports is not limited to network:router_interface and can also be network:router_interface_distributed or network:ha_router_replicated_interface depending on the router to which port is attached. Currently, when HA router is used, trove fails with: `Subnet is not associated with router` since port does not pass filter Change-Id: Ie8b3884dd13147f29d5632275fa5c75e801e04c8
* Add taskmanager_manager option to commonDmitriy Rabotyagov2021-04-071-0/+3
| | | | | | | | | | | | Option `taskmanager_manager` does not have defaults and thus is required to be set, otherwise trove-taskmanager will fail to start with AttributeError. In the meanwhile this is not clear what value is expected as option is not described anywhere. This change moves option to the general list, which will make it documented along with setting reasonable default. Change-Id: I546ffe88b6e135c3f4c6f71b5aef03b92011bed8
* [doc] Add configuration referenceDmitriy Rabotyagov2021-04-061-0/+1
| | | | | | | Config reference has been dropped for some reason several releases before. We return configuration reference along with policy to the docs. Change-Id: I0927466d18eca5572932fcf9e2ca6349b11ca847
* Merge "Support to restore backup from remote location"Zuul2021-02-183-2/+73
|\
| * Support to restore backup from remote locationLingxian Kong2021-02-183-2/+73
| | | | | | | | | | | | | | | | In multi-region deployment with geo-replicated Swift, the user can restore a backup in one region by manually specifying the original backup data location created in another region. Change-Id: Iefef3bf969163af707935445bc23299400dc88c3
* | Change the default agent_heartbeat_expiry to 90sLingxian Kong2021-02-181-1/+1
|/ | | | | | | By default, trove guest agent is sending health heartbeat msg for every 60s, so agent_heartbeat_expiry should be bigger than that. Change-Id: I348a82aa948079b7bba5c172b8d57d5f5dee28a0
* Support custom container registry for database imagesLingxian Kong2021-02-031-0/+21
| | | | | | | | Currently, trove guest agent is pulling container images from docker hub, it's impossible to use private container registry, this patch is adding that support. Change-Id: I3d14810b43acbf5d2fe6afcc138d476e366042f4
* remove unicode from codelikui2021-01-031-2/+2
| | | | | Implements: blueprint remove-unicode Change-Id: Ib7eb517f404fe87b880f7091366721d2cfc5cdf8
* [goal] Deprecate the JSON formatted policy fileGhanshyam Mann2020-12-261-0/+7
| | | | | | | | | | | | | | | | | | 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
* Add Neutron extension check before calling some APIsLingxian Kong2020-12-041-1/+28
| | | | | | | Story: 2008415 Task: 41356 Change-Id: I5c1717892a167d119e596a11ae8d41e4edc1d27c
* Support datastore version number for creating configurationLingxian Kong2020-11-191-1/+2
| | | | | | | | | | | | * Support "version_number" for creating configuration. * Fixed a bug for deleting datastore version, the config parameters should be deleted first. * Support "--version" for trove-manage datastore_config_parameters sub-commands. Change-Id: Ieb0def81f2347c06a05eb354ad36b4fa807f7621 Story: 2008358 Task: 41264
* Support datastore version number for creating instanceLingxian Kong2020-11-182-13/+15
| | | | | | | | | | | * Support version number for datastore version flavor and volume type association commands. * Support 'version_number' parameter for creating instance. Story: 2008358 Task: 41264 Change-Id: I0e30194d65dcaa595b8927e2b9d5f8ec8c4300de
* Update datastore version nameLingxian Kong2020-11-181-0/+1
| | | | | | | Story: 2008358 Task: 41264 Change-Id: I5b0bb30c1cf7274bf8cff14b377dea5508e3974d
* Add 'version' to datastore versionLingxian Kong2020-11-172-2/+4
| | | | | | | | | | | | | This patch is part of story 2008358 implementation. 1. DB schema change 2. trove-manage datastore_version_update subcommand change 3. API change for creating and listing datastore version. Story: 2008358 Task: 41264 Change-Id: I8069e6f4b972497f2b8be540ea35047d5fb2f9a5
* Support ram quotaSam Morrison2020-11-111-0/+3
| | | | | | | | | | | Set default to -1 so this is backwards compatible. Existing installations will need to manully backfill quote usage for this to work as expected. Story: 2008293 Task: 41172 Change-Id: I455477a2e7a00f0d132971a2a684352967ac19b9
* Pass availability zone through to volume creation.Sam Morrison2020-11-091-1/+5
| | | | | | | | | | | New config option `enable_volume_az` (defaults to false) ensures that the instance and volume will be created in the same availability zone. Story: 2008313 Task: 41208 Change-Id: I62ea46991c7398fba4e5027d5170038624d5aec9
* Revert "Remove flavor API"Sam Morrison2020-11-051-0/+13
| | | | | | | | | Story: 2008309 Task: 41201 This reverts commit 910519127d8fb9880863eb219df68a574d00df6a. Change-Id: I77b72a965153e9583d93dee1f3a77d01a57e4ca2
* Fix restore encrypted backupLingxian Kong2020-10-291-10/+34
| | | | | | | | | | | For the backups created prior to Victoria which may be encrypted, the restore function in Victoria or later release should correctly decrypt the backup data. Backup encryption from Victoria is disabled. Bump the backup docker image tag to 1.1.0. Change-Id: I7abf5563b22ab1914fa355c089a3793da07f2215
* Support mysql 8.0Lingxian Kong2020-10-231-1/+3
| | | | | | | | | | | | | | | | | | | | * 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
* Remove six usage and basestring checkwangzihao2020-10-168-28/+15
| | | | | | | | | | | | | | | | | | 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
* Create floating IP in the user's projectLingxian Kong2020-10-121-7/+16
| | | | | | | | | | From the perspective of the public cloud, the floating IP should be created in the user's own project. Story: #2008246 Task: #41093 Change-Id: Ic358a2844c1b1f94a1b77ee67102b1c9c236a365
* Remove six.moveswangzihao2020-10-092-2/+2
| | | | | | | | | | Remove six.moves Replace the following items with Python 3 style code. - six.moves.urllib - six.moves.http_client - six.moves.configparser - six.moves.cStringIO Change-Id: I004b6b9a81079c67451395bfe31ec75d58802c16
* Support database version image tags for creating instanceLingxian Kong2020-10-091-0/+2
| | | | Change-Id: If6ffacb5bab1aa5ffc51dd5678bd110c0beeb51d
* Image tags support in datastore versionLingxian Kong2020-10-093-3/+60
| | | | Change-Id: I0e51d08515c121e3a7b0e82b6e4c4161bb4fbc4a
* Merge "Remove six.moves.urllib"Zuul2020-09-252-2/+2
|\
| * Remove six.moves.urlliblikui2020-09-252-2/+2
| | | | | | | | | | | | Replace the six.moves.urllib with Python 3 style code Change-Id: Ieb4d0359442cdb1dab17ffa2de74b834199ec74c
* | [Postgresql] Create replicaLingxian Kong2020-09-111-8/+14
| | | | | | | | Change-Id: Ia00032074dc44a6fbfc1e2d5ab16d1734a1a732c