Monday, 2024-07-22

*** bauzas_ is now known as bauzas03:47
*** ministry is now known as __ministry04:35
fricklerstephenfin: how much of https://review.opendev.org/q/topic:%22remove-wsgi_scripts%22 do you think can we get still done this cycle? I have little hope for cinder, but placement could be fine if someone reviews https://review.opendev.org/c/openstack/placement/+/91956905:25
*** bauzas_ is now known as bauzas05:33
opendevreviewRajat Dhasmana proposed openstack/nova master: Correct info about volume-backed server rebuild  https://review.opendev.org/c/openstack/nova/+/92457407:16
opendevreviewSylvain Bauza proposed openstack/nova stable/2024.1: cpu: Only check governor type on online cores  https://review.opendev.org/c/openstack/nova/+/92451409:40
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for host aggregate actions API  https://review.opendev.org/c/openstack/nova/+/92458410:53
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for host aggregate APIs  https://review.opendev.org/c/openstack/nova/+/92458510:53
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for extensions API  https://review.opendev.org/c/openstack/nova/+/92458610:53
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for versions APIs  https://review.opendev.org/c/openstack/nova/+/92458710:53
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for assisted volume snapshots APIs  https://review.opendev.org/c/openstack/nova/+/92458810:53
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for port interface APIs  https://review.opendev.org/c/openstack/nova/+/92458910:53
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for availability zone APIs  https://review.opendev.org/c/openstack/nova/+/92459010:53
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for bare metal node APIs  https://review.opendev.org/c/openstack/nova/+/92459110:53
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for console auth token APIs  https://review.opendev.org/c/openstack/nova/+/92459210:53
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for flavor access API  https://review.opendev.org/c/openstack/nova/+/92459310:53
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for flavor extra specs APIs  https://review.opendev.org/c/openstack/nova/+/92459410:53
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for flavors APIs  https://review.opendev.org/c/openstack/nova/+/92459510:53
opendevreviewStephen Finucane proposed openstack/nova master: api: Add response body schemas for floating IP pool APIs  https://review.opendev.org/c/openstack/nova/+/92459610:53
opendevreviewStephen Finucane proposed openstack/nova master: docs: Add contributor docs for response body validation  https://review.opendev.org/c/openstack/nova/+/92459710:53
opendevreviewStephen Finucane proposed openstack/nova master: WIP: tests: Ensure all APIs have a response body schema  https://review.opendev.org/c/openstack/nova/+/92459810:53
opendevreviewStephen Finucane proposed openstack/nova master: WIP: tests: Temporarily ignore missing schemas for removed APIs  https://review.opendev.org/c/openstack/nova/+/92459910:54
stephenfinfrickler: There's nothing technically challenging about any of them: it's simply a case of getting them reviewed and merged10:54
stephenfingibi: You could try calling 'connect_as' on the connection object? That doesn't accept a context object (yet) so you'll need to set the various fields manually but 10:57
stephenfin...that shouldn't be too difficult to do10:58
stephenfingtema might have a better idea on #openstack-sdks10:58
sean-k-mooneyfrickler: stephenfin  i reviewd the placement patch only the first of the two is requried and can merge this cycle11:04
*** iurygregory__ is now known as iurygregory11:18
gibistephenfin: thanks I will try and jump over to the sdk channel if needed. 11:33
*** bauzas_ is now known as bauzas12:41
*** iurygregory__ is now known as iurygregory13:01
*** bauzas_ is now known as bauzas13:23
*** bauzas_ is now known as bauzas14:32
*** bauzas_ is now known as bauzas15:00
*** bauzas_ is now known as bauzas15:12
*** bauzas_ is now known as bauzas15:37
dansmithmelwitt: have you given any thought to how we might record/enforce the disk_format for the things in our _base directory?18:41
dansmithwith the oslo stuff simmering I'm trying to figure out what the simplest path to do that is18:41
dansmithand I'm pretty mired down in all the crazy indirection18:41
dansmithat this point I'm kinda thinking that making imagecache.get_cache_fname() ping glance for every call to get disk_format will be the easiest, but that's sort of insane18:42
dansmithI was thinking doing it in fetch(_to_raw)() would be doable, but the depth from which we pass the destination fname is pretty deep18:42
dansmith(or sean-k-mooney ^)18:42
melwittdansmith: did you change your mind about the "add a file extension to the name" idea or find some issue about it?18:43
dansmithmelwitt: no, that's what I'm trying to implement, but it's not as easy as I was hoping18:44
dansmithI guess maybe doing the "database on disk18:45
dansmithmight help with the overhead of pinging glance,18:45
sean-k-mooneyso for exitng images in the cache that are used for backign files we cant rename them as it would break runing domian18:45
dansmithbut we need to make sure we clean that up, and consult it for existing/copied images, etc18:45
dansmithsean-k-mooney: right I know18:45
melwittdansmith: oh, I see. you could ping for disk_format the first time and then cache it maybe?18:45
sean-k-mooneyi was thinkign we would need to check all of the in use images in init host18:45
sean-k-mooneyand create a hard/soft link with the extention18:45
dansmithmelwitt: sure, but that makes it (much) heavier18:45
dansmithsean-k-mooney: yeah that's how we could handle the existing ones,18:46
dansmithI'm just looking at how to make the first-run case even work18:46
dansmithbecause we sort of pass the target fname from deep inside libvirt driver,18:46
sean-k-mooneythe  problem with that is i think the file name is a md5 of the uuid + the caasity18:46
sean-k-mooneyalthoguh i coudl be wrong18:46
dansmithand when we do, we have recorded only the image id and not the type, etc18:46
sean-k-mooneyso im not really sure how to look up the glance iamge18:47
dansmithsean-k-mooney: right, that's a problem for the day-2 case, but I haven't even gotten there... the day zero case is hard enough18:47
dansmithlike "assume a blank compute node, how do we *start* recording and enforcing formats"18:47
dansmithfigure out the migration of existing stuff later18:47
melwittsean-k-mooney: yeah it's a fingerprint not the image id (name in the cache)18:48
dansmithright18:48
sean-k-mooneyack i honestly have not looked at this closely enough to say of the top of my head. i was hoping we woudl have some of the image metadata stored like the format in the instastance_system_metadata or somethign like that18:48
melwittoh yeah, we do have all the image properties stored in instance sysmeta18:49
sean-k-mooneythat or the bdms. ill need to load contex tbefore ill be of any help18:49
melwittnot sure if disk_format is always part of that18:49
dansmithI think that's too weak, because we won't have that for things like a rescue image18:49
melwittyeah, true won't have for rescue18:49
dansmithlike, if we're going to make this holistic, it has to be more than just the root disk of an instance during boot18:49
dansmithit would be bad if you could pollute the image cache by doing a rescue to a bad image and then a subsequent normal boot, etc18:50
sean-k-mooneydansmith: well we will likely need to modify the image cache api to pass the format but im not really sure form where other then when we are downloadign the image18:50
dansmithand, we won't know which images in the cache were/are for rescue or anything.. I think we have to get to a point where it's something we can rely on, else we will always have the legacy path18:50
dansmithsean-k-mooney: right, that18:50
dansmithis my point though,18:50
dansmithwe18:51
dansmithhave already decided what the dest filename will be, before we even fetch it18:51
dansmithand changing that reaches *deep* backwards into the driver18:51
dansmithit's sort of ... insane18:51
sean-k-mooneyok then the alternitive is to write a new info file becied the orgianl with the format as the content18:51
melwittyeah, it is very disjointed18:51
sean-k-mooneyas ub _base/backing_file _base/backing_file.info18:52
sean-k-mooney*as in18:52
sean-k-mooneyif we cant modify the filename but know what it is we can comptue the relitive name18:53
dansmiththe problem is that if we do that, we need to start copying it during migration18:53
sean-k-mooneyonly if the image is deleted form glance18:54
dansmithI also was hoping to make it a lot more obvious when we missed one18:54
sean-k-mooneyotherwise it would be download on the dest node instead of copying18:54
sean-k-mooneybut yes18:54
dansmithright, you can see that hole right in front.. upload a bad image, boot, delete it, then migrate to exploit :)18:54
sean-k-mooneyam im just finsihing for today but ill sleep on it and take a look at the code tomrrow and see if anythign jump out at me18:54
dansmithack18:55
melwittdansmith: the fetch and disk image creation happen in Image.cache() which is called here https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L11500 could you maybe return the file format from the fetch func and then pass it into create_image to tack on the extension to the name before writing it?18:55
dansmithmelwitt: I think that's only some of the time18:55
sean-k-mooneythe only other optiopn that jumps otu at me at the moment is to use the a singel file for all the format info or a db like pythons  dbm or sqlite modules 18:56
dansmithfor ami,ari,aki we fetch direct I think18:56
sean-k-mooneywhich i assume you dont wnat to do at least right now18:56
dansmithand I thought there were also some of those backend drivers that raise and cause us to take the fetch direct path again, like on boot from snapshot or unshelve or something?18:56
sean-k-mooneyi.e. you want this to be local to the compute node and obvious form simple inspection fo the filesytem without special tools18:56
dansmithsean-k-mooney: multiple files that get deleted with their parent seems cleanest if we're going that route18:57
sean-k-mooneyand it also needs to work when /var/lib/nova is on nfs18:57
dansmiththere is also the concern... yeah NFS18:57
dansmithmultiple files make locking less reliable18:57
dansmithmelwitt: I was initially going to return format from fetch_as_raw (and add the lookup/return to fetch) yeah18:59
dansmithhowever we'd need another move there in try_fetch_image_cache() which feels wrong,18:59
dansmithand also, there are cases where we don't go through that like the ami triplets I think18:59
dansmithand of course that copy_from_host, which is going to be a problem either way19:00
melwittdansmith: move? the base image isn't created until Image.create_image (which is called from Image.cache)19:01
dansmithyeah, if fetch writes it to where it was asked and returns the format, then _try_fetch_image_cache() would need to move it to $path.$format19:02
dansmithunless we put that in image.cache, if that's what you mean?19:04
dansmithsame difference though I think19:04
melwittdansmith: no.. I'm thinking of how fetch isn't called until in Image.create_image so I was thinking you could adjust the target name before writing the file19:05
dansmitheither way we end up with a sequence of: 1. fetch image info, 2. forget the format and calculate the wrong filename, 3. fetch the image info again, 4. write to a different file19:05
dansmithright, but ^19:05
dansmithwhich is doable, it's just pretty stupid..19:05
melwittI guess I'm not understanding how that would be necessary, like forget the format and all that19:06
dansmithwe only have image_id here right?19:06
melwittif the fetch func returns the format I mean19:07
melwitt*if you made fetch return the format19:07
dansmith...which will be done by re-fetching the image info yeah? :)19:07
melwittno, the first fetch19:07
dansmithwut19:08
melwittlike in Image.create_image, the prepare_template() function is the fetch function. I guess you would have to be able to adjust what's in the functools.partial though to do it, maybe that's something that is not possible?19:09
dansmithI'm a bit lost here, but while we were talking I see that the kernel and ramdisk go through raw.cache() as well which means the cache function itself might work for those too as you say19:11
dansmithbut note that ephemeral and swap are created like that as well, so they'd all need to change so we get a stable format returned from their not-really-fetch-function-s19:11
melwittthat is true, all of the fetch funcs would need to be modified to return format19:12
dansmithalso after this,19:13
dansmithwait19:13
dansmithI'm just trying to figure out if we need the filename anywhere else after we've made that call19:16
dansmithseems like we imply it below that but maybe we never use it19:17
dansmithjust feels wrong to have one step change the filename we're going to use in the middle, because someone will come along and say "oh look I have filename here, I can do a thing"19:17
dansmither, yeah, because _create_image() is called and then we go create the guest's xml which will assume the image(s) are named like instructed right?19:18
melwittyeah.. error prone at best I guess. and maybe an actual problem when a request comes in for a cached image, I guess maybe you could still match it by fingerprint + glance reported disk_format and if found in cache, use what's in the cache19:19
dansmithwe can't though,19:20
melwittmaybe.. have to think about it. you were only talking about adding extension to base images right? or are you meaning like all images19:20
dansmithbecause we need to know the image's disk_format, unless you want a THIRD ping to glance :)19:20
dansmithI think all images would be ideal, but I think the base images are the important case here19:21
melwittoh, right. hm19:21
melwittwell, could you not assume the format of what you find in the cache? like you get a request, you calculate the fingerprint, look for the basename in the cache, if you find it you use the file with the extension on it19:22
melwittas the format. without querying glance for it19:23
dansmithI mean, we can also just run our detection code on the images without the format every time.. the point is to try to harden this, not just layer on the guesses :D19:23
melwittno, the detection ran the first time the base image was written. thats' when you added the extension19:24
melwittbut from then on, you don't need to look it up again19:24
dansmithand part of the strategy here, I think, is to make sure we don't lose track of what we've validated and so yeah, doing /images/$image.*[0] is better than we have, it still seems like a hack19:24
melwittok19:24
dansmithI understand what you're saying, I'd just rather it be better than that19:25
melwittack19:25
dansmithI really was hoping to avoid just cluttering the _base dir with .info files, but perhaps that's just going to be easier because of how obsessed we are with filenames throughout the layers19:26
dansmithI dunno, I'll have to think about it19:26
dansmithalso makes an admin's job harder if the next time we have a thing, they have to go read all the info files looking for which one(s) are qcows, then using that list to do some remediation action19:27
dansmithlike currently, we were unable to check and purge bad images from the cache if they're present and the operators need to do that19:27
dansmiththat's just a UX thing and not critical of course, but...it'd be nicer19:27
dansmithI assume if we use .info files, we should dump json in there because as soon as we add this we'll need to store something else (honestly we should probably store image_id at least as well)(19:28
melwittyeah I agree .info files would be json. you could even have a nested list for all the files in one .info!19:33

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