Commit Graph

99 Commits

Author SHA1 Message Date
Rodolfo Alonso Hernandez 8830fed191 Open the 2024.2 (Dalmatian) DB branch
According to the TC resolution [1] and the release identification
document [2], the release number will be used as primary identifier in
the development cycle. Release name will be used in marketing.

[1]https://governance.openstack.org/tc/resolutions/20220524-release-identification-process.html
[2]https://governance.openstack.org/tc/reference/release-naming.html

Change-Id: I6fc7a154fa77a8792f93eb40c9b4497c0e67ae2f
2024-03-20 10:00:19 +00:00
Rodolfo Alonso Hernandez 7e0ba8bcda Open the 2024.1 (Caracal) DB branch
According to the TC resolution [1] and the release identification
document [2], the release number will be used as primary identifier in
the development cycle. Release name will be used in marketing.

[1]https://governance.openstack.org/tc/resolutions/20220524-release-identification-process.html
[2]https://governance.openstack.org/tc/reference/release-naming.html

Change-Id: I1ffd5878489176f33146688de03367101ede2305
2023-09-09 22:13:40 +00:00
Rodolfo Alonso Hernandez 97aa84b69a Open the 2023.2 (Bobcat) DB branch
According to the TC resolution [1] and the release identification
document [2], the release number will be used as primary identifier in
the development cycle. Release name will be used in marketing.

[1]https://governance.openstack.org/tc/resolutions/20220524-release-identification-process.html
[2]https://governance.openstack.org/tc/reference/release-naming.html

Change-Id: I0890b344096d8f8350fedd9c123e27844b671882
2023-03-21 10:14:04 +01:00
Rodolfo Alonso Hernandez 39b65575cd Change the release tag to use the release identification
According to the TC resolution [1] and the release identification
document [2], the release number will be used as primary identifier in
the development cycle. Release name will be used in marketing.

[1]https://governance.openstack.org/tc/resolutions/20220524-release-identification-process.html
[2]https://governance.openstack.org/tc/reference/release-naming.html

Change-Id: Ia3da9bf6d6113edacb0e21de9a51bd60d5e2465b
2023-03-02 00:41:19 +01:00
Rodolfo Alonso Hernandez 1fe4edab80 Open Antelope DB branch
Change-Id: I45da9a285536ddb04d6cb1def2e5fbcb866b4baf
2022-09-23 01:20:41 +02:00
Jakub Libosvar 4d3a274765 Don't register config options on imports
Importing some modules lead to registering config options that may
collide with config options from a project that calls the import. This
patch wraps the side effect that registers config options into a
function that needs to be called in case the caller wants to register
the options.

This solution is also not perfect as it guards the common options to be
registered only once even if the function is called multiple times. This
is to solve problems in unittests, ideally we should always call the
function just once even in our testing suites.

Resolves-Bug: #1968606
Change-Id: Ic1532eb8de887ff1b1085206df11f53e22f7f524
Signed-off-by: Jakub Libosvar <libosvar@redhat.com>
2022-04-13 05:49:15 +00:00
Rodolfo Alonso Hernandez 5a60701f1f Open Zed DB branch
Change-Id: I03a2b5ee881864226bbe5ef78e38707213cbbbfe
2022-03-05 19:27:21 +00:00
Rodolfo Alonso Hernandez 3d7929591c Open Yoga DB branch
Change-Id: If0fa70e8ebab3c704c2350e28953ebfcc3a79fa9
2021-09-20 15:08:07 +00:00
Rodolfo Alonso Hernandez ca8f1a20c5 Open Xena DB branch
Change-Id: I13ba740d245a46c41a969ff198e08ddff896eb1a
2021-03-29 15:28:51 +00:00
Rodolfo Alonso Hernandez 618e8588b3 Open Wallaby DB branch
Change-Id: I50cb2424b55a53f675cb3fa128cbe36b9adbba6d
2020-10-04 14:54:07 +00:00
Slawek Kaplonski 30747a5aac Revert "Squash alchemy Liberty branch"
This reverts commit f0be5f1a83.

