| *** zseguin is now known as Guest14350 | 07:21 | |
| croelandt | dansmith: 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 point | 15:37 |
|---|---|---|
| abhishekk | @dansmith i know you are busy, but when you get time could you please look at https://bugs.launchpad.net/glance/+bug/2162076 | 15:49 |
| dansmith | oye | 15:49 |
| dansmith | croelandt: I don't really and looks pretty low-prio, so I assume someone else can verify | 15:49 |
| dansmith | abhishekk: 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 |
| dansmith | and 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 |
| abhishekk | yes | 15:53 |
| abhishekk | earlier there was a call to identify the image qemu-img info | 15:54 |
| dansmith | and 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 match | 15:55 |
| abhishekk | which was setting source_format to qcow2 (detected by above command) and then conversion was happening | 15:55 |
| dansmith | the 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/configuration | 15:56 |
| dansmith | (AFAIK) | 15:56 |
| abhishekk | yes, it was converting to raw | 15:56 |
| dansmith | so I'm not sure why it ever makes sense for them to upload a qcow2 into an image they created as raw | 15:57 |
| abhishekk | That I have no idea, but now they are complaing that it is broken after upgrade :/ | 15:57 |
| dansmith | I think it's not broken, it's fixed :) | 15:58 |
| abhishekk | right, but for them it's broken | 15:58 |
| dansmith | they're complaining that it's *different* which is true | 15:58 |
| abhishekk | yes, | 15:59 |
| dansmith | so 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 |
| abhishekk | So what should be the right way to fix it for them which they think is wrong | 16:00 |
| abhishekk | yes | 16:00 |
| dansmith | this 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 is | 16:01 |
| abhishekk | yeah | 16:02 |
| dansmith | like, 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 set | 16:02 |
| abhishekk | one simple option come to my mind is introduce new option for imports | 16:02 |
| dansmith | or, if import had some way to declare the input format | 16:02 |
| dansmith | option being config or api? | 16:02 |
| abhishekk | config | 16:03 |
| abhishekk | We 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 |
| dansmith | I 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 |
| abhishekk | that's what they want | 16:38 |
| dansmith | right, but aside from that being fundamentally broken, what would the other config do? | 16:40 |
| abhishekk | other mean new right? | 16:40 |
| dansmith | yes, what would it be set to and what would it change from how things are today? | 16:41 |
| abhishekk | it should be set to qcow2,raw | 16:41 |
| abhishekk | if image format is set to qcow2 it will allow conversion | 16:41 |
| abhishekk | if nothing is set it will maintain today's behavioe | 16:42 |
| abhishekk | if set to raw conversion will be skipped | 16:42 |
| dansmith | help me with the logic.. today we probe the format, find qcow2, and refuse the conversion because qcow2 != image.disk_format | 16:43 |
| dansmith | so you're proposing changing that to "if detected_format in (image.disk_format, CONF.import_disk_formats): convert()" ? | 16:43 |
| abhishekk | yes, 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 added | 16:45 |
| dansmith | and why wouldn't we just allow conversion from any (supported) disk format at that point? | 16:46 |
| dansmith | or add a new parameter to import to say "importing_from_format: qcow2"? | 16:46 |
| dansmith | before the change it would import from anything qemu-img would parse right? | 16:47 |
| abhishekk | yes | 16:47 |
| dansmith | it also seems like maybe "if image_conversion.output_format == image.disk_format: convert()" would sort of be the same as what it was | 16:48 |
| dansmith | but 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 it | 16:48 |
| dansmith | I'd really like to maybe have a video chat and include rosmaita and croelandt in the discussion if we can, | 16:50 |
| abhishekk | if image_conversion.output_format == image.disk_format: convert()" this will also restore old behavior i guess | 16:50 |
| dansmith | because 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 |
| abhishekk | Ack, I think better we treat this as PTG topic | 16:50 |
| dansmith | ++ | 16:50 |
| dansmith | another option, I think: | 16:51 |
| dansmith | set disk_formats=raw,qcow2 | 16:51 |
| abhishekk | i will work on spec with my list as primary option | 16:51 |
| dansmith | disallow 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 raw | 16:52 |
| dansmith | that would be externally consistent | 16:52 |
| abhishekk | that will break traditonal raw images only environment | 16:52 |
| dansmith | since we can probe the format during upload, we could abort as soon as we determine the upload stream is not one of the allowed ones | 16:52 |
| abhishekk | traditonal PUT will alow to create qcow2 images | 16:53 |
| dansmith | I'm saying we add new stuff to disable that.. | 16:53 |
| abhishekk | ohh | 16:53 |
| abhishekk | i thought you were suggesting workarounf | 16:53 |
| dansmith | disk_formats=raw,qcow2 allowed_image_content=raw (or some better name) | 16:53 |
| abhishekk | ack, I will think on this and include it in spec | 16:54 |
| dansmith | means 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 good | 16:54 |
| abhishekk | ack, this sounds little easier to implement | 16:55 |
| dansmith | maybe just allowed_upload_formats= ... specifically to restrict what content types you can put directly to /file | 16:55 |
| abhishekk | ++ | 16:55 |
| dansmith | and if someone wanted to disable uploads entirely and force import, they could set that to be empty | 16:56 |
| abhishekk | yep | 16:56 |
| abhishekk | this sounds better | 16:57 |
| abhishekk | will not take more of your time on this, thank you, I have enough material to get back to reporter | 16:57 |
| dansmith | it's consistent for the API user which is very important to me :) | 16:58 |
| abhishekk | agree | 16:58 |
| dansmith | if you look at this from the other angle, let's say I'm an operator that wants only qcow2 files on disk | 17:02 |
| dansmith | I set output_format=qcow2 and disk_formats=qcow2 | 17:02 |
| dansmith | (hang on) | 17:02 |
| dansmith | users with a raw file have to know that qcow2 conversion is being done in the background, | 17:03 |
| dansmith | they would have to create a qcow2 image, knowingly upload or import raw data into it | 17:04 |
| dansmith | or if they have a vmdk, even worse | 17:04 |
| dansmith | but with this strategy, they create an image with disk_format set properly | 17:04 |
| dansmith | if the operator doesn't want to support import/conversion from vmdk, then they don't allow that in disk_formats | 17:04 |
| dansmith | they control what the output format is independent from what the user knows ahead of time | 17:05 |
| dansmith | so yeah I think this makes more sense :) | 17:05 |
| dansmith | if the operator _wants_ to allow you to upload qcow2 or vmdk, but prefers qcow2, | 17:06 |
| dansmith | then they can set disk_formats=qcow2,vmdk and allowed_upload_formats=qcow2,vmdk and output_format=qcow2 | 17:06 |
| dansmith | if you upload either, you're allowed.. if you import either, we'll convert to the preferred format of qcow2 | 17:07 |
| dansmith | if they want to enforce only qcow2 in the system, then they remove vmdk from allowed_upload_formats | 17:07 |
| opendevreview | Cyril Roelandt proposed openstack/glance master: Validate image properties on 'update' operation https://review.opendev.org/c/openstack/glance/+/999162 | 17:16 |
| opendevreview | Merged openstack/glance master: Revert "Add CPU Mode Metadata Def" https://review.opendev.org/c/openstack/glance/+/926529 | 17:33 |
Generated by irclog2html.py 4.1.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!