Commit Graph

163 Commits

Author SHA1 Message Date
Ade Lee 0f13754f84 Add fips check jobs
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
2022-02-03 13:19:20 -05:00
Dan Smith 6a2a6283ae Stream-friendly disk format inspection module
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
2020-08-05 08:41:55 -07:00
Sean McGinnis b220030070
Make test-setup.sh compatible with mysql8
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>
2020-06-30 08:16:33 -05:00
Zane Bitter 7ef796bbcf Use group_regex to serialize scrubber tests
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
2018-06-07 09:25:04 -04:00
Brian Rosmaita 837937f8d2 Add glance-eventlet-ssl-handshake-broken-py35 job
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
2018-06-05 22:32:28 -04:00
Andreas Jaeger b628acec24 Prepare for using standard python tests
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
2017-02-03 20:11:48 +01:00
Flavio Percoco 0f8c0c3538 Remove old `run_tests` script
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
2016-05-08 11:09:34 -04:00
Bo Wang eb2e7c04fe Drop dict.iterkeys() for python3
dict.iterkeys() has been removed in python3, replace it with
dict.keys().
Don't use six.iterkeys(dict). ref:
http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: Ifbb27c748f43155ea1f6b43b718516c3a348daf2
2016-01-20 21:26:28 +08:00
kairat_kushaev c27c25f779 Import i18n functions directly
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
2015-12-07 18:20:43 +03:00
kairat_kushaev 37fa0fca83 Change string generation mechanism for info logging
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
2015-09-30 02:20:37 +03:00
ChangBo Guo(gcb) 9d4225289b Leverage dict comprehension in PEP-0274
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
2015-05-28 01:46:02 +00:00
Jenkins b98c33002a Merge "Fix missing translations for error and info" 2015-03-13 20:32:44 +00:00
ankitagrawal 8a95bf893d Fix missing translations for error and info
Fixed log message translations at several missing places.

Closes-Bug: 1431239
Change-Id: I23ae9395a91ce88e0877c0a0ef55189c6e42700b
2015-03-12 22:37:15 -07:00
Louis Taylor 0acff569e0 Move to graduated oslo.log module
This removes the log module from the oslo incubator directory.

Change-Id: Ib017cc2777e27c58b376c3138c9fba614783cc34
2015-03-12 11:48:24 +00:00
Louis Taylor d759a6fd1a Move from oslo.config to oslo_config
oslo_config was moved out of the oslo namespace in oslo.config>=1.6.0.

Related-to: blueprint drop-namespace-packages

Change-Id: I30ecbf8f9de77496fcb643c7ad9738d79ad359f0
2015-01-12 14:34:22 +00:00
Pranali Deore 6eebebc80b Replace '_' with '_LI', '_LE', '_LW', '_LC'
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
2014-12-19 02:34:55 -08:00
Zhi Yan Liu d4f890798a Update glance.openstack.common
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>
2014-10-16 11:12:18 +08:00
Julien Danjou fadbef8511 hacking: upgrade to 0.9.x serie
Change-Id: I252758fd633662de9659a402c5e3d7e3ce1fae0f
2014-10-06 14:41:03 +02:00
Jenkins f4598907ad Merge "colorizer: use staticmethod rather than classmethod" 2014-06-19 18:06:40 +00:00
Jenkins 64ae671f33 Merge "To fixes import error for run_tests.sh" 2014-06-17 11:44:09 +00:00
Julien Danjou 2d2a3f3780 colorizer: use staticmethod rather than classmethod
The methods are actually not class methods at all as they do not use the
class nor the instance.

Change-Id: I04721bcaef30da291389a1144bdcfe65f10753b2
2014-06-16 11:53:33 +02:00
Christian Berendt 213b2f5006 use /usr/bin/env python instead of /usr/bin/python
The usage of /usr/bin/env ensures that the first interpreter
found in the environment's $PATH variable is used.

Change-Id: I61b27bb9a5fc1f8d2a3981472215bc0aa6a389e2
2014-05-23 15:45:46 +02:00
Zhi Yan Liu 95d81a0b03 To fixes import error for run_tests.sh
Change-Id: Iacce978001750c9cb8f398dba78361dee22ed2fb
Closes-bug: #1314007
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-04-29 13:12:23 +08:00
Julia Varlamova 5843e071d4 Enable H304 check
Enable H304: no relative imports

Fix import in tools/install_venv.py

Change-Id: I099ed65db9b42223eaa4b66a3a5c6113d1cc56fe
2014-03-20 10:34:26 +00:00
Zhi Yan Liu d7f1221684 Switch to testrepository for running tests
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>
2014-01-29 08:30:55 +08:00
Noboru arai 8de10b0f34 Remove vim header
No need to set tabstop tons of times, this can be set in your vimrc
file instead.

More disucssion:
http://openstack.10931.n7.nabble.com/Remove-vim-modelines-td21780.html

