OpenStack Block Storage (Cinder)
1c3cda154f
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 |
||
---|---|---|
api-ref/source | ||
cinder | ||
contrib/block-box | ||
doc | ||
etc/cinder | ||
playbooks | ||
rally-jobs | ||
releasenotes | ||
tools | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.pylintrc | ||
.stestr.conf | ||
.zuul.yaml | ||
bindep.txt | ||
CONTRIBUTING.rst | ||
driver-requirements.txt | ||
HACKING.rst | ||
LICENSE | ||
lower-constraints.txt | ||
mypy-files.txt | ||
README.rst | ||
reno.yaml | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
OpenStack Cinder
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