Earlier  
Posted Nick Remark
#openstack-nova - 2022-08-02
10:11:42 gibi and the the non remoteable can call the remoteable
10:11:57 gibi sean-k-mooney: you are a genius, thanks
10:12:07 sean-k-mooney normally we would do that the other way around
10:12:15 sean-k-mooney what exactuly are you tryign to do by the way
10:12:44 gibi I need to prevent instance.save to persist things if the instance is under mutated migration context
10:12:50 gibi so I need a flag on the instance object
10:12:58 gibi but the mutation happens on the local instance
10:13:03 gibi while save runs on the remote instance
10:13:09 sean-k-mooney you can add filed to the instance object directly
10:13:17 sean-k-mooney they wont be saved or sent over the wire
10:13:27 gibi the second is the problem
10:13:31 sean-k-mooney as in "instnace.my_flag=True"
10:13:33 gibi the save runs on the remote
10:13:54 gibi so I need to send the flag on the wire (or check the flag on the local side during save, hence the question)
10:14:06 sean-k-mooney if you want it to be a noop do you
10:14:14 sean-k-mooney you dont want it to save
10:14:25 gibi context in here https://review.opendev.org/c/openstack/nova/+/851832
10:14:28 sean-k-mooney so add a decorator that checks if its set on teh souce
10:14:35 sean-k-mooney and just dont forward if the flag is set
10:14:37 gibi hm
10:14:46 gibi that also possible
10:14:55 gibi if I decorate before the remoteable decorator
10:15:03 gibi then I can inject thing to the local side
10:15:05 sean-k-mooney yep it need to be the other decorator
10:15:13 sean-k-mooney yes
10:15:20 sean-k-mooney and avoid the rpc entirly
10:15:24 gibi ack, thanks
10:15:30 gibi you answered my question
10:15:41 sean-k-mooney :)
10:16:23 sean-k-mooney i think we already do this on the instance object by the way. we cachce some things in the object in memory via filed that are never sent on the wire
10:20:25 gibi I will go with a normal function instead of a wrapper applied by a decorator, as the actual logic is highly save + migration context specific
10:20:45 gibi I will do save() -> remoted_save() indirection
10:21:14 sean-k-mooney hum the issue witht that is you are moving the remoteable decorator to remote_save
10:21:26 sean-k-mooney isnt that a problem
10:22:28 gibi the decorator would do the same technically as the function returned from the decorator would be different
10:22:38 gibi I believe it will not be a problem, but we will see
10:22:51 sean-k-mooney i think it might cause issue for grenade
10:23:04 sean-k-mooney it woudl technically be an rpc change i think
10:23:31 sean-k-mooney the decorator would not alter the name of the remote rpc endpoint for the function
10:23:58 sean-k-mooney it would still be save not remote_save()
10:24:34 gibi ahh
10:24:53 gibi why we are too clever with these namings
10:24:54 gibi ?!
10:25:08 gibi but you are right
10:25:22 gibi the incoming save might fail
10:25:24 gibi hm
10:25:38 sean-k-mooney you can add a try_save()
10:25:39 gibi actually the incoming save RPC will call Instance.save that will do the checks again
10:25:43 sean-k-mooney function that delegate to save
10:25:56 sean-k-mooney try_save can check if it should save and then call save
10:26:17 gibi try_save is bad as I don't want to replace all the instance.save calls with instance.try_save
10:26:36 gibi but I need the check at every instance.save call
10:26:37 sean-k-mooney ya that was what i was about to say you would have to do that
10:26:59 sean-k-mooney so the only ohte way to do this if you dont use a decorator
10:27:22 sean-k-mooney is to have the context manage replace instance.save within it
10:27:25 sean-k-mooney which is kind of messy
10:28:33 gibi as the decorator is applied both on the local and on the remote side with the decorator we also call the extra check twice. I think the effect is the same either if I use the decorator or a save -> remote_save indirection
10:28:38 gibi but I will try it out after lunch
10:28:41 gibi thanks again
10:29:11 sean-k-mooney cool let me knwo how it goes, enjoy lunch
10:29:17 gibi thanks
11:07:08 opendevreview Elod Illes proposed openstack/nova stable/rocky: Move 'check-cherry-picks' test to gate, n-v check https://review.opendev.org/c/openstack/nova/+/804654
11:22:00 opendevreview sean mooney proposed openstack/nova master: enable blocked VDPA move operations https://review.opendev.org/c/openstack/nova/+/832330
11:36:53 opendevreview Elod Illes proposed openstack/nova stable/wallaby: Gracefull recovery when attaching volume fails https://review.opendev.org/c/openstack/nova/+/829434
11:54:20 opendevreview Balazs Gibizer proposed openstack/nova master: Avoid saving instance under mutated migration context https://review.opendev.org/c/openstack/nova/+/851832
11:54:20 opendevreview Balazs Gibizer proposed openstack/nova master: Prevent instance.save() under mutated migration context https://review.opendev.org/c/openstack/nova/+/850746
11:54:53 gibi sean-k-mooney[m]: locally this works ^^ lets see if it passes tempest and grenade
11:55:05 gibi dansmith_: meanwhile with sean-k-mooney[m] we figured a solution for my question ^^
12:07:07 artom gibi, I have a concern on https://review.opendev.org/c/openstack/nova/+/851832 - does it sound legit to you? I'm not too sure myself...
12:55:01 opendevreview Merged openstack/nova master: [docs] Fix mention of custom scheduling after Wallaby https://review.opendev.org/c/openstack/nova/+/851807
12:55:26 opendevreview Guillaume Espanel proposed openstack/nova master: Skip useless qemu-img convert when snapshotting https://review.opendev.org/c/openstack/nova/+/851854
13:00:10 gibi artom: you and sean-k-mooney[m] both raised this, I'm waiting for grenade to prove that it is a real problem or not. If it is then the only way to keep this work is to decorate save() to modify it so the name is kept.
13:00:41 gibi I'm not sure how the names of the RPC is mapped
13:01:03 gibi in you example you need an old conductor
13:01:17 gibi but I think we say, upgrade your control service first
13:01:28 sean-k-mooney gibi: dansmith_ might be able to help you figure that out but i can point to where that is done of the top of my head
13:01:31 gibi so in theory the conductor will have both save and _remote_save
13:01:47 gibi during a rolling upgrade
13:01:56 gibi old computes will call save over RPC and that exists
13:02:08 gibi new computes probably will call _remote_save and that also exists in a new conductor
13:02:24 gibi sean-k-mooney: ack
13:23:25 artom gibi, for a major version upgrade, yeah, control tier first, so it's not a problem
13:23:31 artom It's only a problem if we backport
13:23:43 sean-k-mooney[m] my laptop over heated again
13:24:21 sean-k-mooney[m] ill be upstream only for a bit while it cools down and i get the vpn set up elsewhere
13:25:03 artom Pour mineral oil in your bathtub and dunk your laptop in there?
13:28:48 gibi artom: hm, if we backport then both the old and the new side will have both save and _remote_save so I don't see the problem about the backport either
13:29:26 opendevreview Radosław Piliszek proposed openstack/nova stable/yoga: [docs] Fix mention of custom scheduling after Wallaby https://review.opendev.org/c/openstack/nova/+/851870
13:32:11 opendevreview Balazs Gibizer proposed openstack/nova master: Remove double mocking https://review.opendev.org/c/openstack/nova/+/851445
13:32:11 opendevreview Balazs Gibizer proposed openstack/nova master: hacking: force explicit import of python's mock https://review.opendev.org/c/openstack/nova/+/708768
13:32:12 opendevreview Balazs Gibizer proposed openstack/nova master: Remove the PowerVM driver https://review.opendev.org/c/openstack/nova/+/850346
13:33:52 kashyap gibi: Thx for cleaning up the PowerVM!
13:34:00 gibi that wasn't me
13:34:03 gibi I just rebased
13:34:09 kashyap Err, stephenfin++ :)
13:34:23 kashyap What a diffstat: +10 -9350
13:45:39 dansmith_ artom: gibi sean-k-mooney[m]: I'm really -2 on that approach in general, but -1 for politeness
13:46:17 opendevreview Elod Illes proposed openstack/nova stable/train: DNM: test preinstall of python3-yaml https://review.opendev.org/c/openstack/nova/+/851861
13:46:32 dansmith_ gibi: to answer your question, the methods are mapped automatically, which means it's a problem for minor and major upgrades as artom noted, and why you can't find the method mapping
13:46:48 gibi dansmith: thanks for the feedback

Earlier   Later