Commit Graph

30 Commits

Author SHA1 Message Date
Brian Rosmaita f165c6ff5e Stop cinderlib development
Remove files from master, as development will no longer occur there.
The stable branches continue to be supported while they are in
Maintained status.

Updated the README to indicate this change.

Depends-on: Ib186ac5830e5920e264d79be946995e63e960426
Depends-on: I081cd363117671eaab6a3193094d5872f9820354
Depends-on: If2b9a82cddb20543b176ee22765049db257c89b9
Depends-on: I1143e5e5ccf8103e386fe1ce614a554e7f152d9a
Change-Id: I4722b869033ad1bd357e36c4a258b6d3ea61f5d6
2024-01-05 16:03:46 +00:00
Brian Rosmaita ab28330d85 Continue 2023.2 (Bobcat) development
As a cycle-with-intermediary release with trailing deliverable type,
cinderlib's master remains the 2023.2 development branch until early
in the 2024.1 (Caracal) cycle when the cinderlib 2023.2 (Bobcat)
release is made.  So update tox.ini and .zuul.yaml to test against
cinder and os-brick stable/2023.2 instead of their master branches,
and restrict cinder and os-brick in requirements.txt to the 2023.2
series.

See the cinderlib docs for more info about this change:
https://docs.openstack.org/cinderlib/latest/contributor/contributing.html#cinderlib-tox-and-zuul-configuration-maintenance

Change-Id: I830b8e2f9766746a7f81b24ce1b7c1f4d4c7c5a1
2023-10-09 15:33:15 +00:00
Brian Rosmaita 6bb58dd596 Use openstack-tox-py311
This addresses a TODO in .zuul.yaml.  The openstack-tox-py311 job
was added by change I725b94bee6601a.

The job runs on debian-bookworm, but we don't need to modify
cinderlib's bindep.txt because we don't include any packages not
recognized by debian.  Cinder does, however, so this patch depends
on the cinder patch that updates cinder's bindep.txt.

Depends-on: https://review.opendev.org/c/openstack/cinder/+/891645
Change-Id: Iff9d4079655c8c4b15ad54d6936a81d024aa2c74
2023-08-31 09:02:02 -04:00
Brian Rosmaita 496ef8dfdb Open cinderlib for 2023.2 (Bobcat) development
See "cinderlib tox and zuul configuration maintenance" in
https://docs.openstack.org/cinderlib/latest/contributor/contributing.html
for an explanation of these changes.

Notes:
- checked, but can't address the TODO in .zuul.yaml yet
- no changes needed for setup.cfg
- py39 testing wasn't required for Antelope, but it is for Bobcat

Change-Id: I4b68ec8594fca14445333143b2852ee122aa6bd6
2023-07-21 09:46:51 -04:00
Brian Rosmaita 18c81f0023 Continue 2023.1 (Antelope) development
As a cycle-with-intermediary release with trailing deliverable type,
cinderlib's master remains the 2023.1 development branch until early
in the 2023.2 (Bobcat) cycle when the cinderlib 2023.1 (Antelope)
release is made.  So update tox.ini and .zuul.yaml to test against
cinder and os-brick stable/2023.1 instead of their master branches,
and restrict cinder and os-brick in requirements.txt to the 2023.1
series.

Change-Id: Id74b4d0e2bad8fa7a3629d85458b089e00a60211
2023-03-30 10:45:16 +00:00
Gorka Eguileor 436bc6d74b Fix tox.ini
CI fails to run on Tox v4 complaining about spaces in pass_env and not
being able to run special_install.sh.

Those are easy to fix and this patch fixes them in tox.ini:

- Using multiple lines for the different environmental variable values
  in pass_env.

- Allowing running tools/special_install.sh and tools/generate_uc.sh as
  an external commands.

There is also an issue with the cinderlib entry points not being
available during unit tests.  This issues is not reproducible locally
even using the same tox and python version as the gate, so the patch
limits the tox version to v3 and prevents jobs from using v4 to unblock
the gate.

The patch also updates the values of the constraints branch from
antelope to 2023.1 since antelope doesn't exist and without this change
the patch cannot merge.

Change-Id: I14ea8821aeccc43b5ddcc83862d59b1bbf4094be
2023-01-19 17:29:55 +01:00
Brian Rosmaita 0c0879a681 Open cinderlib for 2023.1 (Antelope) development
See "cinderlib tox and zuul configuration maintenance" in
https://docs.openstack.org/cinderlib/latest/contributor/contributing.html
for an explanation of these changes.

