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 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
tushargite96 2715218e2b Update metadata in setup.cfg
maintaining setup.cfg as per other repos[1]

[1] https://review.opendev.org/c/openstack/cinder-tempest-plugin/+/828475

Change-Id: I2f2d0502c26ce91a88237aa4cc4a50df036cf803
2022-09-16 09:52:40 +00:00
Gorka Eguileor 4d784d23a9 Fix privsep issues inside virtual env
When a virtual environment is created with the "--system-site-packages"
option and privsep is installed on the system privsep will only use the
system packages and completely ignore the ones in the virtual
environment.

This results in errors such as the ones we see:

- In the Ussuri gate: ModuleNotFoundError: No module named
  'os_brick.privileged.rootwrap'

- In the Wallaby gate: ModuleNotFoundError: No module named
  'os_brick.privileged.nvmeof'

This happens because os-brick and cinder are starting privsep using the
"privsep-helper" mechanism, and privsep was not installed in the virtual
env because it was already present system wide, so the "privsep-helper"
that is executed is the one from "/usr/local/bin/privsep-helper".

This python script "privsep-helper" ignores the virtual environment and
forces usage of the system's python, for example in a Wallaby
installation this could be "#!/usr/bin/python3.6".

Since it ignores the virtual environment it won't use its packages and
anything that's not present on system wide will not be found, and if
found it may be executing different code.

This patch fixes this issue by replacing the helper used to start
privsep with our own command.

This command is the same as the one usually installed in /usr/local/bin
but using /usr/bin/env to select the python to use.

This new script has been included as data in the cinderlib namespace
instead of making it install as a system script (like the original
privsep command) because we don't want to polute the system wide
binaries directory just for a corner case.

We also need to preserve user site-packages for the running Python when
calling root from the virtual environment, since the packages installed
on the virtual environment with "--system-site-packages" would have
taken those into consideration during the installation and not the ones
present on the root user.

To help debug issues at the gate all functional tests are now running
with debug logs.

Change-Id: I0278b42785d14f92a521e6deff872dcba6505270
Related-Bug: #1958159
Closes-Bug: #1979534
2022-06-24 15:26:48 +02:00
Takashi Kajinami 2b661a7b44 setup.cfg: Replace dashes by underscores
Since setuptools v54.1.0[1], the parmeters with dash have been
deprecated in favor of the new parameters with underscore.

This change updates the parameters accordingly to avoid the warnings
like the example below.

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I3174f715be88ed7cd5047931f74c0ff82117f52b
2022-02-06 01:40:06 +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
Andreas Jaeger 186bc1c44b Cleanup py27 support
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg:
  * Wheel is not needed for python 3 only repo
  * Some other sections are obsolete
- Update classifiers

Change-Id: Ib1a0622e256b91d2d217e0406967b05f432418e3
2020-04-04 17:29:41 +02: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
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
Gorka Eguileor 37c085fd6c Add DevStack plugin
This patch adds a DevStack plugin to cinderlib so it can be installed
directly by DevStack and used for CI jobs as well as development.

When installing it will also get the Cinder configuration and generate a
.py file with the right initialization of the different backends that
have been configured in /etc/cinder/cinder.conf by the DevStack Cinder
job and its plugins.

Change-Id: I12f6b0e1bc047f1915e4f7532ea59495477f9b4a
2019-03-20 18:34:16 +01: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
Gorka Eguileor 77f399fd96 Format as a Cinder-related OpenStack project
Since we are going to be importing the project into OpenStack we need it
to follow the same structure as the other projects under the Cinder
umbrella.
2019-02-19 16:28:03 +01:00
Gorka Eguileor 49554c7386 Bump version: 0.3.8 → 0.3.9 2019-02-18 17:07:06 +01:00
Gorka Eguileor 44dd49643b Bump version: 0.3.7 → 0.3.8 2019-02-15 12:56:12 +01:00
Gorka Eguileor 5817b957e9 Bump version: 0.3.6 → 0.3.7 2019-02-05 20:37:18 +01:00
Gorka Eguileor 6f0e451c83 Bump version: 0.3.5 → 0.3.6 2019-02-04 16:44:26 +01:00
Gorka Eguileor b13e7ef735 Bump version: 0.3.4 → 0.3.5 2019-02-03 12:19:06 +01:00
Gorka Eguileor a9b4466904 Bump version: 0.3.3 → 0.3.4 2019-01-26 16:09:03 +01:00
Gorka Eguileor bf6aa77737 Bump version: 0.3.2 → 0.3.3 2019-01-24 17:21:30 +01:00
Gorka Eguileor bced31ff3b Bump version: 0.3.1 → 0.3.2 2019-01-22 20:17:21 +01:00
Gorka Eguileor a2b2324a3d Bump version: 0.3.0 → 0.3.1 2019-01-16 16:18:49 +01:00
Gorka Eguileor 5dbf7528f6 Bump version: 0.2.2 → 0.3.0 2019-01-14 17:15:12 +01:00
Gorka Eguileor fe4d66a024 Bump version: 0.2.2.dev0 → 0.2.2 2018-08-24 17:34:12 +02:00
Gorka Eguileor bd3ff23a8d Bump version: 0.2.1 → 0.2.2.dev0 2018-07-04 20:18:45 +02:00
Gorka Eguileor 65977d1dbe Support PEP 440 version scheme
Allow specifying x.y.z.dev0

Now when we bump a minor it will automatically bump to dev.

current_version = 0.2.1
$ bumpversion patch
new_version = 0.2.2.dev0

If we want to release from any dev version:

$ bumpversion dev=4
2018-07-04 20:18:44 +02:00
Gorka Eguileor b7cee8b9bd Bump version: 0.2.0 → 0.2.1 2018-06-14 20:30:44 +02:00
Gorka Eguileor 8c2865285c Bump version: 0.1.0 → 0.2.0 2018-06-14 18:59:54 +02:00
Gorka Eguileor 132d08a894 Initial commit 2017-11-03 16:45:13 +01:00