Pre-load instance.device_metadata in InstanceMetadata
Change Ie7d97ce5c62c8fb9da5822590a64210521f8ae7a orphans
the Instance object so that we can pickle it. However,
this means we can't lazy-load any attributes that we need
when building up metadata, like when building the config
drive during server create. We need to pre-load the
device_metadata field so it's available when building
the config drive.
This isn't a problem for the libvirt driver since it
loads device_metadata before building the config drive,
but the hyperv driver doesn't do that, so the change
above breaks hyperv when there are device tags without
this fix.
Reviewed: https:/ /review. openstack. org/481235 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=004d5ed1f3e 35d43dc5726aa80 d31429b931bd45
Committed: https:/
Submitter: Jenkins
Branch: master
commit 004d5ed1f3e35d4 3dc5726aa80d314 29b931bd45
Author: Matt Riedemann <email address hidden>
Date: Thu Jul 6 16:56:02 2017 -0400
Pre-load instance. device_ metadata in InstanceMetadata
Change Ie7d97ce5c62c8f b9da5822590a642 10521f8ae7a orphans
the Instance object so that we can pickle it. However,
this means we can't lazy-load any attributes that we need
when building up metadata, like when building the config
drive during server create. We need to pre-load the
device_metadata field so it's available when building
the config drive.
This isn't a problem for the libvirt driver since it
loads device_metadata before building the config drive,
but the hyperv driver doesn't do that, so the change
above breaks hyperv when there are device tags without
this fix.
Change-Id: I08b905d2734ff9 d484b373369f36d 48c4d056fd8
Closes-Bug: #1702150