We broke with this reverted patch db migration for stadium
projects like neutron-vpnaas, networking-bgpvpn,
networking-bagpipe and all others which have neutron
related db migration scripts from Liberty and older releases.

Change-Id: Ib77cdf6f7cb2e975581aeb2106690d35e798dc7c
2020-09-04 07:40:44 +00:00
Rodolfo Alonso Hernandez f0be5f1a83 Squash alchemy Liberty branch
This patch squashes the DB alchemy migration from Liberty
branch. The contract and expand migration steps are added
to the initial operation files. The unneeded tables or
parameters are not created.

Now the starting migration milestone is Mitaka.

Change-Id: Ia5bd25411149d1c475c142a60814c6daa8566cae
2020-07-21 17:44:30 +00:00
Brian Haley 4f10c3bd3f Remove usage of six.text_type and six.string_type
With python 3.x, six.text_type and six.string_type
are just str.

Also removed a six.integer_type since it was the only
one left in a file.

Another step in removing all of six usage from neutron.

Change-Id: I5208dc41bff1983ecd323286f427296b722da62a
2020-05-22 14:02:55 -04:00
Rodolfo Alonso Hernandez 518b623d7e Open Victoria DB branch
Change-Id: I27d7f393d7ef9383ed3cb0e4338cbb6d767721d9
2020-05-05 07:08:59 +00:00
zhanghao2 da93f09676 Open Ussuri DB branch
Change-Id: I345b960e97b1a95a361375cc9d5c3fc2e4836806
2019-08-15 16:30:52 -04:00
Adit Sarfaty fd388c0d40 Open Train DB branch
Change-Id: Ib1c429fa31a4c77d9810f6b1f8ffa8d6d3cd822e
2019-04-07 08:33:35 +03:00
Brian Haley eaf990b2bc Fix pep8 E128 warnings in non-test code
Reduces E128 warnings by ~260 to just ~900,
no way we're getting rid of all of them at once (or ever).
Files under neutron/tests still have a ton of E128 warnings.

Change-Id: I9137150ccf129bf443e33428267cd4bc9c323b54
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
2019-03-12 21:22:33 +00:00
Slawek Kaplonski 760eedf7f7 Use oslo_log instead of alembic.util in functional tests
Instead of using alembic.utils logging functions which
prints output to stdout, lets use in functional tests
oslo_log logger to log all such commands.

This is needed to limit amount of output on stdout during
functional tests running on python3.5.

It was previously switched to use oslo_log in this migration
scripts always by [1] but because of issue in OSA we had to
revert this patch in [2].
So now let's try to change it only in functional tests.

[1] https://review.openstack.org/#/c/625555/
[2] https://review.openstack.org/#/c/626565/

Change-Id: I88fde6d107a1f1b5c48c5c89cd2e1c07fd12c755
2018-12-21 23:03:24 +01:00
Jesse Pretorius (odyssey4me) 30ba87e5e0 Revert "Log alembic migration script's output with oslo_log"
This reverts commit dffcf4b54a.

Prior to this patch, output to stdout would look as follows:

INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
  Need to apply migrations from neutron contract branch. This will require all Neutron server instances to be shutdown before
  proceeding with the upgrade.

However, with this patch, now only the following shows up:

INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.

The message to notify the deployer to run migrations does not appear to be
present in any log files either.

The message and return code are used by deployment projects to determine
whether migrations must be run, for example:

e34b27e5ae/tasks/neutron_db_setup.yml (L59-L69)

Change-Id: I9c9959d4e8407cdc5f7a24a76a222b2bdfc87d4b
2018-12-20 12:45:49 +00:00
Slawek Kaplonski dffcf4b54a Log alembic migration script's output with oslo_log
Instead of using alembic.utils messages function which
prints output to stdout, lets use oslo_log logger to log
all such commands.
For logging error message alembic.utils module is still used
as those messages are quite important and should be displayed
to user in case of error.

This is needed to limit amount of output on stdout during
functional tests running on python3.5.

