Monday, 2023-07-31

opendevreviewKe Niu proposed openstack/glance master: Use py3 as the default runtime for tox  https://review.opendev.org/c/openstack/glance/+/88983202:50
opendevreviewKe Niu proposed openstack/glance_store master: Use py3 as the default runtime for tox  https://review.opendev.org/c/openstack/glance_store/+/88983302:57
whoami-rajatabhishekk, do you mean this comment? https://review.opendev.org/c/openstack/glance/+/886749/9/glance/async_/flows/location_import.py#12609:30
abhishekkwhoami-rajat, yep09:50
whoami-rajatabhishekk, ack, looking09:50
abhishekkack09:50
whoami-rajatabhishekk, shouldn't the state be set to importing in the _CalculateHash task? It seems strange that we are setting it to importing after the whole hash calculation step which is a long running task09:54
abhishekkwe defined state transition in spec, I think it is right as per the spec09:58
abhishekkhttps://review.opendev.org/c/openstack/glance-specs/+/883491/8/specs/2023.2/approved/glance/new-location-info-apis.rst09:58
abhishekkline 10009:58
* abhishekk going afk10:02
whoami-rajatabhishekk, I'm not so sure, there are 2 cases 1) validation data is not provided 2) validation data is provided 10:02
whoami-rajatfor 1) we set the image to active state and calculate the hash in background10:02
whoami-rajatfor 2) the initial state is 'queued', then we start calculating the hash and the state is 'importing' and finally when hash is calculated and set, the state is 'active'10:02
abhishekkyes I think that importing needs to be set earlier, you can add comment on the patch10:05
abhishekkI think to avoid conflict pranali has set it in verify task, but yeah, that need to be set in calculate hash which will also avoid the potential race10:06
abhishekkSo make it simpler similar to _SetImageToActiveTask need to add _SetImageToImportingTask or refactor it to _SetImageTransition and use it twice in the flow10:08
abhishekkwhoami-rajat, add your comment on the patch10:09
* abhishekk going away now10:10
dansmithwhoami-rajat: doing it anywhere in the task doesn't solve the atomicity concern though13:35
whoami-rajatdansmith, yes correct, but at least it lowers the window for a race, allowing hashing to be done in queued state provides a long window for other operations to occur on that image19:04
dansmitha small bit, but not enough on a busy cloud. I added atomic operations for this purpose, so we should use them (*and* set to importing at the start so a client knows it's progressing)19:04

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!