Earlier  
Posted Nick Remark
#openstack-nova - 2019-02-27
22:24:48 mriedem https://docs.openstack.org/glance/latest/admin/useful-image-properties.html
22:24:53 mriedem trait:HW_CPU_X86_AVX2=required
22:25:01 mriedem if only the code were freely available... :)
22:25:04 openstackgerrit Artom Lifshitz proposed openstack/nova master: RPC changes to prepare for NUMA live migration https://review.openstack.org/634605
22:25:05 openstackgerrit Artom Lifshitz proposed openstack/nova master: Make the use of the CastAsCall fixture configurable https://review.openstack.org/639428
22:25:05 openstackgerrit Artom Lifshitz proposed openstack/nova master: Full NUMA live migration support https://review.openstack.org/634606
22:25:09 mordred artom: wow
22:25:10 cfriesen mriedem: the image itself has "trait:...."
22:25:32 mriedem oh b/c we slap on the image_ prefix before storing in system_metadata
22:25:34 mriedem now it comes back to me
22:25:35 cfriesen mriedem: but it in instance_system_metadata it prepends "image_" to it
22:25:36 mriedem is the value "required"
22:25:38 mriedem ?
22:25:43 cfriesen mriedem: yes
22:26:07 cfriesen I'm working my way up the stack trying to figure out where it got lost
22:26:22 mriedem well instance.image_meta -> ImageMeta.from_instance -> instance.system_metadata for all image_ keys
22:26:26 mriedem and it strips the image_ prefix
22:26:57 artom mordred?
22:26:58 cfriesen there's an "image_meta" argument that's passed down the call chain
22:27:48 sean-k-mooney there is also image meta in the instance and the request spec
22:27:59 sean-k-mooney we have several copies of it depended on where you are
22:29:15 cfriesen hmm...ComputeManager._finish_resize_helper() does this: image_meta = objects.ImageMeta.from_dict(image)
22:30:32 mordred artom: "Do you think egotistical lobsters are shellfish?" :)
22:46:37 cfriesen mriedem: it looks like the culprit is that call in _finish_resize_helper(). image.properties has "traits_required", but image_meta.properties doesn't.
22:48:15 mriedem cfriesen: i think i know why
22:48:40 mriedem https://github.com/openstack/nova/blob/master/nova/conductor/tasks/migrate.py#L296
22:49:00 mriedem resize gets the RequestSpec.image rather than Instance.image_meta
22:49:16 mriedem which might not have the fancy translation of ImageMeta.properties.traits_required
22:50:35 cfriesen okay, but in _finish_resize_helper() the "image" argument seems to have a valid image.properties
22:50:58 cfriesen the call to objects.ImageMeta.from_dict(image) seems to be corrupting the image properties
22:51:12 cfriesen dropping the "traits_required"
22:52:33 cfriesen looks like "traits_required" has some special-casing in objects/image_meta.py
22:52:38 cfriesen wonder if something is messed up
22:58:03 openstackgerrit Merged openstack/os-vif master: Add "master" parameter to ip.set() API function https://review.openstack.org/639702
23:04:55 melwitt zzzeek: I recently learned func.sum will return a Decimal object (https://review.openstack.org/639216) but I can't find where in the documentation I can learn what type will be returned from various func. can you point me to a doc I missed?
23:08:42 cfriesen mriedem: I think I see what's wrong. In _finish_resize_helper() the "image" argument looks like this, with "traits_required" already broken out: http://paste.openstack.org/show/746468/
23:09:40 cfriesen mriedem: but in ImageMetaProps.from_dict() it ignores "traits_required" and tries to build it up from the original "trait:xxxxxx" image property, which isn't there.
23:09:51 openstackgerrit Eric Fried proposed openstack/nova master: Test proper allocation of devices during reshape https://review.openstack.org/639854
23:11:22 sean-k-mooney cfriesen: the image metadata key never contains a ":"
23:11:47 cfriesen sean-k-mooney: yes it does, for traits
23:11:50 mriedem because it was already transformed and stored in system_metadata
23:12:00 sean-k-mooney cfriesen: nova uses namesapce:key=value
23:12:05 sean-k-mooney cfriesen: are you sure
23:12:11 mriedem ImageMetaProps.from_dict() is expecting the trait:COMPUTE_SECURITY_TPM_1_2=required format
23:12:14 sean-k-mooney i dont think its ment to be supproted
23:12:25 mriedem which in the api it parses to ImageMetaProps.traits_required right?
23:12:26 sean-k-mooney oh ok ignore me then
23:12:30 mriedem and then that is stored in system_metadata
23:12:36 cfriesen sean-k-mooney: https://specs.openstack.org/openstack/nova-specs/specs/rocky/implemented/glance-image-traits.html
23:12:48 cfriesen mriedem: yep
23:12:49 mriedem and then ImageMetaProps.from_dict from system_metadata image properties only has the "traits_required" entry
23:12:57 mriedem but not the original trait:COMPUTE_SECURITY_TPM_1_2=required
23:13:13 mriedem cfriesen: should be pretty easy to write a test to show the loss during conversion
23:13:44 sean-k-mooney cfriesen that was proably an oversigt in the spec...
23:13:48 mriedem hasn't been an issue yet because no one has used image traits beyond scheduling yet
23:14:01 cfriesen mriedem: seems likely
23:14:27 openstackgerrit Eric Fried proposed openstack/nova master: Test proper allocation of devices during reshape https://review.openstack.org/639854
23:15:25 sean-k-mooney cfriesen: looking at https://github.com/openstack/nova/blob/f7252b586b4b9f5a098fedfa27715b8f7e662af6/nova/notifications/objects/image.py#L184
23:15:35 sean-k-mooney it looks like its expecting traits_required
23:16:25 sean-k-mooney both the schema and field follow the normal convetion and use _
23:16:27 sean-k-mooney https://github.com/openstack/nova/blob/f7252b586b4b9f5a098fedfa27715b8f7e662af6/nova/notifications/objects/image.py#L253
23:17:17 mriedem those are the notification objects...
23:17:53 cfriesen sean-k-mooney: https://github.com/openstack/nova/blob/f7252b586b4b9f5a098fedfa27715b8f7e662af6/nova/objects/image_meta.py#L566 seems to explicitly ignore "traits_required"
23:21:09 sean-k-mooney hum ok that is stil rather confusing but ok
23:21:46 openstackgerrit Artom Lifshitz proposed openstack/nova master: Introduce live_migration_claim() https://review.openstack.org/635669
23:21:47 openstackgerrit Artom Lifshitz proposed openstack/nova master: New objects for NUMA live migration https://review.openstack.org/634827
23:21:47 openstackgerrit Artom Lifshitz proposed openstack/nova master: LM: add support for sending NUMAMigrateData to the source https://review.openstack.org/634828
23:21:48 openstackgerrit Artom Lifshitz proposed openstack/nova master: LM: add support for updating NUMA-related XML on the source https://review.openstack.org/635229
23:21:49 openstackgerrit Artom Lifshitz proposed openstack/nova master: RPC changes to prepare for NUMA live migration https://review.openstack.org/634605
23:21:49 openstackgerrit Artom Lifshitz proposed openstack/nova master: NUMA live migration support https://review.openstack.org/634606
23:22:04 mriedem cfriesen: i think that's in the case when the ImageMetaProps is built from the base image meta in the API
23:22:14 mriedem not the already-transferred form from system_metadata
23:22:34 mriedem i think it's meant to avoid setting ImageMetaProps.traits_required if the external image literally has a "traits_required" field
23:23:21 cfriesen I'm checking whether I can use instance.image_meta for nwo
23:23:32 mriedem removing that line probably fixes your problem
23:25:38 cfriesen looks like down in the guts of resize I can use instance.image_meta.properties.get('traits_required') and it works as expected
23:25:54 mriedem ew
23:25:55 cfriesen I think sorting out ImageMetaProps can be a separate issue
23:25:58 mriedem smells down there in the guts
23:26:30 cfriesen "instance" is already one of the args
23:26:53 sean-k-mooney cfriesen: i would hope it would be for a resize
23:35:14 sean-k-mooney cfriesen: one question in https://review.openstack.org/#/c/633256/4
23:35:29 sean-k-mooney ill try to get to https://review.openstack.org/#/c/631363/9 tommorrow
23:36:56 cfriesen sean-k-mooney: cool. I've almost got single-node resize working. would appreciate a test of multinode resize/migrate if you've got time.
23:38:18 sean-k-mooney do i need to install anyting non standard beyond having new enough qemu/libvirt
23:38:38 cfriesen sean-k-mooney: "swtpm" and "swtpm-tools" packages on fedora
23:39:12 sean-k-mooney ok cool ill proably use my centos test vms but i can spin up a fedora one if it does not have the package
23:40:15 cfriesen sean-k-mooney: you're thinking about allowing the flavor to explicitly forbid enabling vTPM? not sure why anyone would want to do that since it's purely a virtual thing.
23:40:22 sean-k-mooney if i have issue with nested virt i also have pysical servers i can test with too
23:40:50 sean-k-mooney cfriesen: it is but an operator may want to forbid it for live migration reasons
23:41:09 cfriesen sean-k-mooney: but we're going to make it support live migration, no?
23:41:32 sean-k-mooney yes but they may have old hyperviors
23:41:49 sean-k-mooney i guess they would have upgraded to stien anyway so its proably not important
23:42:02 cfriesen sean-k-mooney: then the dest won't advertise the trait
23:42:20 sean-k-mooney ya ok it shoudl be good
23:42:47 sean-k-mooney there some traits that operator may want ot forbid in the falvor expclitly but this likel is not one of them
#openstack-nova - 2019-02-28
00:04:04 openstackgerrit Chris Friesen proposed openstack/nova master: Flavor extra spec and image properties validation https://review.openstack.org/620706
00:57:17 openstackgerrit Matt Riedemann proposed openstack/nova master: Stop using "nova" in API samples when creating a server https://review.openstack.org/639874
00:57:18 mriedem uff da
01:17:09 openstackgerrit Merged openstack/os-vif master: add additional check and gate jobs for os-vif https://review.openstack.org/639732

Earlier   Later