Change-Id: I20327bd1d5f784e021e9e1f1cbba1ef654271bfb
2018-12-18 11:45:13 +01:00
Brian Haley 2b57f08576 Fix flake8 H404 errors
Fix H404 error and start enforcing it.

Trivialfix

Change-Id: Iaa6fb4f1f07dee32a944259ab65204360d9db7ea
2018-10-05 21:48:41 +00:00
Kobi Samoray 215498373e Open Stein DB branch
Change-Id: I2219547ad933142d392e64dbce94aba3109892a7
2018-08-08 11:51:45 +03:00
Brian Haley 7cfdf4aa81 Fix all pep8 E129 errors
Fixed all pep8 E129 errors and changed tox.ini to no longer
ignore them.

Change-Id: I0b06d99ce1d473b79a4cfdd173baa4f02e653847
2018-05-03 13:44:04 +09:00
Brian Haley c3b83a9ca6 Fix all pep8 E265 errors
Fixed all pep8 E265 errors and changed tox.ini to no longer
ignore them.  Also removed an N536 comment missed from a
previous change.

Change-Id: Ie6db8406c3b884c95b2a54a7598ea83476b8dba1
2018-04-30 16:35:52 -04:00
Gary Kotton ec7444c77d Open Rocky DB branch
Change-Id: I409ec57f1d4c489e77d4d6e62c6df87055a585db
2018-02-09 07:16:45 +02:00
sindhudevale 3a098ea0e8 Refactoring db config options
Refactoring neutron db config opts to be in neutron/conf/db/ and
neutron/conf/agent/database/ so that all the configuration options
reside in a centralized location. This simplifies the process of
looking up the config opts and provides an easy way to import.

Change-Id: I4da9bb48d49b99e8c2b34a5c1b83e7eb95b70b82
Partial-Bug: #1563069
2017-10-04 15:42:50 -04:00
Armando Migliaccio 941cb677dc Open Queens DB branch
Change-Id: Ie9462853da6ddfe5bc434072f1d3094d0fae9dac
2017-08-24 14:46:01 +00:00
Béla Vancsics 4698b7b931 Remove unused variable
TrivialFix

Change-Id: I9483695a4ad9a1aa3ae26afd9b760891376c23c6
2017-04-14 23:09:21 +00:00
Armando Migliaccio 2901c7439d Open Pike DB migration branch
Change-Id: I654f2ee50466f466cf543f8b2e0caa18b918b4ea
2017-02-06 20:31:22 +00:00
Gary Kotton dbbbe595f4 Use ensure_tree from oslo_utils.fileutils
Make use of the common oslo method to implement ensure_dir.

TrivialFix

Change-Id: Ia9e4c581664235476f290a4b651c5a24017ce357
2016-11-05 00:00:31 -07:00
Henry Gessau d0f1a616b9 Make neutron-db-manage ready for ocata development
Change-Id: I3511782616347a69055d0d3ff9a9fc10b4a07859
2016-09-16 19:42:47 +00:00
Henry Gessau e8ac4b402a Revert "Support unique labels for alembic branches"
A problem was found with the --expand (and --contract) options, see the bug report. I am reverting this patch so that I can redo it and have one single patch that can be back-ported.

Closes-Bug: #1599574

This reverts commit 88359e3fe9.

