Because these were removed by [1]. Also update the previous release
note to document the upgrade impact on catalog information (like
endpoint urls) including string interpolations requiring these removed
options.
[1] 2a3c73c49b
Change-Id: If78d0b93665410b86754ea35653ca9d4c15c81c5
sqlalchemy-migrate does not (and will not) support sqlalchemy 2.0. We
need to drop these migrations to ensure we can upgrade our sqlalchemy
version.
Change-Id: I31ba9e4f129a7cc28744e814b5fd28eb284ae3de
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We're going to add new alembic-based migrations shortly. These will live
in the 'keystone.common.sql.migrations' module. Prepare for this by
moving the existing migrations from ''keystone.common.sql' into a common
'keystone.common.sql.legacy_migrations' module.
Change-Id: I5ab7b010b21268977f73738e895bbd21442e9455
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This is a variant of a tool added to nova during their migration to
alembic. It will be helpful as we continue expanding the repo.
Change-Id: Ib27532005c0f297b2b328cccd8d9528731ec1179
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
In Ubuntu Bionic (18.04) mysql 5.7 version used to create
the user implicitly when using using the GRANT.
Ubuntu Focal (20.04) has mysql 8.0 and with mysql 8.0 there
is no implicit user creation with GRANT. We need to
create the user first before using GRANT command.
This patch updates tools/test-setup.sh so that keystone supports
ubuntu focal.
Story: #2007865
Task: #40190
Change-Id: I86d10729cfc7c02f12df611b56f6e263969dfe4b
Closes-Bug: #1885825
In 09088690 we mistakenly added E501 to the flake8 ignore list. Since
then, many new violations have been introduced. This patch re-enables
the check and corrects all violations, except in some cases like unit
test names where the subunit output would suffer if we attempted to
shorten the function name.
This may appear to be a pointless no-op that messes with
git-blameability, and it is, but the reason to do this is that if PEP8
violations are introduced in master and then backported to a stable
branch, most stable branches will fail the pep8 job since the flake8
ignore list is correct for those branches. Rather than loosening the
check in older branches or requiring those backports to fix the linter
errors independently of what's been merged in master, we should fix it
now so that we don't introduce more errors in the future and patches can
more easily be backported.
Change-Id: I9f71926105eb448bb0200201d1838b67d4963cd6
This patch fixes E731 for flake8/pep8 which recommends preferring
functions over lambda expressions.
Change-Id: Ied905e1d55ae73b8d390240d3320a8ba0dcca17c
Without this patch, the fast8 tox environment runs flake8 differently
than the pep8 environment does, excluding the ignore list. This patch
ensures they have the same ignore list so that results are consistent.
Change-Id: I3f573e9627b17896fdd57261b9de692d49857140
Currently tox -epep8 will run flake8 on whole code.
To make this fast, flake8 support is added for only
updated(delta) code. Same can be run by "tox -efast8".
It also determines how many commits to check based on the
$FAST8_NUM_COMMITS env variable. If set to "smart",
it uses git to try to run against all unsubmitted commits.
This allows fast8 to be more useful when actively
developing a series of patches.
Closes-Bug: #1829455
Change-Id: Ic02d7a91c6f6b227abf14bc6f7cb85815591c0d3
With the removal of the Identity v2 API, keystone now runs on
port 5000, rather than on the port 35357 which was used earlier.
Change-Id: I5a763fbf765553b00713add9f863751b418deb82
This patch refresh the sample_data.sh file to satisfy the newest
OpenStack.
It includes:
1. Remove ec2 which has been removed from Nova already.
2. Remove Cinder V1 which has been removed as well.
3. Add the missing cinder user.
4. Add nova v2.1, cinder v2 and v3 support.
5. Change tenant_id to project_id
Change-Id: I792dfcd058c169c69a8ed82d04aafc8d53649087
Add simple script to setup mysql and postgresql databases, this script
can be run by users during testing and will be run by CI systems for
specific setup before running unit tests.
This allows to change in project-config the python-db jobs to
python-jobs since python-jobs will call this script initially.
Update README for this.
See also
http://lists.openstack.org/pipermail/openstack-dev/2016-November/107784.html
Needed-By: Ic42f8d5392ab1d9b52c6c84c92dee0092bd2779a
Change-Id: I253726467151622e8aa3ff40bacc0b3f9903b342
Remove the helper script for py34, it prevents the use of arguments
being passed down e.g. tox -epy34 -- --failing due to the lack of
passing {posargs} to the script. Since py34 has no special exceptions
now, the specific env for py34 with a special pretty_tox script is
not needed.
Change-Id: I4d960d82e2844c0c82a14be5e92230f1698e11b3
`patch_cover` checks to make sure your patch has
adequate test coverage.
How it works is it stashes your changes, runs `tox -e cover`,
saves the results then stash pops your change and runs cover
again. It then reports to show if your code in your patch
has 100% test coverage or not.
The intent of this job is to be a non-voting / warning like
job that can inform reviewers if the review clearly needs
more testing.
Since cover.sh is copied from [0] the copyright should
reflect the owners of the code.
[0]: https://github.com/openstack/rally/blob/master/tests/ci/cover.sh
Change-Id: I66572072aa4d9563b6e1f73a8f8b3437116ef3c4
The default value for the admin_token parameter was removed from the
sample config file in ea952bd2, so the recommendation in the developer
documentation to use it without first setting it will result in an
error. This patch updates the developer documentation and the
sample_data.sh script to use the Identity v3 API and to follow the
latest recommendations for bootstrapping an admin user with which to
insert sample data.
Change-Id: I424ff6129d4ddcd63fb2bed4eabcbe910ab0153e
There are several reasons for this change:
- removes the need for the custome py3 test dependencies
- makes the broken tests more visible because they are listed
instead of the working ones
- using a blacklist means that new test files are tested by default in
py3
bp python3
Change-Id: I7472eec05d80cdd99c0ee376159578e0d7306f51
As pointed out by Brant Knudson in change [1], the sample policy file
allows the service user to validate tokens [2], so service users don't
need 'admin' role, they only need 'service'.
This patch adds the 'service' role creation to our tools/sample_data.sh
and updates service roles to it rather than 'admin'.
[1] Iebc4f6b005e0466fe60691d964c7dea0e0eee947
[2] http://git.openstack.org/cgit/openstack/keystone/tree/etc/policy.json#n94
Change-Id: I3336514f7a2e1e749908d92b693d765c3ed48f51
With the addition of Neutron to the sample_data.sh script, all services
required by the compute starter kit tag [1] are created (plus swift and ec2
compatible credentials)
[1] http://governance.openstack.org/reference/tags/compute_starter_kit.html
Change-Id: Iebc4f6b005e0466fe60691d964c7dea0e0eee947
- removes run_tests.sh since it's rarely used and an alternative exists
- removes all the remaining incubator files since nothing uses them
The real value of run_tests.sh over tox is that run_tests.sh enables
running tests against against any virtualenv or Python installation. tox
is just a tool that runs testr commands in a specific virtualenv. testr
can be used directly as a run_tests.sh replacement for running tests in
an arbitrary virtualenv or against any Python installation.
blueprint remove-oslo-incubator
Change-Id: I9d4ef8bf935eb565af1c8d53d1ed71be9a94a975
tools/pretty_tox.sh should be marked as executable, this patch
just 'chmod +x' to it.
Closes-Bug: 1486313
Change-Id: Ia5fa921e83da1e094970b1e44c9709272c7e32d3
When moving from keystone to openstack client, the initialization of
the ADMIN_USER variable was removed, making the script to fail.
Change-Id: Iee2d5b1cbed6c93e335a4b4dbad3034a2f8e29ed
When using openstack client to populate an initial keystone
deployment, instead of the former keystone client, the env.
variables needed are OS_TOKEN and OS_URL instead of the
previous OS_SERVICE_TOKEN and OS_SERVICE_ENDPOINT
Change-Id: I79dcd56896945267cf1c8ff4378ffff63048e155
The leading comment in sample_data.sh still references the old
python-keystoneclient when its python-openstackclient that is
used to populate sample data.
This patch also makes a minor fix of the Swift service description.
TrivialFix
Change-Id: Ie4f5729dcc0b3a6164470d11ba91ddaaec0bb022
The file has not been modified in 3 years, and seems like a
utility a deployer should maintain for debugging.
Change-Id: Ib4d55052c27facf7d96655c75784b657d1b01975
Cleans up the sample_data script to replace the keystoneclient commands
with the new openstackclient commands
Change-Id: Id68ff2b466e582a0c2f4418d173f7d63c14f5f37
Closes-Bug: #1459816
This switches keystone to use oslo-config-generator, where the contents
of our sample configuration file are configured using a configuration
file in config-generators/, because the only way to have tox create
files is to have configuration files for your configuration files
(seriously, it chokes when redirects are included in the command for a
test environment).
This also takes advantage of oslo-config-generator's ability to set the
line wrap width, which is done at 79 chars here to match the rest of our
code.
Also update the actual sample file under etc/
Change-Id: I9f9a157c7802c56a2c7484f6f4adec4aeb4071b8
Closes-Bug: 1324610
With the latest version of oslotest, we can now take advantage
of a common oslo_debug_helper script.
We can now remove our own homebrewed version, minor changes to
tox.ini were needed.
Change-Id: Ide72fb3531f0498dfe289d028049cd432aa08887
This syncs Keystone with oslo-incubator commit hash
e9bb0b596650540f336afb070a1f8c7de099721f .
In keystone:
$ rm -r keystone/openstack/common
In oslo-incubator:
$ git checkout e9bb0b596650540f336afb070a1f8c7de099721f
$ python update.py ../keystone
Commits
-------
bc48099 Log the function name of looping call
109e325 Use oslo.messaging to publish log errors
de4adbc pep8: fixed multiple violations
9651085 generator: remove unused param, small clean up
eac71f5 Fix common.log.ContextFormatter for Python 3
238e601 Make policy debug logging less verbose
250cd88 Fixed a new pep8 error and a small typo
5e3d3a5 Mask passwords included without quotes at the ends of commands
e7c8a45 Improve error handling for conf sample generation
9e88af1 fixed typos found by RETF rules
5f12bba Implement stop method in ProcessLauncher
0d7296f Add kwargs to jsonutils.load(s) functions
9c88dc3 file_open: fixed docstring to refer to open() instead of file()
d78b633 Fixes a simple spelling mistake
621d831 always log a traceback in the sys.excepthook
Change-Id: I4ef56ce08e1f3bbc0ddb82a495da153e09a14c50
Keystone's configuration should have no bearing on the catalog
for nova's port. Nova's port is "static" data from the templated
catalog perspective.
The 'compute_port' option has been marked as deprecated and
slated for removal in the L release. The default/sample
templated catalog files do not rely on this option any
longer.
Change-Id: I51b0ec951449360f002c2e7c900ded0f40e16044
Closes-Bug: #1335278
Now that bash8 is available on PyPI we can use it to clean up the bash
scripts in Keystone. This also uses bash8 in tox. For now we can add
files to the tox check manually as we make them compliant.
Change-Id: I87a7478949114163f0614b1a6d8b249e14afe0df
An upcoming change[1] in oslo's update.py adds new warnings for
style issues in the config. To compensate this commit:
- orders the modules alphabetically
- uses the script directive for scripts
Sync with oslo-incubator caed79d
This syncs Keystone with oslo-incubator commit hash
caed79d8239679cb74476bb0d9e5011b4fcc39da.
In keystone:
$ rm -r keystone/openstack/common
In oslo-incubator:
$ python update.py ../keystone
Commits
-------
1173e46 Remove ValueError when accessing sys.modules
17c4e21 Fix docstring indentation in systemd
90ae24b Remove redundant default=None for config options
6c7407b fileutils: port to Python 3
18f2bc1 Enforce unicode json output for jsonutils.load[s]()
af36c2a Fix logging setup for Python 3.4
5ae792b Document config generator variables
ea9ead8 Allow file exclusion in config generator
cdcc19c Mask passwords that are included in commands
9e5a393 jsonutils.load() accepts file pointer, not string
a6b2aec On Python <= 2.6, use simplejson if available
fe3389e Improve help strings
8a0f567 Remove str() from LOG.* and exceptions
f3f14c9 Fixed several typos
0f495ee Emit a log statement when releasing internal lock
9912e5d Add API for creating translation functions
1. https://review.openstack.org/76901
Change-Id: I89de9ae9e3c574095967a2a67e842a90b5527ffa
This syncs Keystone with oslo-incubator commit hash
2fd457bf2ccbeb2b84ffb204778b6417cd5405ba .
In keystone:
$ rm -r keystone/openstack/common
In oslo-incubator:
$ python update.py ../keystone
The newer lockutils requires posix_ipc. It's already in
global-requirements.
Keystone uses gettextutils and versionutils from oslo-incubator
so those should be in openstack-common.conf. They were pulled in
as dependencies of other oslo-incubator modules but Keystone
shouldn't rely on that.
Keystone doesn't use log_handler directly so that module was
removed from openstack-common.conf. log_handler is available in
the oslo.messaging library.
Change-Id: I6082f4e0995ca35372f9b061d8f76890aa93250c
Restructure the common config to include many help strings to
support using the oslo.config auto-generated sample config file.
Closes-Bug: #1229941
Change-Id: If352b3b816b1e7dc8b5fc3b9c1cb2adab187ffda
Sync in the oslo code for auto-config sample generation and
make the appropriate changes to setup to allow for automatic
option discovery.
`test-requirements.txt` now includes stevedore to
ensure the oslo libraries can all be loaded as expected.
Change-Id: Ieca0aea4d3c67b930c12467317d2f4d83763b601
We don't need vim modelines in each source file, it can be set in
user's vimrc.
Change-Id: Ie51ad62946afdf39eadcd59edaf8134ec10265c6
Closes-Bug: #1229324
Running a test with pdb was difficult because testr captures
output and causes pdb prompt to quit.
Tips for how to run with debug are provided here:
https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests
This change puts these commands into a debug env in tox.ini so
you can do a command like
tox -e debug test_v3_trust_token_get_token_fails
or, for more granularity:
tox -e debug keystone.tests.test_sql_migrate_extensions.EndpointFilterExtension
tox -e debug keystone.tests.test_sql_migrate_extensions.EndpointFilterExtension.test_downgrade
and when it hits your breakpoint you'll get the debug prompt.
Change-Id: I2b5dc81f4652dc89ecbcc7c785245a81cf77a1ca