*** mhen_ is now known as mhen | 01:24 | |
opendevreview | Abhishek Kekane proposed openstack/glance-specs master: Add spec to provide image size in advance https://review.opendev.org/c/openstack/glance-specs/+/947423 | 05:05 |
---|---|---|
opendevreview | Takashi Kajinami proposed openstack/glance-tempest-plugin master: Remove stable/2023.2 job https://review.opendev.org/c/openstack/glance-tempest-plugin/+/951232 | 05:52 |
opendevreview | Abhishek Kekane proposed openstack/glance master: Add task cancellation tracker utility https://review.opendev.org/c/openstack/glance/+/951031 | 14:17 |
abhishekk | dansmith: regarding your comment on 888, https://review.opendev.org/c/openstack/glance/+/950853/5/glance/api/v2/images.py | 14:50 |
abhishekk | I was trying to avoid waiting and raising error, but if you are OK with waiting for one minute and catch the error and LOG something then I will do that | 14:51 |
dansmith | why will it wait? | 14:52 |
abhishekk | with open(operation_path, 'w') as f: | 14:52 |
abhishekk | this will create the new file if not present, right? | 14:52 |
dansmith | oh, I see, you need to check that it exists first | 14:52 |
dansmith | that's why you have the lock, so you can check for exists, and write to it atomically | 14:53 |
dansmith | I'm sure that was in my original comment, no? | 14:53 |
abhishekk | I have the lock there but it is not for waiting | 14:53 |
dansmith | oh it wasn't, my bad | 14:54 |
abhishekk | the lock will be hold until it's write to that file | 14:54 |
dansmith | the lock is so you can check for exists, and if exists, then write to it | 14:54 |
dansmith | since python doesn't have the ability (without using open) to only write a file if it exists | 14:54 |
dansmith | in C I would have done O_WRONLY without O_CREAT to fail atomically if the file didn't exist, but we can't do that in python easily | 14:55 |
abhishekk | right, we are using that while registering the operation | 14:55 |
dansmith | sorry I meant to have that in my original example code, but I rewrote it several times in a gerrit comment :) | 14:55 |
abhishekk | So I will keep that condition as it is as of now | 14:56 |
abhishekk | no worries | 14:56 |
dansmith | no, you need to check exists before the write | 14:56 |
abhishekk | ack, | 14:57 |
dansmith | or you can convert to using open, your call | 14:58 |
abhishekk | ack, will do the changes accordingly | 14:58 |
dansmith | honestly with the lock you could probably just avoid using open in register too | 14:59 |
abhishekk | yep | 15:06 |
opendevreview | Abhishek Kekane proposed openstack/glance master: Add task cancellation tracker utility https://review.opendev.org/c/openstack/glance/+/951031 | 17:07 |
opendevreview | Abhishek Kekane proposed openstack/glance master: [WIP] Cancel hasing operation if image is deleted https://review.opendev.org/c/openstack/glance/+/950853 | 17:07 |
frickler | glance unit tests are failing with latest oslo,limits, didn't check yet which side might be to blame https://zuul.opendev.org/t/openstack/build/6a73c8b86e8f4a50840acbf1d717492d | 20:51 |
opendevreview | Brian Rosmaita proposed openstack/glance master: Get ready for oslo.limit 2.7.0 https://review.opendev.org/c/openstack/glance/+/951351 | 23:29 |
rosmaita | frickler: ^^ | 23:29 |
Generated by irclog2html.py 4.0.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!