Wednesday, 2026-07-29

*** zseguin is now known as Guest1435007:21
croelandtdansmith: if you got a sec, https://review.opendev.org/c/openstack/glance/+/998293 is related to the quotas feature, I think the reporter has a point15:37
abhishekk@dansmith i know you are busy, but when you get time could you please look at https://bugs.launchpad.net/glance/+bug/216207615:49
dansmithoye15:49
dansmithcroelandt: I don't really and looks pretty low-prio, so I assume someone else can verify15:49
dansmithabhishekk: not sure I'm reading this right, but before conversion would have taken a qcow2 turned it into raw, for an image created with disk_format=raw,15:52
dansmithand now we refuse to let you import a qcow2 into a raw (with conversion) because detected format does not match image.disk_format before conversion?15:53
abhishekkyes15:53
abhishekkearlier there was a call to identify the image qemu-img info15:54
dansmithand if you were to upload qcow2 to disk_format=qcow2, does image_conversion change disk_format to raw after it rawifies it? I seem to recall talking about this specifically relating to changing the disk_format to match15:55
abhishekkwhich was setting source_format to qcow2 (detected by above command) and then conversion was happening15:55
dansmiththe user has no idea what format the image will be force-converted into right? so they can't really know that they should create the image with disk_format=raw even if they're uploading a qcow2 file right? that's hidden operator-only knowledge/configuration15:56
dansmith(AFAIK)15:56
abhishekkyes, it was converting to raw15:56
dansmithso I'm not sure why it ever makes sense for them to upload a qcow2 into an image they created as raw15:57
abhishekkThat I have no idea, but now they are complaing that it is broken after upgrade :/15:57
dansmithI think it's not broken, it's fixed :)15:58
abhishekkright, but for them it's broken15:58
dansmiththey're complaining that it's *different* which is true15:58
abhishekkyes, 15:59
dansmithso they're configuring the API [image_format]/disk_formats=raw which prevents a user from creating the image with disk_format=qcow2 right?16:00
abhishekkSo what should be the right way to fix it for them which they think is wrong16:00
abhishekkyes16:00
dansmiththis is really a problem in the glance API behavior I think, because doing this correctly with import requires the user to know what the config on the backend is16:01
abhishekkyeah16:02
dansmithlike, it probably makes more sense (if we were designing this from scratch) to let them create any format they want, but images can't go ACTIVE unless they're in the allowed set16:02
abhishekkone simple option come to my mind is introduce new option for imports 16:02
dansmithor, if import had some way to declare the input format16:02
dansmithoption being config or api?16:02
abhishekkconfig16:03
abhishekkWe can keep [image_format]/disk_formats=raw as global, then introduce new config option under [image_conversion] named import_disk_formats and if it has anything then we will honor these while conversion?16:10
dansmithI guess I'm not sure what that would accomplish.. they would still have to know that conversion will force raw and pre-create the image as raw right?16:37
abhishekkthat's what they want 16:38
dansmithright, but aside from that being fundamentally broken, what would the other config do?16:40
abhishekkother mean new right?16:40
dansmithyes, what would it be set to and what would it change from how things are today?16:41
abhishekkit should be set to qcow2,raw16:41
abhishekkif image format is set to qcow2 it will allow conversion16:41
abhishekkif nothing is set it will maintain today's behavioe16:42
abhishekkif set to raw conversion will be skipped16:42
dansmithhelp me with the logic.. today we probe the format, find qcow2, and refuse the conversion because qcow2 != image.disk_format16:43
dansmithso you're proposing changing that to "if detected_format in (image.disk_format, CONF.import_disk_formats): convert()" ?16:43
abhishekkyes, if import_disk_formats is defined then it will be detected_format in CONF.import_disk_formats: convert in import flow conversion this logic will be added16:45
dansmithand why wouldn't we just allow conversion from any (supported) disk format at that point?16:46
dansmithor add a new parameter to import to say "importing_from_format: qcow2"?16:46
dansmithbefore the change it would import from anything qemu-img would parse right?16:47
abhishekkyes16:47
dansmithit also seems like maybe "if image_conversion.output_format == image.disk_format: convert()" would sort of be the same as what it was16:48
dansmithbut any of these options seem to just be codifying the extremely broken behavior of a user needing to know what the output_format is for conversion without any way of being able to determine it16:48
dansmithI'd really like to maybe have a video chat and include rosmaita and croelandt in the discussion if we can,16:50
abhishekkif image_conversion.output_format == image.disk_format: convert()" this will also restore old behavior i guess16:50
dansmithbecause we're really talking about a design problem here and just papering over it with "just make it works the way they want" doesn't yield consistent software IMHO :)16:50
abhishekkAck, I think better we treat this as PTG topic16:50
dansmith++16:50
dansmithanother option, I think:16:51
dansmithset disk_formats=raw,qcow216:51
abhishekki will work on spec with my list as primary option 16:51
dansmithdisallow upload (old post to /file) in qcow2 format, only way you can get to active with disk_format=qcow2 is to go through import/conversion which changes it to raw16:52
dansmiththat would be externally consistent16:52
abhishekkthat will break traditonal raw images only environment16:52
dansmithsince we can probe the format during upload, we could abort as soon as we determine the upload stream is not one of the allowed ones16:52
abhishekktraditonal PUT will alow to create qcow2 images16:53
dansmithI'm saying we add new stuff to disable that..16:53
abhishekkohh16:53
abhishekki thought you were suggesting workarounf16:53
dansmithdisk_formats=raw,qcow2 allowed_image_content=raw (or some better name)16:53
abhishekkack, I will think on this and include it in spec16:54
dansmithmeans you can create an image with disk_format=qcow2, but if you try to upload to it, you get rejected saying "we only allow raw, sorry".. if you import a qcow2 and it gets converted to raw, then all good16:54
abhishekkack, this sounds little easier to implement16:55
dansmithmaybe just allowed_upload_formats= ... specifically to restrict what content types you can put directly to /file16:55
abhishekk++16:55
dansmithand if someone wanted to disable uploads entirely and force import, they could set that to be empty16:56
abhishekkyep16:56
abhishekkthis sounds better16:57
abhishekkwill not take more of your time on this, thank you, I have enough material to get back to reporter16:57
dansmithit's consistent for the API user which is very important to me :)16:58
abhishekkagree16:58
dansmithif you look at this from the other angle, let's say I'm an operator that wants only qcow2 files on disk17:02
dansmithI set output_format=qcow2 and disk_formats=qcow217:02
dansmith(hang on)17:02
dansmithusers with a raw file have to know that qcow2 conversion is being done in the background,17:03
dansmiththey would have to create a qcow2 image, knowingly upload or import raw data into it17:04
dansmithor if they have a vmdk, even worse17:04
dansmithbut with this strategy, they create an image with disk_format set properly17:04
dansmithif the operator doesn't want to support import/conversion from vmdk, then they don't allow that in disk_formats17:04
dansmiththey control what the output format is independent from what the user knows ahead of time17:05
dansmithso yeah I think this makes more sense :)17:05
dansmithif the operator _wants_ to allow you to upload qcow2 or vmdk, but prefers qcow2,17:06
dansmiththen they can set disk_formats=qcow2,vmdk and allowed_upload_formats=qcow2,vmdk and output_format=qcow217:06
dansmithif you upload either, you're allowed.. if you import either, we'll convert to the preferred format of qcow217:07
dansmithif they want to enforce only qcow2 in the system, then they remove vmdk from allowed_upload_formats17:07
opendevreviewCyril Roelandt proposed openstack/glance master: Validate image properties on 'update' operation  https://review.opendev.org/c/openstack/glance/+/99916217:16
opendevreviewMerged openstack/glance master: Revert "Add CPU Mode Metadata Def"  https://review.opendev.org/c/openstack/glance/+/92652917:33

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