Change-Id: I68d038a3a64a81e6bd21e65423898d9f5b514234
2022-12-16 10:06:08 -05:00
Brian Rosmaita def0c7faa2 Open cinderlib for zed development
NOTE: don't use this patch as an example of "open cinderlib for
xxx development" because it's happening *after* cinder and os-brick
stable/zed have been cut (normally, it would happen before).

In this patch we:
- Switch tox.ini to using stable/zed instead of stable/yoga for
  requirements, cinder, and os-brick
- update .zuul.yaml to use jobs specified by the
  openstack-python3-zed-template
- add a cinderlib-os-brick-src-tempest-lvm-lio-barbican-zed job to
  .zuul.yaml
- update tox.ini to support the current supported python runtimes
  for unit and functional tests plus python 3.10
- update requirements.txt to use only Zed release cinder and os-brick
- update setup.cfg to reflect the Zed supported python runtimes

Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>
Co-authored-by: Takashi Kajinami <tkajinam@redhat.com>

Change-Id: I6482088acfaf4c6de436d1a12195e96b3334e906
2022-12-14 04:26:23 +00:00
Brian Rosmaita 9c09e93937 Update deprecated zuul syntax
Replace declaring shared queues at the project-pipeline level
with declaring them at the project level so that cinderlib CI
won't break at opendev's next Zuul major update.

Details:
https://lists.zuul-ci.org/pipermail/zuul-discuss/2022-May/001801.html

Change-Id: Ie0b14c0c64d1b233a37aeae61618efdc2d6e262e
2022-07-18 18:08:40 +00:00
Brian Rosmaita eec3b54628 Use stable/yoga override for CI jobs (conclusion)
Make the change from I82e2bbf7e0380e2bf for the
os-brick-src-tempest-lvm-lio-barbican job, which is the only
remaining unchanged job (other than docs and releasenotes).

Change-Id: Iac7cb2296712ee230e5d53374d3b2ce71a2bf1a1
2022-06-16 09:29:13 -04:00
Brian Rosmaita 84c6b102b8 Use stable/yoga override for CI jobs
cinderlib master is still Yoga development, but when zuul runs on a
master patch, zuul.branch is 'master', and this cascades throughout
the various jobs.  It's particularly evident for requirements, but
also affects cinder and os-brick (which are installed from source);
from what I can tell, an initial install is done to gather
dependencies, and this seems to be from master by default.  So
explicitly use override-checkout for requirements, cinder, and
os-brick on all jobs.

Why are we only noticing this now?  I think it hasn't been a problem
in the past because python 3.6 has been supported from Rocky through
Yoga, and is dropped from Zed, and hence running the cinderlib Yoga
development branch against master for other projects is encountering
some serious incompatibilities.  We probably should have been using
the stable branch in cinderlib's pre-release trailing phase all
along; it just hasn't mattered until now.

Change-Id: I82e2bbf7e0380e2bffbb44d394e9751e1578afcf
2022-06-08 19:10:13 -04:00
Takashi Kajinami 40b290fd58 Migrate jobs from CentOS 8 to CentOS 8 Stream
CentOS 8 is being removed from CI because of its EOL[1].

[1] http://lists.openstack.org/pipermail/openstack-discuss/2022-January/026621.html

Change-Id: I5867be3e61121891a66f076c922a32bd586dc428
2022-01-12 09:50:28 +09:00
tushargite96 e4a3489557 Updating python testing as per Yoga testing runtime
Yoga testing runtime[1] has been updated to add py39
testing as voting and as we are testing py3.6 and py3.9
we do not need to test py3.7|8 explicitly. Unit tests update are
handled by the job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit makes other required changes in zuul.yaml and
update the classifier in setup.cfg file.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: I0aa758c8728bb3c35a148b35a1a0bc9b7245f97c
2021-12-14 12:59:18 +05:30
Zuul 4f4c8c15f5 Merge "Add privsep support" 2021-06-22 00:11:18 +00:00
Gorka Eguileor cf638c41f6 Add privsep support
Cinderlib does not support Cinder drivers that make use of the privsep
library.

Originally privsep had a limitation that would serialize all requests,
so slow operations would create a bottleneck, thus cinderlib decided not
to use privsep and call the commands directly.

Since privsep no longer serializes requests we stop going around privsep
and use it.