Change-Id: Iebca469c6fec32bac0480be6627ad5e9dedaad9d
2016-07-06 16:51:04 +00:00
Henry Gessau 88359e3fe9 Support unique labels for alembic branches
We plan to have all projects that integrate with Neutron use the same
alembic environment (Neutron's) instead of having a separate alembic
env.py in each repo. This means that each project will need to label
their contract and expand branches uniquely.

With this patch we add support for branch labels of the form
  'networking-foo-contract'
  'networking-foo-expand'

We also support the old labels ('contract' and 'expand') with the
intent of backporting this patch to Mitaka so that projects can be
backwards compatible when they update their alembic branch labels. A
best effort will be made to backport this patch to Liberty also.

Support has been removed for label names starting with a "liberty_"
prefix. Such labels temporarily existed during the Liberty cycle but
have now all been cleaned up.

Partial-Bug: #1497830

Change-Id: Ibf38b3125d5d404d57f3e8ef0c7ecfa56eaf8042
2016-07-01 12:05:38 -04:00
Henry Gessau 65bd0cd9ff Complete removing support for unsplit alembic branches
We used to support subprojects with a single alembic branch.
Now the plan is to switch to a single alembic env for Neutron
and all installed subprojects. In a single alembic env, all
subprojects must use split (contract and expand) alembic branches.

The first step of removing single branch support was done in [1]
where we removed support for single HEAD files.

The --split_branches option was used by developers only. By removing
it we do not break any subproject, but force them to use split
branches for any new migration scripts.

[1] https://review.openstack.org/295905

Partial-Bug: #1497830

Change-Id: I62a191e1d22a1af4061c25fdc4a8df965d585419
2016-06-21 17:04:11 -04:00
Henry Gessau 6e7f8c1704 Remove some options from neutron-db-manage
Remove these CLI options:
 --core_plugin : deprecated, not used
 --service : deprecated in favor of --subproject
 --sql_connection : deprecated in favor of --database-connection

Related-Bug: #1501380

Change-Id: Iff1babbb29d43dd0d4fed653de4714ca0ff75a99
2016-06-08 19:21:56 +00:00
Aradhana Singh 97372a1431 Refactoring config options for quota
Refactoring Neutron configuration options for quota to be in
neutron/conf. This will allow centralization of all configuration
options and provide an easy way to import.
It is similar to the Nova implementation found here:
http://specs.openstack.org/openstack/nova-specs/specs/mitaka/implemented/centralize-config-options.html

Partial-Bug: #1563069

Change-Id: I7723ba9b24dd5cf74b321bd0fc54df0666594bbc
2016-05-11 09:15:38 -05:00
Assaf Muller 863b170009 Fix functional tests logging
Turns out the patch with Git commit hash prefix 13993764
disabled functional tests logging completely. This patch
fixes that by moving the neutron-db-manage logging setup
from import to the main function. Fixing that, it looks like
patch with Git commit hash prefix 4980f031fe turned off
DEBUG level logging for functional tests. I changed the
tests default logging from INFO to DEBUG to fix that.

Closes-Bug: #1567613
Change-Id: If02c18af20a236514409f37fa993224903877a8b
2016-05-04 06:39:37 -04:00
Dariusz Smigiel (dasm) 7d806fb990 Remove deprecated methods from migration CLI file
Commit Ie4ddd29d8c51be74a112864aae3d16fb5e52c0fa marked methods:
 * _validate_head_file
 * update_head_file
as deprecated.

Related-Bug: #1501380
Change-Id: I0c08b32120974a7f82d2ae967cf13374c2e797ce
2016-03-25 17:28:31 +00:00
Assaf Muller 13993764cd Fix alembic 'No handlers could be found for logger...'
When running 'neutron-db-manage upgrade heads', I get:

No handlers could be found for logger "oslo_config.cfg" <--
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
...

This patch moves the logging configuration from env.py to cli.py,
so the configuration is done when the CLI is invoked and not
when Alembic imports env.py.

Change-Id: I767e72f513699f21dd629241faa04cb2d8fa416c
2016-03-23 11:30:37 -04:00
Ihar Hrachyshka 8d07ba0e1b neutron-db-manage: revision: fail for --autogenerate and branch
If branch specification (--expand/--contract) is passed to CLI while
also passing --autogenerate, fail explicitly instead of going into
autogeneration code and generating both scripts, as we currently do.

Change-Id: Ibf829fdd0b66a8d312c314487cfd8122a7721ef6
Related-bug: #1501380
2016-03-21 22:18:48 +01:00
Ihar Hrachyshka ea408db27b Enforce alembic branch when creating scripts manually
Autogeneration code already enforces the branch for new scripts, but
explicit mode [where you pass --expand or --contract to get empty script
stubs] was not doing it. This resulted in new scripts being created in
the same directory where the current branch head is located. This is a
problem when we want to switch to a new release directory to store
future scripts.

To fix the problem, we now enforce the branch as per --contract/--expand
CLI arguments passed. We also ensure that the new directory is present
before attempting to generate a new stub script.

Related-bug: #1501380
Change-Id: I01cb6fed6dd246bedf945c323372e53991973fdc
2016-03-21 14:48:33 +00:00
Miguel Angel Ajo fbd0a2b5bd Add Newton branch to neutron-db-manage.
neutron-db-manage is updated to handle the new branch.

Change-Id: Ib9f9e99ce276bb1cd1e702b28bc5503341718eb1
2016-03-18 15:36:03 +01:00
Henry Gessau 1c67cda0f8 Fix branch order when upgrading to alembic milestone
When using neutron-db-manage to upgrade to a milestone tag,
the script was not ensuring that the expand branch was
upgraded before the contract branch. This broke projects
where contract migrations depend on expand migrations.

Fixes-Bug: #1550434

Change-Id: I0e6fc31dfa062c689936b2fe982147335ad9dce3
2016-03-04 00:44:40 -05:00
Ihar Hrachyshka eb084af29d neutron-db-manage: add has_offline_migrations command
This command should be used by operators and deployment tools to
determine whether full neutron-server shutdown is needed for database
upgrade.

The change also makes neutron-db-manage tool to return the cumulative
result of commands being issued (in most cases it will still be 0 only,
since our command handlers implicitly return None).

DocImpact: Update doc to add new command 'has_offline_migrations' to
'neutron-db-manage' tool. The command determines whether full
neutron-server shutdown is needed for database upgrade.

Closes-Bug: #1519118
Change-Id: I7c5a4882ad4f80459ebe69c9a9c43cc60ce50200
Co-Authored-By: Martin Hickey <martin.hickey@ie.ibm.com>
2016-01-22 13:55:40 +00:00
Akihiro Motoki 2d8632e412 Use _ from neutron._i18n
Partial-Bug: #1520094
Change-Id: I874a4aa1d71d1f7034a1ff0b7450b419ef5c6864
2015-12-06 19:39:04 +09:00
Martin Hickey 71190773e1 Automatically generate neutron core configuration files
This adds a new tox environment, genconfig, which generates sample
neutron core configuration file using oslo-config-generator.

Updates to some configuration option help messages to reflect useful
details that were missing in the code but were present in config files.

It also adds details to devref on how to update config files.

Partially-Implements: blueprint autogen-neutron-conf-file

DocImpact

Change-Id: I1c6dc4e7d479f1b7c755597caded24a0f018c712
Closes-bug: #1199963
Co-Authored-By: Louis Taylor <louis@kragniz.eu>
2015-11-27 15:22:59 +00:00
Jenkins 52e0d6d5fd Merge "neutron-db-manage: mark several options as deprecated" 2015-11-23 15:56:47 +00:00
Ihar Hrachyshka b06f816381 neutron-db-manage: mark several options as deprecated
I believe we don't rely on --core_plugin or --quota_driver for the tool
because database contents are independent of chosen plugins and drivers
since ~Juno.

Also marked --service with deprecated_for_removal=True.

Related-Bug: #1501380
Change-Id: I2b4d98242a0d38843d931a71414ef2560a7ddb8f
2015-11-23 12:01:45 +00:00
Ihar Hrachyshka 80ec365803 neutron-db-manage: expose alembic 'heads' command
This command shows current heads in all alembic branches. Even without
the command, we *can* get the heads values by looking into *_HEAD files
in tree. Still, those files may be missing; and the command is a tiny
bit more easy to use. Also, it gives access to more details on head
revisions if used with --verbose.

Change-Id: I6e7b7b5cd6f704d5d4bb4d845bf5098d4045924a
2015-11-20 17:39:11 +01:00
AKamyshnikova f144a283ea Per-branch HEAD files for conflict management
We have pep8 check for validation revisions, but it allows
outdated changes go into merge queue. To prevent this added
CONTRACT_HEAD, EXPAND_HEAD files.

Closes-bug: #1505701

Change-Id: Ie4b727e55a0b1ecb12e915a0037094a928d8f975
2015-11-02 16:13:42 +03:00