backport of the fix for bug #1947370 make lock_path a requird config option when prvisouls it was optional

Bug #1969794 reported by sean mooney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Triaged
Low
sean mooney
os-brick
Invalid
Undecided
Unassigned

Bug Description

https://review.opendev.org/q/topic:bug%252F1947370

as part of fixing bug 1947370 (https://launchpad.net/bugs/1947370)
https://review.opendev.org/c/openstack/os-brick/+/814139
made the external lock_path config option required with no default provided

this was then backported breaking nova unit tests on stabel branches and potentially
any deployment that upgrade to a new version of os-brick without this defined.

i don't belive that such a backport is in line with stable policy and if it was to be backported
a sane default like /tmp/os_brick_lock would be required to not break existing installs.

this i currently breaking downstream unit test for redhat osp 17 and its also breaking the upstream stable wallayb unittest for nova.

it is unclear if this has directly broken any real world deployment but it has the potential too.

as noted in this revert patch https://review.opendev.org/c/openstack/os-brick/+/838871
it is trival to reproduce this

git clone https://opendev.org/openstack/nova nova-test
cd nova-test
git checkout --track origin/stable/wallaby
tox -e py3

^ this shoudl fail with the lock_path excption

cd ..
git clone https://opendev.org/openstack/os-brick os-brick-revert
cd os-brick-revert
git fetch https://review.opendev.org/openstack/os-brick refs/changes/71/838871/1 && git checkout FETCH_HEAD
cd ../nova-test
.tox/py3/bin/python3 -m pip install -e ../os-brick-revert
tox -e py3

that will no longer have the lock_path error

.tox/py38/bin/python3 -m pip install os-brick\<4.3.3

while I'm not sure the revert is the correct way to proceed we will need to blacklist the broken os-brick release in the requirement repo and come up with a backportable fix for all affected branches.

Revision history for this message
sean mooney (sean-k-mooney) wrote :

i have confirmed that the test that are failing are not setting REQUIRES_LOCKING to true so the fixture
that create a tmp dir for the file system lock is not enabled.

this was not previous required because os-brick did not use file system locks in these code paths but now that it does nova should just set that in the test setup.

ill push a patch to correct that shortly triageing this as low since it only affect untitest, real deployments would have this configured for novas file system locks.

we can likely close this os-brick bug and works round this form the nova side by backporting my patch to every release where the os-brick patch was backported.

Changed in nova:
importance: Undecided → Low
status: New → Triaged
assignee: nobody → sean mooney (sean-k-mooney)
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

To follow up on Sean's last comment, we discussed the issue of whether this was a breaking change on the release patch for the wallaby backport:

https://review.opendev.org/c/openstack/releases/+/829590

Both nova and cinder already use external locks and require lock_path to be configured; see for example the installation instructions for nova and cinder. So in real deployments, this won't be an issue.

We don't set a default value because there's really no sensible default.

Changed in os-brick:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.