Cinderlib is a library that works when run in a virtual environment, so
we must maintain backward compatibiliy and still support it, which is
problematic, because with Cinder's rootwrap+privsep we require
/etc/cinder/rootwrap.conf and /etc/cinder/rootwrap.d to exist, but under
a virtual env these are installed in the virtualenv's etc
directory instead.  For example: .tox/py37/etc/cinder/rootwrap.conf

This configuration file is modified to point to the right filters
directory and add the virtual env's bin directory to exec_dirs.

We also take into account if we have installed cinder as editable in our
virtual environment, because in that case files are not installed, and
we will copy them from the source's directory into the virtual
environment so we can freely modify them.

Depends-On: https://review.opendev.org/737312
Closes-Bug: #1883720
Change-Id: I7963fbfbb0a683e3efcc5949f80b96e5daaa18f1
2021-06-18 15:12:24 +02:00
Ghanshyam Mann 9f72ebed49 [goal] Migrate cinderlib jobs to focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Move ceph functional job to focal nodeset.

Depends-On: https://review.opendev.org/#/c/731207/
Depends-On: https://review.opendev.org/#/c/743083/

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-fo$

Change-Id: I7da5c1c8dddfa19d08cdb28b2a5b5fddb470b655
Story: #2007865
Task: #40179
2020-11-09 18:21:41 +00:00
Gorka Eguileor 6ad3c4a19c Fix cinderlib-lvm-functional
In change-id I867c972d9f712c0df4260ebc8211b786006ed7a2 the os-brick
library added a new binary dependency, lsscsi, and now the cinderlib lvm
functional tests and tempest with lvm are failing because they cannot
find the package.

The reason why the CI didn't fail on the patch is because devstack
installs the bindeps of the projects installed from source, but Zuul
doesn't do the same for the "required-projects".

To solve this issue an prevent future gate breaks this patch uses the
bindep zuul role to install os-brick missing packages before running any
of its functional jobs.

For the tempest lvm job we install os-brick from source, which makes
devstack automatically install bindeps from the project.

