[Nova] - OS_TYPE - Setting after the fact.

Sean Mooney smooney at redhat.com
Mon Nov 15 16:53:47 UTC 2021


On Mon, 2021-11-15 at 15:35 +0000, Steven Relf wrote:
> Hey Sean,
> 
> Thanks for responding. 
> 
> It sounds like a nova-manage command is the way forward, to avoid editing the DB directly, the operator would then need to ensure no breaches of aggregate requirements. Ill have a look at the nova-mange command you have referenced.
> 
> We do now have the os_type set on all our provided images, but this doesn’t stop a customer uploading an image without it set. I guess that’s where a glance image plugin would come in, can you point me at some documentation for me to have a read around.
> 
> I don’t like the idea of having to resize, as these aren’t our instances, as we are operating a public cloud.
hi yes so there is an image property inject plugin but that is mainly to inject static metadata
https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html#the-image-property-injection-plugin
you would porably need to modify that to use libguestfs to inspect the image and then add the os_type based on what it finds.

> 
> On an aside, out of curiosity, why was the decision to not cascade these types of changes made, is it simply to provide immutability to instances?
immutablity is one reason and maintaining the validity fo its current placment.
adding cpu pinnign extra spec for example would invalidate the placment of any vm that did not have it set also via the flavor.
you could add traits requests as another exampel that would make some vm invlaide for there current host.

so in generall modifying the image extra specs on a runing instnace can invalidate the current placment of the vm due to chagne in the behavior of fliters
or alter the guest abi which might break worklaods. that is why we said this would have to be an operation that you oppted into (proppagation of update extra specs) rahter
then an operation that happened by default.

it become espically problematic for image with shared/ public or comunity visiblity as a minor chagne to adress a supprot request from one customer might impact other customers.
so to be safe we  making it immuntable for the lifetime of the the instance unless you change the image via a rebuild in the case of image properties or resize in the case of flavor extra specs.
> 
> Rgds
> Steve.
> 




More information about the openstack-discuss mailing list