| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2024-02-01 | |||
| 19:44:35 | sean-k-mooney | would that be an insane thing to do even look into or something to condier | |
| 19:45:10 | dansmith | yeah I think that's a bad idea, | |
| 19:45:19 | dansmith | because it has to be in the [db]/connection string to work | |
| 19:45:34 | sean-k-mooney | oh ok ya i didnt know that part | |
| 19:46:01 | sean-k-mooney | never mind then i just saw it pringitn stats since i have journaclt open | |
| 19:46:09 | sean-k-mooney | and then i rememebred it was a plugin | |
| 19:49:11 | sean-k-mooney | the example is litcally just regestirign an evnt with a call back | |
| 19:49:21 | sean-k-mooney | https://docs.sqlalchemy.org/en/14/core/connections.html#sqlalchemy.engine.CreateEnginePlugin | |
| 19:50:19 | sean-k-mooney | but i mised the url part | |
| 19:50:49 | sean-k-mooney | although you can enable it a diffent way | |
| 19:51:10 | sean-k-mooney | anyway i was ment to finish a while ago so ill leave that for now | |
| 19:53:34 | dansmith | feels like a monkeypatch to me :) | |
| 19:54:04 | sean-k-mooney | kind of but via a supported interface | |
| 19:54:19 | sean-k-mooney | as in its an intential extention point but | |
| 19:54:23 | JayF | I'll note Ironic uses this event interface directly to set PRAGMA on sqlite usages. | |
| 19:54:25 | sean-k-mooney | the db is the last part on my list | |
| 19:54:33 | JayF | So you could potentially get the same behavior without having to monkey patch | |
| 19:54:52 | sean-k-mooney | JayF: im not planning to monkey patch | |
| 19:55:20 | sean-k-mooney | JayF: what im trying to figure out is a clean way to detect if an database connection is lost and restablished | |
| 19:55:24 | JayF | Oh yeah, I figured that, but just pointing out that event interface is generally useful for stuff like that: https://github.com/openstack/ironic/blob/master/ironic/db/sqlalchemy/__init__.py#L28 | |
| 19:55:33 | sean-k-mooney | without have to do that everywhere we interact wit the db | |
| 19:55:34 | JayF | Yeah, I'm saying: register events in the same way they do in that CreatePlugin | |
| 19:55:56 | JayF | that example in Ironic is actually pretty darn close to half of what you need in terms of registering the connect event | |
| 19:56:14 | sean-k-mooney | ya so i looke at doing that too | |
| 19:56:37 | sean-k-mooney | but its a little tricky to ensure we do that give how we mange our engine fasads | |
| 19:57:14 | JayF | Note that doesn't have a handle on anything | |
| 19:57:35 | JayF | Do you not have a place, ala __init__.py in a relevant module, you're guaranteed to be run in every thread? | |
| 19:57:54 | JayF | the dbapi_connection is provided for you on a ConnectionEvent | |
| 19:59:52 | sean-k-mooney | simple answer no we have at least 2 places like that posble more | |
| 20:00:45 | sean-k-mooney | for the cell db i belive all engin creation goes though this function https://github.com/openstack/nova/blob/master/nova/db/main/api.py#L138 | |
| 20:01:06 | sean-k-mooney | for the api db here https://github.com/openstack/nova/blob/master/nova/db/api/api.py#L50 | |
| 20:01:22 | sean-k-mooney | but there is a lot of code to review | |
| 20:01:34 | JayF | I'm saying I think your assumption that it has to be done *at* engine creation time is inaccurate | |
| 20:01:48 | JayF | that it can be done anytime *before* that engine creation, as well | |
| 20:01:54 | JayF | which is likely a much easier problem to solve | |
| 20:02:07 | JayF | but I'm not super familiar with nova is there's a different dimension here I'm missing | |
| 20:02:11 | sean-k-mooney | proably | |
| 20:02:26 | sean-k-mooney | i just need to review the options and then see where to go form there | |
| 20:02:50 | sean-k-mooney | i was lookign at how we optionally enabel osprofiler.sqlalchemy | |
| 20:02:53 | sean-k-mooney | as well | |
| 20:03:49 | sean-k-mooney | it has a handel_error function | |
| 20:03:51 | sean-k-mooney | https://opendev.org/openstack/osprofiler/src/branch/master/osprofiler/sqlalchemy.py#L99 | |
| 20:04:31 | sean-k-mooney | right now im just trying to see what the options are in this space | |
| 20:05:40 | sean-k-mooney | its uses https://github.com/openstack/oslo.db/blob/master/oslo_db/sqlalchemy/enginefacade.py#L792 append_on_engine_create | |
| 20:07:50 | JayF | oh, nice! I imagine we didn't use that because we only wanted to catch sqlite connections | |
| 20:07:58 | sean-k-mooney | https://docs.sqlalchemy.org/en/20/core/pooling.html#custom-legacy-pessimistic-ping | |
| 20:08:23 | sean-k-mooney | there are docs for how to lliste for the engine_connect event | |
| 20:09:10 | sean-k-mooney | so i was wondering if i could combine some for those approch to ensure that wehn a engin is create we greister a litener for and engine_connect | |
| 20:09:32 | sean-k-mooney | that just set a db_connection healtcheck to pass/fail | |
| 20:10:18 | sean-k-mooney | anyway ill let this simmer in the back of my mind and come back in a few days | |
| 20:10:29 | JayF | In Ironic, we don't have a handle on engine at all when we setup that event listener; so I'm a little confused as to if it really needs to be done per engine | |
| 20:10:29 | sean-k-mooney | thanks for the ironic link | |
| 20:10:55 | sean-k-mooney | ya im not sure either | |
| 20:11:12 | sean-k-mooney | i should proably just ask zeek about it | |
| 20:13:37 | JayF | My current belief is it is gloriously simple -- just make sure the listener is registered and you don't need to worry about doing something "per enginer". If you find that is not correct, please let me know if you remember :D | |
| 20:19:02 | sean-k-mooney | i mean i can give it a try and just see what happens | |
| 20:19:09 | sean-k-mooney | its either goign to work or not | |
| 20:27:51 | sean-k-mooney | JayF: oh i see whats happening in the example its calling listen for on an instance of a class | |
| 20:28:12 | sean-k-mooney | JayF: but ironic is calling it with a type in this case ConnectionEvents | |
| 20:28:26 | JayF | Yes, different types give you different args as well | |
| 20:28:34 | JayF | so a ConnectionEvent gives you a dbapi_connection object | |
| 20:28:39 | sean-k-mooney | yep ok this makes sense now | |
| 20:49:49 | sean-k-mooney | trying to regester an event function for the engine_connect event that just raises a RuntimeError | |
| 20:50:15 | sean-k-mooney | does nohthing so either there is no engince_connect event when the nova conductor starts | |
| 20:50:38 | sean-k-mooney | or https://github.com/openstack/ironic/blob/master/ironic/db/sqlalchemy/__init__.py#L28 didnt seam to work for me | |
| 20:51:45 | sean-k-mooney | i would guess we had not used the db connection if it was not fro | |
| 20:51:48 | sean-k-mooney | DEBUG dbcounter [-] [2076032] Writing DB stats nova_cell1:SELECT=4,nova_cell1:UPDATE=1 { | |
| 22:55:53 | tonyb | sean-k-mooney[m]: Thanks again for all your help. If you're interested here's somewhat of a summary | |
| #openstack-nova - 2024-02-02 | |||
| 02:38:46 | opendevreview | Nobuhiro MIKI proposed openstack/nova master: libvirt: Support maxphysaddr. https://review.opendev.org/c/openstack/nova/+/907516 | |
| 06:41:31 | opendevreview | melanie witt proposed openstack/nova master: imagebackend: Add support to libvirt_info for LUKS based encryption https://review.opendev.org/c/openstack/nova/+/826755 | |
| 06:41:31 | opendevreview | melanie witt proposed openstack/nova master: libvirt: Configure and teardown ephemeral encryption secrets https://review.opendev.org/c/openstack/nova/+/826754 | |
| 06:41:32 | opendevreview | melanie witt proposed openstack/nova master: Add hw_ephemeral_encryption_secret_uuid image property https://review.opendev.org/c/openstack/nova/+/870935 | |
| 06:41:32 | opendevreview | melanie witt proposed openstack/nova master: Add encryption support to convert_image https://review.opendev.org/c/openstack/nova/+/870934 | |
| 06:41:33 | opendevreview | melanie witt proposed openstack/nova master: Support create with ephemeral encryption for qcow2 https://review.opendev.org/c/openstack/nova/+/870932 | |
| 06:41:33 | opendevreview | melanie witt proposed openstack/nova master: libvirt: make |
|
| 06:41:34 | opendevreview | melanie witt proposed openstack/nova master: Support (resize|cold migration) with ephemeral encryption for qcow2 https://review.opendev.org/c/openstack/nova/+/870933 | |
| 06:41:35 | opendevreview | melanie witt proposed openstack/nova master: Support snapshot with ephemeral encryption for qcow2 https://review.opendev.org/c/openstack/nova/+/870937 | |
| 06:41:35 | opendevreview | melanie witt proposed openstack/nova master: Add encryption support to qemu-img rebase https://review.opendev.org/c/openstack/nova/+/870936 | |
| 06:41:37 | opendevreview | melanie witt proposed openstack/nova master: Support rescue with ephemeral encryption https://review.opendev.org/c/openstack/nova/+/873675 | |
| 06:41:37 | opendevreview | melanie witt proposed openstack/nova master: Support rebuild and unshelve with ephemeral encryption https://review.opendev.org/c/openstack/nova/+/870939 | |
| 06:41:39 | opendevreview | melanie witt proposed openstack/nova master: libvirt: Introduce support for raw with LUKS https://review.opendev.org/c/openstack/nova/+/884313 | |
| 06:41:39 | opendevreview | melanie witt proposed openstack/nova master: WIP Support live migration with ephemeral encryption https://review.opendev.org/c/openstack/nova/+/905512 | |
| 06:41:41 | opendevreview | melanie witt proposed openstack/nova master: libvirt: Introduce support for rbd with LUKS https://review.opendev.org/c/openstack/nova/+/889912 | |
| 06:42:17 | opendevreview | melanie witt proposed openstack/nova master: DNM test ephemeral encryption + resize: qcow2, raw, rbd https://review.opendev.org/c/openstack/nova/+/862416 | |
| 06:43:59 | melwitt | sean-k-mooney: this is a checkpoint ^ there are so many changes already, I wanted to push them for now while I keep working on stuff | |
| 06:51:36 | opendevreview | Merged openstack/nova master: testing: Use inspect.isfunction() to check signatures https://review.opendev.org/c/openstack/nova/+/883217 | |
| 08:25:00 | opendevreview | Fabian Wiesel proposed openstack/nova master: vmware: Integer division Python 2 -> 3 fix https://review.opendev.org/c/openstack/nova/+/907444 | |
| 08:29:20 | gibi | elodilles: when you are up, could you take a quick look at https://review.opendev.org/q/topic:%22power-mgmt-fixups%22+branch:stable/2023.1 thanks! | |
| 09:24:01 | elodilles | gibi: ack, added to my TODO! | |
| 09:24:21 | gibi | elodilles: thanks a lot | |
| 10:35:44 | opendevreview | Sylvain Bauza proposed openstack/nova master: Reserve mdevs to return to the source https://review.opendev.org/c/openstack/nova/+/904209 | |
| 10:35:45 | opendevreview | Sylvain Bauza proposed openstack/nova master: Modify the mdevs in the migrate XML https://review.opendev.org/c/openstack/nova/+/904258 | |
| 12:18:48 | sean-k-mooney | gibi: elodilles: im +2w on the 2023.1 gpu backports | |
| 12:22:40 | sean-k-mooney | sorry not gpu backport power management backport | |
| 12:22:48 | sean-k-mooney | https://review.opendev.org/q/topic:%22power-mgmt-fixups%22 | |
| 12:23:54 | sean-k-mooney | melwitt: ack ill deploy that in a 2 node envionment and start testing it later today | |
| 12:26:29 | gibi | sean-k-mooney: thank you | |
| 12:29:40 | elodilles | sean-k-mooney: ack, thank you o:) | |
| 12:32:03 | opendevreview | Rajesh Tailor proposed openstack/nova master: Add support for showing requested az in output https://review.opendev.org/c/openstack/nova/+/904568 | |
| 13:15:16 | opendevreview | Rajesh Tailor proposed openstack/nova master: Add support for showing requested az in output https://review.opendev.org/c/openstack/nova/+/904568 | |