Change-Id: Ieb4e94850a1705a5d2b36a9a963646f10250e811
2020-08-07 14:46:23 +02:00
Luigi Toscano d982db6264 Fix and improve cross-project functional testing
Make sure stestr is executed using the python interpreter set inside
the virtualenv, otherwise the libraries installed there may not
found. This is due to the fact that (stestr default shebang points
to system python when installed through devstack and the functional
tox target uses that version thanks to sitepackages=True.
The sitepackages option  must be used to find a few system ceph/python
libraries not available on pypi.

Setting PATH is not really needed nowadays, so remove the custom
workaround. It is worth noting that the hack would not be needed anymore
and PATH could be set through setenv (extending {env:PATH}).

As cinderlib changes can break cinder and cinder-tempest-plugin,
and they indeed did it in the past, so ensure that everything works
by running cinder-tempest-plugin-lvm-lio-barbican.

Change-Id: I40ef42b4224521abed00b3b210418ec96c1116ea
2020-07-15 15:24:49 +02:00
Gorka Eguileor 3db2b2a854 Fix CI jobs
Cinder added a new restriction to the snapshots in the DB in change
I47ff8115ae74e1a7ad41869159871ba614c388ac and now snapshot's
volume_type_id cannot be null.

This broke the cinderlib CI because one of our tests (test_set_snapshot
of the DBMS persistence plugin) didn't create the volume in the DB
(which can never happen in real use because it is saved on creation)
which is when the volume type gets assigned.

This patch saves the volume so that it gets a volume type and its ID can
be used by the Snapshot.

It also includes a workaround for the LVM job for
https://github.com/pypa/pip/issues/6264

Change-Id: I0993e2aab8511400247042c128dc3aa1a06486ac
2020-03-21 12:33:23 +01:00
Luigi Toscano 08108b5964 Use Python 3 by default and drop Python 2
Follow the rest of OpenStack and consistently switch to
python3 as default python interpreter and drop python2.

The "functional" tox target was failing with Python 2
as cinder/master has cut the Python 2.7 compatibility.
"functional" now points to the default python3. An explicit
"functional-py37" target has been added as well.

Fix the functional jobs as well:
- move the LVM job to centos-8 and adapt it when needed;
- move the Ceph job to ubuntu-bionic, as there are no
  CentOS 8 Ceph packages (and the CentOS 7 ones do not
  provide Python 3 bindings).

Closes-Bug: #1853372
Change-Id: Iea4f4f53df7400248848399494564910d3870f63
2020-01-10 15:03:23 +01:00
Zuul 7f61d74337 Merge "Fake unused packages" 2019-10-24 13:46:07 +00:00
Gorka Eguileor 76d0164fb0 Fake unused packages
Many packages that are automatically imported when loading cinder
modules are only used for normal Cinder operation and are not necessary
for cinderlib's execution.

One example of this happening is when cinderlib loads a Cinder module to
get configuration options but won't execute any of the code present in
that module.

This patch fakes these unnecessary packages, providing faster load
times, reduced footprint, and the possibility for distributions to
create a cinderlib package or containers with up to 40% fewer
dependencies.

Change-Id: If577b9163d4e942b701db4b2a47cd66e6bd17b6f
2019-10-21 21:28:28 +02:00
Brian Rosmaita 4bf052084e Don't run functional gates on doc-only changes
Change-Id: Id09009215e7d7d60f3fe071da7f767fd37c5d497
2019-09-05 11:05:57 -04:00
Zuul 5458df43dd Merge "Run functional tests with memory persistence" 2019-09-05 00:01:46 +00:00
Luigi Toscano 4610703e7f zuul: change the cinderlib test runner into a role
A role can be easily reused elsewhere (for example by cinder
and cinder-tempest-plugins jobs).

The role is a wrapper around the default 'tox' role.
In order to make it working, CL_FTEST_CFG needs to be
overwritable completely, otherwise it is not possible
for tests to set a full path.

Finally, whitelist stestr to avoid tox warnings.

Change-Id: I274dd1da499e320e6d63af750cacb25e01df7561
2019-07-31 16:51:37 +02:00
Corey Bryant a18218ad0d Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Iecd3efedfbe42eaeabce7e4f51a05c7ba5c3ea15
Story: #2005924
Task: #34200
2019-07-08 12:09:19 -04:00
Sahid Orentino Ferdjaoui 33b7ae1b93 add python 3.7 unit test job
See ML discussion here [1] for context.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135626.html

Change-Id: Ic399d3d317cbb8dd0e1a3201a84229e360c79b4f
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-06-10 11:14:30 -04:00
Gorka Eguileor c97367d89d Run functional tests with memory persistence
We are currently running functional tests with the memory DB persistence
plugin to ensure that the migrations run successfully, but this means
that we could be hiding issues on drivers that are not 100% compatible
with the persistence plugin mechanism, because the DB plugin still has
the SQLAlchemy implementation behind, which other plugins don't.

This patch first initializes cinderlib with the memory DB plugin to test
the DB migrations, and then replaces it with the memory plugin to ensure
driver compatibility by default.

We can still run the tests using the Memory DB persistence model setting
the CL_FTEST_MEMORY_PERSISTENCE environmental variable to false.

To ensure we are constantly testing both we run the LVM gate job with
Memory DB persistence and the Ceph gate with Memory persistence.

Related-Bug: #1821898
Change-Id: Id98c827ffadf2c47ff835afa8b0f83dddacb54fa
2019-04-12 14:00:07 +02:00
Gorka Eguileor 1bdc8fa5c1 Fix cinderlib Python package
Setuptools gives 2 errors with the current cinderlib Python package:

- Project's description-file has an unsupported directive.
- test-requirements has a github reference.

We fix the first issue by removing the git repository from the test
requirements and adding it to the Tox file while adding cinder to the
required-projects to allow cross-repo denedencies.

We also add os-brick since we are currently also very dependent on it on
the nos_brick.py code.

For the second issue we create a new DESCRIPTION.rst file that doesn't
include the "raw" directive unsupported by PyPi.

This patch will allow us to add the publish-to-pypi job to the
project-config repository.

Required-By: I9d8d9f7d802a27c3bfe3dbc0ee84cc24eee24ebc
Change-Id: Id029cedef513753700a10bcae761fdc1807964e1
2019-03-15 13:19:12 +01:00
Gorka Eguileor cd5365db2f Add zuul jobs
This patch adds the following Zuul CI jobs:

- Python 2.7 unit tests
- Python 3.6 unit tests
- Functional tests with LVM
- Functional tests with Ceph
- Publis documentation
- Release notes

Change-Id: I2f3f34c1db4716b323c48908f51500898c2c6242
2019-02-26 16:21:34 +01:00