Parallel image download fails with cinder backned because attachment state manager uses thread locks but glance uses the code from worker processes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glance_store |
In Progress
|
Undecided
|
Mitya Eremeev |
Bug Description
The locking scheme in /glance_
Environment:
* single node devstack from master
* cinder configured as glance backend
The default devstack config creates two glance worker processes:
stack@aio:
stack 286892 1 286892 0 1 13:29 ? 00:00:00 glance-apiuWSGI master
stack 286914 286892 286914 0 4 13:29 ? 00:00:02 glance-apiuWSGI worker 1
stack 286914 286892 286986 0 4 13:29 ? 00:00:00 glance-apiuWSGI worker 1
stack 286914 286892 287000 0 4 13:29 ? 00:00:00 glance-apiuWSGI worker 1
stack 286914 286892 287440 0 4 13:34 ? 00:00:00 glance-apiuWSGI worker 1
stack 286915 286892 286915 0 5 13:29 ? 00:00:02 glance-apiuWSGI worker 2
stack 286915 286892 286984 0 5 13:29 ? 00:00:00 glance-apiuWSGI worker 2
stack 286915 286892 286998 0 5 13:29 ? 00:00:00 glance-apiuWSGI worker 2
stack 286915 286892 287199 0 5 13:29 ? 00:00:00 glance-apiuWSGI worker 2
stack 286915 286892 287441 0 5 13:34 ? 00:00:00 glance-apiuWSGI worker 2
* I've added some delay to the cinder driver in glance_store to slow down the image download to ease the reproduction of the race condition
* I've applied https:/
* Started two parallel image downloads with a script:
rm /opt/stack/
openstack image save 78267329-
openstack image save 78267329-
wait
* It produced the following error in glance:
Mar 20 13:29:48 aio <email address hidden>[286914]: ERROR glance_
Mar 20 13:29:48 aio <email address hidden>[286914]: ERROR glance_
Mar 20 13:29:48 aio <email address hidden>[286914]: ERROR glance_
Mar 20 13:29:48 aio <email address hidden>[286914]: ERROR glance_
Mar 20 13:29:48 aio <email address hidden>[286914]: ERROR glance_
Mar 20 13:29:48 aio <email address hidden>[286914]: ERROR glance_
Mar 20 13:29:48 aio <email address hidden>[286914]: ERROR glance_
Mar 20 13:29:48 aio <email address hidden>[286914]: ERROR glance_
See the full log in https:/
description: | updated |
Changed in glance-store: | |
assignee: | nobody → Mitya Eremeev (mitos) |
status: | New → In Progress |
Hi,
* I've added some delay to the cinder driver in glance_store to slow down the image download to ease the reproduction of the race condition
could you specify where did you add delays ?