OpenStack Block Storage (Cinder)
Go to file
Gorka Eguileor 1c3cda154f Fix sporadic cleanup unit test failure
From time to time we see unit test
test_do_cleanup_not_cleaning_already_claimed_by_us failing at the gate
with error:

    testtools.matchers._impl.MismatchError: 1 != 0

This happens because the test was assuming that the machine running the
code would get different times in consecutive utcnow() calls, which
sometimes is not the case if the machine is fast.

The places where the call is expected to have different values are:

- When the test assigns original_time
- When the test assigns other_thread_claimed_time
- When cinder.manager.CleanableManager.do_cleanup assigns until

This patch fixes this issue by simulating that:

- worker1 entry was created in the past (original_time is T-1)

- db's worker_get_all is mocked to simulate that worker2 entry was
  created in the past (T-1)

- simulate that another thread has picked up the worker2 entry by
  writing a newer time in the DB (other_thread_claimed_time)

- making sure that the do_cleanup method uses a time between these two
  (T)

This way we will no longer rely on the values returned by utcnow().

Change-Id: I45f1a057151e749e8c44f266ec8b41a80761ebec
2021-04-14 20:11:23 +02:00
api-ref/source Merge "api-ref: Don't list HTTP 500 for backup create" 2021-03-19 22:09:11 +00:00
cinder Fix sporadic cleanup unit test failure 2021-04-14 20:11:23 +02:00
contrib/block-box Add note that block-box is not supported 2020-01-10 08:37:54 -06:00
doc Add quota utils to cinder-manage 2021-03-30 16:20:35 +02:00
etc/cinder Delete TSM Backup driver 2020-11-03 18:53:39 +02:00
playbooks zuul: collect cinderlib logs from tempest node(s) only 2020-07-16 14:42:29 +02:00
rally-jobs Small doc updates: canonical URLs, rally doc, etc 2019-06-04 17:57:16 +02:00
releasenotes Merge "Add warning message about slow volume backend" 2021-04-08 07:10:05 +00:00
tools Merge "tox mypy: Call mypywrap.sh directly" 2021-02-19 21:26:28 +00:00
.coveragerc Update .coveragerc after the removal of openstack directory 2016-10-17 19:09:37 +05:30
.gitignore Add mypy tox env 2020-10-14 08:24:13 -04:00
.gitreview OpenDev Migration Patch 2019-04-19 19:26:48 +00:00
.pylintrc Pylint: Filter out cinder.objects and requests E1101 2019-02-21 13:28:44 -05:00
.stestr.conf Add .stestr.conf configuration 2017-10-10 00:46:42 +00:00
.zuul.yaml Merge "add openstack-python3-wallaby-jobs-arm64 job" 2021-03-20 07:49:56 +00:00
CONTRIBUTING.rst Ussuri contrib docs community goal 2020-03-05 14:11:48 -05:00
HACKING.rst Update HACKING document to match current checks 2020-04-17 15:09:13 +00:00
LICENSE Initial fork out of Nova. 2012-05-03 10:48:26 -07:00
README.rst Merge "Refactor README links" 2020-01-22 11:44:36 +00:00
bindep.txt bindep: Track qemu-img dependency 2020-08-19 15:00:35 +00:00
driver-requirements.txt Add ceph iscsi volume driver 2021-01-28 08:22:13 -05:00
lower-constraints.txt Use os-brick 4.3.1 2021-03-29 12:05:49 -04:00
mypy-files.txt mypy: annotate volume manager 2021-02-10 12:27:47 -05:00
reno.yaml Fix invalid yaml in reno template 2021-03-11 10:35:46 -05:00
requirements.txt Use os-brick 4.3.1 2021-03-29 12:05:49 -04:00
setup.cfg Add ceph iscsi volume driver 2021-01-28 08:22:13 -05:00
setup.py Cleanup py27 support 2020-04-17 14:47:10 +02:00
test-requirements.txt Use os-brick 4.3.0 2021-03-25 13:15:43 -04:00
tox.ini Changed whitelist to allowlist in tox 2021-03-17 11:08:56 +05:30

README.rst

OpenStack Cinder

image

OpenStack Cinder is a storage service for an open cloud computing service.

You can learn more about Cinder at:

Getting Started

If you'd like to run from the master branch, you can clone the git repo:

git clone https://opendev.org/openstack/cinder

If you'd like to contribute, please see the information in CONTRIBUTING.rst

You can raise bugs on Launchpad

Python client

Python Cinderclient