Thursday, 2025-09-11

*** mhen_ is now known as mhen01:57
Callum027Hi there. I was wondering if anyone here (maybe core members who have been around a while) knew why the container_format and disk_format fields are nullable in Glance's APIs? What does it mean when they are null? I'm trying to resolve an issue in Ceilometer where images with container_format/image_format set to null cannot be published to Gnocchi09:07
Callum027because the attributes are marked as "required" there, and I'm trying to determine the context/validity of those values being null before proposing a patch there. Thanks!09:07
Callum027The Container and Disk Formats page in the docs don't help much, as they seem to imply that they are not in fact nullable: https://docs.openstack.org/glance/latest/user/formats.html09:09
Callum027To give context, in our OpenStack deployment we have some Glance images that have container_format and disk_format both set to null in the database (and they return null when queried via the API as well), and I'm trying to figure out if that is correct or not. My initial assumption was that they should be using 'bare' container format and 'raw'09:15
Callum027disk format, but now that I can see that images are nullable in the API I'm not sure.09:15
dansmithCallum027: that's news to me too.. absolutely should not be nullable13:25
dansmithCallum027: I don't think you can draw any such conclusions about images you have, and would highly recommend you probe them to determine their format before changing in the DB13:26
dansmithyour operational security depends on it13:26
dansmithcroeland1: job result looks pretty good right?13:31
dansmithcroeland1: I have a conflict for the meeting time today, FYI13:38
croeland1dansmith: yeah, it does look amazing13:56
*** croeland1 is now known as croelandt13:56
croelandtthe grenade job also fails on master13:56
croelandtfunctional tests are expected t ofail13:56
dansmithyeah13:56
croelandtso this is pretty amazing, considering I just ripped off most of the eventlet stuff just hoping for the best13:57
croelandtwe still lose the posthook functionality (do we care about it?) and the sqlite driver thing is annoying13:57
croelandtapart from that...13:57
croelandtRegarding the meeting I totally forgot :D13:57
croelandtmhen: did you have anything for today? We cannot merge encryption as this state unfortunately13:58
mhenif dansmith is around, I'd like to discuss possible ways forward14:02
croelandthe is not :-(14:02
croelandtrosmaita: I don't suppose you got much for the meeting?14:03
rosmaitai do not14:03
croelandtI think we might as well cancel as I had no specific topics and both abhishek and dansmith are away14:03
croelandtdansmith: do you think after ytour meeting you will have time to talk to mhen?14:03
mhenI can only be around for another hour or so for today14:08
rajivHi, is there glance meeting today ?14:11
rosmaitarajiv: i believe it has been cancelled due to lack of participants14:11
rajivHi rosmaita , i see, are there any known issues with application credentials and glance ? i am observing a strange issue wrt listing images14:12
rajiv2-3 older images dont show up14:12
croelandtis there a launchpad for that? A reproducer?14:13
rosmaitahow are you listing?14:13
rosmaitaand you will kill me for saying this, but are you looking at the second page of results?14:14
rajivi found this https://bugs.launchpad.net/keystone/+bug/2030061/comments/6 but i use custom policy hence it doesnt work ?14:14
rajivi wanted to discuss it here before creating a launchpad bug14:14
rajivi have several openstack domains, and in 1 custom domain where the IDP is using application credentials, 14:15
rosmaitai wouldn't think that something like that would be affected by the age of the images14:15
rajiv2-3 older images dont show up in openstack image list, however if i set --project-id it works14:16
croelandthm14:16
rajivyes, i doubted the same, hence wondering if there is something else14:16
croelandtInteresting14:16
croelandtDo you have a full reproducer? Can you create an image that won't be listed?14:16
rajivos image list (doesnt show older images) ; os image list --project <project_id> lists all images14:16
croelandtyeah but can I create an image that won't be listed?14:17
rajivyes14:18
rosmaitaalso, what are the credentials of the person making the call? admin or the project that owns the images14:18
rajivyes, its admin, & image_admin14:18
rajivowner of the images14:19
croelandtso what's the difference between the non-listed images and the listed ones?14:19
rajivhttps://paste.opendev.org/show/blFtXQp9SiOf7T4SMuGA/14:19
rosmaitacan you do an image-show on each of those so we can see the full list of image properties?14:20
croelandtcan you "openstack image show $ID" for rajiv-test-ubuntu-24-04-01 and cirros?14:20
rosmaitajinx!14:20
croelandtyeah what rosmaita said14:20
rajivany particular info or value your looking for ? 14:21
rajivi will need to mask few details14:21
rajivah ok, few secs plz14:21
rosmaitafeel free to mask anything sensitive, but mainly interested in os_hidden and visibility14:23
rosmaitaand probably owner14:23
rajivhttps://paste.opendev.org/show/boqhc9uQSRqjuJWYsehG/14:23
rajivos_hidden is false by default14:24
rajivvisibility is private for all iamges14:24
rajivowner is the same project id for all images14:24
croelandtopenstack image list --all ?14:27
croelandtI think it's --all, not sure14:27
rosmaitaok, if you add --debug when you use openstackclient, i believe it will print out the API requests it makes ... would be interesting to see what it does for os image list vs. os image list --project ###14:27
rajivcroelandt: it works will in non application credentials domain without --all as well14:27
rajivrosmaita: yes, i did compare this but dint find any difference14:28
rajivstrangely.14:28
rosmaitathat is strange indeed14:28
rosmaitait that's the case, i would say it's not a glance problem, it is probably that osc is doing some kind of filtering or something14:29
rajivany idea why all images show up with "--project" flag ? 14:29
croelandtrosmaita: well the glance cli has the same issue, right?14:29
rosmaitadoes it?14:30
rajivlet me check quickly 14:30
rajivdoesnt work well with application creds which work with cred id and secret14:33
rajiv➜ glance image-list You must provide a username via either --os-username or env[OS_USERNAME]14:33
croelandtwhat if you pass --os-username14:34
rajivI tried it now, next is --os-password14:35
rajiv➜ glance image-list 'Namespace' object has no attribute 'os_password'14:36
croelandtjust export OS_*14:37
rajivbut application credentials doesnt support this right ?14:38
croelandthm I'm not sure14:39
croelandtlet's just try to useglanceclient here14:39
croelandtit's not a definitive solution, it's just debugging14:39
rajivnp, i guess i will raise a bug in glance or osc ?14:40
croelandtwell if you could use glanceclient we'd know whether it's osc-related14:40
rajivah ok ok14:41
rosmaitaeven better would be to make API requests directly14:43
rajivokay, thanks for the info, i will check and revert in next week's meeting14:44
croelandtI think with --debug --verbose you should see the API requests14:45
opendevreviewDan Smith proposed openstack/glance master: DNM: Test removing glance standalone mode  https://review.opendev.org/c/openstack/glance/+/96062015:30
Callum027dansmith: I did some testing and I was able to create an "empty" image with container_format and disk_format set to null, but when I tried to upload an image using the PUT endpoint it gave me an error (in poorly formatted in HTML) saying that they needed to be set. Here is the Glance API response for one of the images I am looking into, it has no21:12
Callum027container_format or disk_format but is in 'active' state... it appears to have been created from a snapshot using a block device mapping, and I'm unsure how this could have been done or whether it's valid or not. We only use RBD to back Glance, we don't enable any other backends. https://paste.openstack.org/show/brfK1PvWCtnHXTrnv8xM/21:12
dansmithCallum027: yeah, I dunno if there's any reason for allowing that in the API other than oversight (which I hope is the case)21:19
dansmithbut I think it's worth a bug report and hopefully we can just fix that either with defaults or a rejection21:19
Callum027There's a change from a long time ago that enabled them being nullable in the APIs: https://review.opendev.org/c/openstack/glance/+/13818321:19
dansmithCallum027: oh jeez.. well, I don't have anything nice to say about that, but at least some context21:20
dansmithI wonder if that's just "meh they're nullable in the DB schema" or what.. if so, that might've just been extending the oversight to the API, but who knows21:21
dansmithdoesn't much make sense to me though, so I still think it's worth changing21:21
Callum027I agree, I'm happy to create a bug report for this so it can be investigated21:21
Callum027Is there anything you can tell me about the image in the paste I linked above? I'm a bit stumped as to how it was created21:22
dansmither, what do you mean?21:22
Callum027So we only use RBD to back our images, which have completely different metadata to the image I linked above, which appears to have been created from a snapshot using a block device mapping? But I have no idea how it was done21:23
Callum027I'm trying to determine the origin of these images so if there's a problem there it can be fixed as well21:23
Callum027I know you can create an image from a volume, but in our setup that results in a normal-looking image backed by a separate RBD block device21:24
dansmithI think since it has "snapshot_id" that it came either from cinder itself or from nova, of a cinder volume21:24
dansmithyeah, I really don't know.. nothing about it that tells me anything specific21:26
dansmithI assume you might be able to follow the snapshot_id into cinder and find the volume which might offer clues21:29
Callum027In our pre-prod environment the snapshots these were created from no longer exist, but we have plenty of these in our prod that might still exist21:30
Callum027Is it actually possible to create an image directly from a snapshot using the Cinder/Glance APIs? The volume_id field in the block device mapping metadata for these images are unset21:31
Callum027My understanding was that you could only create them from a volume21:31
dansmithfrom an instance you mean?21:32
Callum027No, a volume snapshot21:32
dansmithidk21:32
dansmiththere's enough of a BDM here that it sure seems like it must have come from nova21:33
Callum027Interesting, looks like you're right, I created an image from a server and it has much of the same metadata (and more, including an RBD block device because presumably this one is not bugged): https://paste.openstack.org/show/b5QcmCz0yaPG1a5qI2mt/21:56
Callum027I can also see it has the container and disk format set on it properly21:56
Callum027I've got another one here in my testing env that's still in queued state, this one doesn't have them set yet (but as already established the API *does* allow this while the image is not actually uploaded yet): https://paste.openstack.org/show/boO6WWKgkXfPsUcazIWa/21:58
dansmithyeah and recent (from this year)22:13
dansmiththat one is created from osc I'm pretty sure because of the "owner_specified" stuff22:14
dansmithsuper bizarre, I didn't know they were even nullable until you brought it up, but I would have bet money that at least the clients had defaults22:14
Callum027The client does have defaults, I'm hitting the API directly to set them to null explicitly and the API is accepting it22:19
Callum027Though that last paste is one I created via openstack server image create22:19
Callum027I'm unsure if Nova is explicitly setting it to null or it's just not setting it when it creates the image in Glance before uploading it. That makes me worried if it would cause compatibility issues making it non-nullable22:24
Callum027So I'll make a bug on Launchpad for this issue and we can look into the implications of making the change22:26

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