Tuesday, 2025-05-27

mhencroelandt: thank you. I reported the bug here: https://bugs.launchpad.net/python-openstackclient/+bug/211177706:45
opendevreviewAbhishek Kekane proposed openstack/glance master: [WIP] Cancel hashing op during image deletion  https://review.opendev.org/c/openstack/glance/+/95085310:37
croelandtabhishekk: so RBD still cannot delete the image after the hash computation has been cancelled?14:11
abhishekkcroelandt: I think we need to remove the workaround we have added in location_import HashCalculationTask, also we need to find out a way to abort the task execution or add some sleep time in delete method 14:17
dansmithI think the implementation in the patch is not doing what we think14:19
dansmithI'm working on comments now14:19
dansmithI had a beautiful and efficient implementation all written out for you, and then I remembered glance has process workers :/14:20
croelandtabhishekk: I wonder why exiting the hash calculation is not enough14:21
croelandtdoes that not end the task?14:21
abhishekkI have added logs locally to check the hash calculation terminated or not14:21
dansmithcroelandt: it has to end it within 5s or the originator will try anyway14:21
abhishekkIt does end that task and then goes to next task in the flow14:21
croelandtand is there another task in that flow?14:22
abhishekkI will wait for comments before removing these 3 lines14:23
abhishekkhttps://github.com/openstack/glance/blob/master/glance/async_/flows/location_import.py#L10614:23
dansmithI think using memcache here is not reasonable14:23
abhishekkyes there is more task in the flow14:23
dansmithit will mean every single person has to deploy with memcache to get proper glance behavior14:23
abhishekkdb call then?14:23
dansmithit's also not necessary, and the proxying in this patch is wrong which is one of the reasons why memcache seems necessary14:23
dansmithjust let me finish comments :)14:24
abhishekkack14:24
abhishekkdansmith: going through your comments, I thought of using file, but found that we have memcached_server parameter configured in keystone_authtoken so instead went for using it14:53
abhishekkALSO what should be the DATA_DIR, should it be hardcoded path or something else?14:53
dansmithit would require memcache to be deployed all the time in order for glance to work properly, so that's not ideal14:53
dansmithand also, the synchronization is only within a single worker (if you do the proxy properly) so no need to depend on memcache so two processes on the same node can communicate14:54
dansmithabhishekk: we already have some directory where glance writes data files right?14:54
abhishekkos_glance_staging_dir in case import is enabled or os_glance_tasks_dir?14:55
dansmithsure14:56
abhishekkack14:57
abhishekkjust few questions related to your comments on registry.py15:06
abhishekkThe register_operation should be called from hash calculation task, right?15:07
abhishekkand is_canceled we should check file contains the operation_id written in it?15:11
abhishekkmay be signal_cancel is removing the file which means we don't continue hash calculation15:13
dansmithabhishekk: sorry, you didn't mention my nick so I didn't see this.. just replied15:47
abhishekkno worries15:47
dansmithyou need a way to signal it's running (file exists), signal to cancel (write), signal that it's stopped (file deleted)15:47
abhishekkack, three signals ;)15:51
croelandtabhishekk: took a while to review https://review.opendev.org/c/openstack/glance/+/948455 but it's amazing how much you refactored! I just have a question about the bump of a timeout, but it looks great otherwise15:55
abhishekkack, replied15:58
croelandtok let's approve that16:04
opendevreviewMerged openstack/glance stable/2024.2: Fix vTPM metadefs.  https://review.opendev.org/c/openstack/glance/+/94851616:46
opendevreviewMerged openstack/glance master: Functional tests migration of TestImageMultipleBackend  https://review.opendev.org/c/openstack/glance/+/94845517:09
croelandtrosmaita: you'll be pleased to know abhishekk removed your "glance is dead sexy" comment from 201817:13
croelandtwe're no longer sexy :-(17:14
abhishekk:-(17:14
abhishekkdansmith: writing unit tests for the code you provided, but I am failing to mock external_lock method as it is used for module level method19:07
abhishekkhttps://paste.opendev.org/show/bqKtyrwaY6XE7xIDGk8z/19:07
abhishekkUnless I move the import line inside setup, I am not able to find any suitable option19:08
dansmithabhishekk: just do mock.object(glance_module, 'LOCK')19:35
abhishekkthis at module level?19:35
dansmithno I mean in your test, but I guess the problem is because it's used as a decorator during import time as well19:36
dansmithjust change it to "with LOCK" in the bodies of those functions19:36
dansmithor better yet, put that stuff in a class instead of module-level like you had it, use self._lock and then you can control it better in testing19:36
dansmithmake it a singleton in the usual pattern19:36
abhishekkack19:37
dansmiththis is a common thing for making tests work, I am sure you can figure out a way19:37
abhishekkworking on it19:37
opendevreviewAbhishek Kekane proposed openstack/glance master: Add task cancellation tracker utility  https://review.opendev.org/c/openstack/glance/+/95103120:24

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