Some jobs have been modified to run to confirm that functionality is
still working when FIPS is enabled on the nodes.
As the FIPS tests currently run on centos nodes, code is added
to the test-setup script to set up the databases correctly. Also had
to increase the swap space on the nodes; see [0] for an explanation.
The current FIPS jobs run using python 3.6 on centos-8-stream. We will
modify these to run on centos-9-stream and python 3.9 in a
subsequent patch.
[0] https://review.opendev.org/c/openstack/devstack/+/803706
Change-Id: I060d8247c7b09f63990ea411e6c6a056bb50410d
This adds a module called common.format_inspector which contains
an implementation of virtual disk format and size detection that
works in a streamable fashion. This can be injected into a data
processing loop and gracefully detect both format type as well as
virtual_size of the disk format, for those that are supported.
Currently excluded from the list of formats that glance claims to
support are iso (which can be treated like raw) and ploop (which
not even qemu-img seems to support).
This also adds a test_format_inspector.py executable into tools/,
which we can use to validate the code manually on images in the
case where bugs report that this fails to work on some real-world
image.
Related to blueprint calculate-virtual-size
Change-Id: Ica9fc645229b0b19b913ce3f2e151f7b0c935649
Starting from mysql version 8 it's not possible to create a user
implictly when using GRANT.
This patch makes the behavior compatible with that.
Change-Id: Ia5a01089fe0eeb8fe0a1ec5a7cd0557835a46f9e
Co-written-by: Riccardo Pittau <elfosardo@gmail.com>
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Instead of doing two separate test runs, use the group_regex option to
stestr to group tests that cannot be run in parallel into the same
worker.
Change-Id: I3d69d5c72d69484f4e1c9c0b11122d0cf3703d60
Related-Bug: #1768077
Blacklist the two currently skipped functional-py35 tests and
include them in a new non-voting job so that their failure is
obvious instead of hidden.
Change-Id: Ice8e114c6590b25f3ec79fbe4c06efaa245706c0
Partial-bug: #1769006
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 is exactly what is
currently done by OpenStack CI in project-config.
This allows to change in project-config the python-db jobs to
python-jobs since python-jobs will call this script initially.
See also
http://lists.openstack.org/pipermail/openstack-dev/2016-November/107784.html
Change-Id: I5191afb3e8c0fff9f82cb2d937343a67348c9c34
Needed-By: I5ca756d8aeb4fe90fd4ca7ac381a7f684b5c56fb
tox has become our default testing tool. CI jobs and developers rely on
it to run unit tests, integration tests and functional tests. Therefore,
this patch removes the old - deprecated - run_tests.sh script in favor
of just using tox.
Change-Id: Ieb9f36616ee869c017b5ccf36be32abdf0a87767
Import i18n functions from module directly and do not use
global module variables like _ = i18n._. It makes code shorter
and cleaner. It also to detect cases when these functions are not
used in module.
Change-Id: Iaa593ac1f2dd15cbcad049bef6ba68f1cfa610da
As stated in Openstack logging and i18n guidelines it is
recommended that formatted string for log messages should be
generated by logger (not by logger client/user). In this case
we can skip formatted message generation if log level configured
not to show info messages.
Also some non-used initialization of logger has been deleted
from the code.
Change-Id: I25660395417ea288aee6a70609a5336e6f74c291
PEP-0274 introduced dict comprehensions to replace dict constructor
with a sequence of key-pairs[1], these are two benefits:
- First, it makes the code look neater.
- Second, it gains a micro-optimization.
Glance dropped python 2.6 support in Kilo, we can leverage this now.
Note: This commit doesn't handle dict constructor with kwargs.
This commit also adds a hacking rule.
[1]http://legacy.python.org/dev/peps/pep-0274/
Co-Authored-By: ChangBo Guo(gcb) <eric.guo@easystack.cn>
Co-Authored-By: Kamil Rykowski <kamil.rykowski@intel.com>
Change-Id: I0ba408f9c616dcdb09618f6256db76b9facc0c1d
oslo_config was moved out of the oslo namespace in oslo.config>=1.6.0.
Related-to: blueprint drop-namespace-packages
Change-Id: I30ecbf8f9de77496fcb643c7ad9738d79ad359f0
oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating. For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack
Added hacking rules for warning, info, critical, error and exception
about checking translation for log messages and fixed for below cases only,
1. LOG.error(_(""))
2. LOG.info(_(""))
3. LOG.exception(_(""))
4. LOG.critical(_(""))
5. LOG.warning(_(""))
Below scenario is not handled in this patch,
If message is passed to LOG call using separate variable,
ex.
msg = (_("")
LOG.error(msg)
Change-Id: Idbf8779cdfc41ca1424bebcd101096bec482872f
1. Sync openstack.common modules up to latest version
from oslo-inc. The follow modules got updated:
* fileutils
* install_venv_common
* lockutils
* log
* processutils
2. Add _i18n module as the dependency for new code.
3. Remove openstack.common.test module.
Glance and dependencies now use oslotest instead.
4. Remote unused openstack.common.excutils module.
Glance now use the module from oslo.utils instead.
5. Add missing modules back to openstack-common.conf.
Below ones are still using currently. But they will
be removed when the latest policy module get synced.
* jsonutils
* strutils
Change-Id: Ibbc2cda81a4e3c13643fe5c5bf6471c3f544add7
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
The usage of /usr/bin/env ensures that the first interpreter
found in the environment's $PATH variable is used.
Change-Id: I61b27bb9a5fc1f8d2a3981472215bc0aa6a389e2
OpenStack as a whole is moving towards using testrepository and
testtools for running tests. To that end, bring Glance into line by
switching it to use testrepository to run tests.
This copies run_tests.sh and tools/colorizer.py from Nova.
This change also has some minor changes to make run_test.sh work well.
Partial fixes bug: 1179009
Fixes bug: 1271806
Change-Id: Ic265bc0d2f1528358f6e8ee5b4139f991923fc72
Signed-off-by: Steve Kowalik <steven@wedontsleep.org>
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
This syncs the common/ modules with oslo-incubator, which
brings a few hacking fixes and py3k compat fixes.
Change-Id: I948aafebd25ae0b3aad119c41d0a121c8b9c5ae8
Add the Apache headers where it was missing so the Glance
code base can be H102 compliant
Change-Id: If19841d1752f7ec364098333429ce090374e79cd
Closes-bug: #1263537
Clean up imports due to F401 and F403 checks.
F401 'module' imported but unused
F403 unable to detect undefined names with wildcard import
Change-Id: I487edb157de1a6babc7ad8a3fb65f195e476c490
In python 3 print statement is not supported, so we should use
only print() functions.
Fixes bug 1226943
Change-Id: I0ae4cc7e5996ed30c69e153ba51438c56e56c09a
This change allows Glance drive Cinder as a block storage backend to
store image data.
Before this we already use swift as an object storage backend to save
image.
Currently the patch is a partial implementation, after Cinder expose
'brick' library, 'host-volume-attaching' and 'multiple-attaching'
enhancement ready, the store will support ADD/GET/DELETE interface
finally.
blueprint: glance-cinder-driver
Change-Id: I4cdeccdb518972c0280e59c984ed6b001dafe243
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Use the new oslo.sphinx version of the OpenStack doc
theme instead of copying it into this repo.
blueprint oslo.sphinx
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Change-Id: I0bd91f7bb43f97b99051fed65b75fc05d5149cc8
The minimum version of kombu in the requirements
list has been updated to ensure that compatible
kombu and msgpack libraries are used across all
projects. That update also requires an update
to anyjson.
Addresses bug #1134575
Change-Id: I1520af1315fe649f52ab62769164dc67f4396651
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Causes issues with the recent re-merge with setuptools. Advice from
upstream is to stop doing explicit depends.
Change-Id: Ie875bbaae191cd0719db76cc375cd97d5bf90de7
The qpid notification tests are not run if the qpid-python package
is not installed. This change adds it to the test-requires list
and removes the check for it since it should always be present.
Fixes bug 1173380
Change-Id: I2763e320e6018fde196c903f515920ad33f28aa6
When Glance is configured to run with SSL this patch will check
that the certificate and key exist, are readable, and match each
other at boot time. If any of the above conditions fail an friendly
error message is logged directing the operator at a solution.
Previously the keys were not checked until a client connected.
fixes bug: 1160529
Change-Id: I16975608f9ae40ac5b84b3caa52ed5f8e22f296e