Change-Id: I3b830a5bb831a63c188109e6fad66ba48884fff3
Partial-Bug: #1229324
2014-01-14 16:03:28 +00:00
Dirk Mueller f7358a0d13 Sync with oslo-incubator (git 6827012)
This syncs the common/ modules with oslo-incubator, which
brings a few hacking fixes and py3k compat fixes.

Change-Id: I948aafebd25ae0b3aad119c41d0a121c8b9c5ae8
2014-01-02 15:19:29 +01:00
Dirk Mueller d6114f914c Fix and enable gating on H306
Fix fallout of Hacking check: Imports should be in alphabetical order

Change-Id: I179711c8448208592490ffa47d51419779940014
2014-01-01 16:44:19 +01:00
Yanis Guenane 317ad31637 Make Glance code base H102 compliant
Add the Apache headers where it was missing so the Glance
code base can be H102 compliant

Change-Id: If19841d1752f7ec364098333429ce090374e79cd
Closes-bug: #1263537
2013-12-23 13:12:12 +00:00
Victor Sergeyev 88bb1af1d5 Enable F40X checking
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
2013-11-27 18:15:48 +02:00
Jenkins 93edd1bdc6 Merge "Changed header from LLC to Foundation based on trademark policies" 2013-11-12 13:41:45 +00:00
Jenkins 29c0c00605 Merge "Use built-in print() instead of print statement" 2013-10-17 14:12:54 +00:00
Chang Bo Guo e8e293d43e Use built-in print() instead of print statement
In python 3 print statement is not supported, so we should use
only print() functions.

Fixes bug 1226943

Change-Id: I0ae4cc7e5996ed30c69e153ba51438c56e56c09a
2013-09-24 08:12:26 -07:00
ZhiQiang Fan dab794e6fb Enclose command args in with_venv.sh
Sync tools/with_venv.sh from oslo, it will support argument with
blanks.

Change-Id: Ibb802b21d609ea6b54fc168b17705f06ad1cb86a
Closes-Bug: #1220937
2013-09-20 05:50:40 +08:00
Dirk Mueller 518bbf7298 Changed header from LLC to Foundation based on trademark policies
Fixes: Bug 1214176

Change-Id: I4e394c33d810fe7d48066ff7cb6143f7eae25f13
2013-09-10 18:29:53 +02:00
Monty Taylor d0314c0973 Rename requirements files to standard names.
Change-Id: Icde92cdff054f8c1efb4a518ab7cf166a8eb791a
2013-07-30 00:34:26 -04:00
Brian Elliott fcaf7d4e62 Use cross-platform 'ps' for test_multiprocessing
This fixes _get_children() on OS X.

bug 1205367

Change-Id: I296ea18dbd601f18fe7367b42bf5aecd9ccf9646
2013-07-19 23:15:02 +00:00
Jenkins ef22c4f745 Merge "Use oslo.sphinx and remove local copy of doc theme" 2013-07-19 23:56:16 +00:00
Zhi Yan Liu d13493be80 Adding Cinder backend storage driver to Glance
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>
2013-07-17 06:27:59 +08:00
Jenkins bcb8713f7a Merge "Pin kombu and anyjson versions" 2013-07-12 01:33:17 +00:00
Monty Taylor 30f75e31ef Sync install_venv_common from oslo
Change-Id: Idd7fd1310b58e81ceb9ae06bb1e9710aee1f4a65
2013-07-05 22:39:20 -04:00
Doug Hellmann 670b07eb56 Use oslo.sphinx and remove local copy of doc theme
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
2013-07-05 16:10:20 -04:00
Doug Hellmann e099eb2522 Pin kombu and anyjson versions
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>
2013-06-24 12:16:43 -04:00
Monty Taylor c867fc7e44 Remove explicit distribute depend.
Causes issues with the recent re-merge with setuptools. Advice from
upstream is to stop doing explicit depends.

Change-Id: Ie875bbaae191cd0719db76cc375cd97d5bf90de7
2013-06-11 11:30:07 -07:00
Jenkins 1797d833b8 Merge "Add qpid-python to test-requires" 2013-05-31 22:18:28 +00:00
Michael Still f09c52c8b0 Sync oslo imports to the latest version.
Change-Id: I36193d00930e5c82c46841b64650863c811b95a4
2013-05-27 06:00:46 +10:00
Ben Nemec 42de74116e Add qpid-python to test-requires
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
2013-05-15 16:16:52 +00:00
Monty Taylor 66b3e5ec83 Use flake8/hacking instead of pep8.
Change-Id: Ia99bc9116d7d8b558002b302cafe354d05d57f72
2013-05-03 11:28:22 -04:00
John Bresnahan 28b1129753 Verify SSL certificates at boot time
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
2013-04-03 07:29:15 -10:00
Jenkins 0fc6972024 Merge "Pin SQLAlchemy to 0.7.x" 2013-03-28 18:43:37 +00:00