Earlier  
Posted Nick Remark
#openstack-nova - 2022-05-19
11:53:23 gibi OK
11:53:23 sean-k-mooney that is ambiquious
11:53:32 gibi let me fix that
11:53:41 sean-k-mooney that could mean AZ="None" or AZ=null
11:54:03 sean-k-mooney cool
11:54:05 gibi done
11:55:11 gibi yepp thanks for the quotes
11:56:03 sean-k-mooney so yes that is what i was thinking
11:56:07 gibi cool
11:56:18 sean-k-mooney i was also thinking of just leaving the host->az check to the schduler
11:56:36 sean-k-mooney we could do it in the api if we want too
11:56:49 gibi Uggla, bauzas, dansmith: please check the table in https://etherpad.opendev.org/p/unshelve-to-host#L166 at least Sean and I agree on that now
11:56:55 sean-k-mooney but we could jsut convert the no valid host to a better error
11:57:36 gibi yeah, good point
11:57:49 gibi that will be NoValid host if we not check in the api
11:57:51 gibi but that is fine
11:58:34 sean-k-mooney im going to get coffee quickly brb
12:00:56 gibi sean-k-mooney: about the unbind, stephenfin's patch just shows that unbind removes the device_id from the port so we cannot bindly unbind at offload
12:05:41 sean-k-mooney gibi: that is not an unbind then
12:05:58 gibi the function is called unbind :)
12:06:00 sean-k-mooney at least not at the nutron api level
12:06:06 sean-k-mooney right its miss named
12:06:17 sean-k-mooney that is unbind_and_detach
12:06:18 gibi https://review.opendev.org/c/openstack/nova/+/842528/2/nova/network/neutron.py#616
12:06:49 sean-k-mooney ya that function should be renamed
12:06:58 sean-k-mooney that is actully a detach
12:07:18 sean-k-mooney its a detach and clearing of dns_name
12:08:19 sean-k-mooney actully does this even do an unbind
12:08:52 sean-k-mooney ah i t does line644
12:09:20 sean-k-mooney constants.BINDING_HOST_ID: None,
12:09:43 sean-k-mooney is the actual unbind
12:10:26 sean-k-mooney gibi: this is being used as part of instance delete which is why its doing all the other stuff
12:10:54 gibi yeah, this is correct during delete but it would not be corrrect during offload
12:10:57 sean-k-mooney its just combining the unbind with teh other operations needed to reset the port
12:11:14 sean-k-mooney right but that function is not only doing an unbind
12:11:24 sean-k-mooney i never said we shoudl use that funciton
12:12:38 gibi sure
12:12:52 gibi it is about terminology
12:12:53 sean-k-mooney we shoudl proably rename that "release_ports" or "reset_ports"
12:13:00 gibi yeah I agree
12:13:15 sean-k-mooney right terminology wise that function is missnamed
12:13:42 sean-k-mooney if i propose a patch for unshelve
12:13:50 sean-k-mooney ill porpsoe a clean up patch to rename this
12:14:07 gibi ack
12:15:02 sean-k-mooney speaking of patchs my spawn_n patch actully passed ci this time
12:15:07 sean-k-mooney well ignoreing pep8
12:15:23 sean-k-mooney but it did not seam to really decrease the number of greenlets
12:15:34 sean-k-mooney i guess becasue when we are counting them
12:15:41 sean-k-mooney we count the wrapped greenlets
12:15:48 sean-k-mooney and the freestanding ones
12:16:03 sean-k-mooney so as you predicted it has no visabel effect
12:18:52 gibi the code should only count naked greenlets that are not wrapped
12:19:00 gibi in a GreenThred
12:19:14 sean-k-mooney hum well the number looked identical
12:19:32 gibi https://review.opendev.org/c/openstack/nova/+/841040/6/nova/compute/manager.py#10150
12:19:33 sean-k-mooney its possible it did not work i coudl add a func test to check
12:19:59 gibi greenlets might be special from the GC perspective as they are implemented in a C extension
12:20:10 gibi so this can be a side effect of my hack to looking at the GC
12:20:50 sean-k-mooney maybe
12:20:53 sean-k-mooney not really sure
12:20:57 gibi me neither
12:21:06 sean-k-mooney will isinstance look at inheritance
12:21:11 gibi yepp
12:21:15 gibi it does
12:21:40 sean-k-mooney and GreenThread contains but is not a greenlet
12:22:09 Uggla gibi, looking at the table, line 3 we came back to the original behavior right ? Which is something we wanted to avoid. (Not break user choice to keep the instance floating.)
12:22:22 sean-k-mooney gibi: https://github.com/eventlet/eventlet/blob/master/eventlet/greenthread.py#L163=
12:22:30 Uggla gibi, although I think it is a better choice.
12:23:07 gibi GreenThread derives from greenlet https://github.com/eventlet/eventlet/blob/master/eventlet/greenthread.py#L163
12:23:28 gibi sean-k-mooney: you were faster
12:23:42 sean-k-mooney gibi: yep so greenlet includes all the greenthread too
12:23:43 gibi so isinstance(GreenThread(), greenlet) is True
12:23:50 sean-k-mooney ya
12:23:50 gibi the count does not
12:23:55 gibi as I have an if
12:24:09 gibi naked = [g for g in greenlets if g not in greenthreads]
12:24:22 sean-k-mooney oh ya
12:24:23 gibi so only count those greenlets that are not counted for greenthread
12:24:23 gibi s
12:24:34 sean-k-mooney did see that look was lookign jsut at greenlets and ghreenthreads
12:25:00 gibi ah jeah I forgot to log _naked_ greenlet
12:25:05 gibi hm
12:25:06 gibi I idd
12:25:07 gibi did
12:25:16 sean-k-mooney you jsut didnt log total
12:25:17 gibi so naked here means not wrapped in a GreenThread
12:25:26 gibi yeah I did not log total as that would count things twice
12:26:00 gibi i.e. a GreenThread would also be counted as greenlet too
12:26:23 sean-k-mooney Uggla: no we are redefiening what the qeust means
12:26:44 sean-k-mooney we are defien that if you pass an AZ you are requesting for it to be pinned to that az
12:26:57 sean-k-mooney which is the current unshelve to az beahvior
12:27:03 gibi yepp
12:27:22 Uggla sean-k-mooney, gibi , I'have just got it. Seems ok for me.
12:27:54 sean-k-mooney Uggla: so we found that odd in the previous case beacue of the implict magic of updating az somethimes but nota always
12:28:09 sean-k-mooney but now that its only ever updated explcitly in this table
12:28:14 sean-k-mooney its consistent
12:28:50 Uggla sean-k-mooney, I agree it is better now and unpin/pin is possible which is cool.
12:30:00 sean-k-mooney Uggla: for better or worse this is why we have specs for api changes
12:30:24 sean-k-mooney Uggla: something that seams simple like "just unshalve to this host" can have subtel issues with considtency
12:30:33 sean-k-mooney so hopefully this has not put you off specs

Earlier   Later