[nova][ops] Migrating instances with old extra specs info.

Jay Pipes jaypipes at gmail.com
Mon Dec 3 16:56:17 UTC 2018


On 12/03/2018 11:32 AM, Roman Dobosz wrote:
> On Mon, 3 Dec 2018 10:07:18 -0500
> Jay Pipes <jaypipes at gmail.com> wrote:
> 
>>> Is it a bug? Or maybe it is possible to change the instance flavor
>>> extra spec?
>>
>> Not sure it's a bug, per-se... might just be something you need to
> 
> At least unexpected behavior :)

It's not unexpected behaviour at all. The behaviour of Nova when 
changing a flavor's details has been (for many releases) that the 
flavor's details are changed but flavor data for already-launched 
instances does not change. Just like you can delete a flavor but it 
doesn't affect already-launched instances because we store the details 
of the original instance.

The root of the problem you are experiencing is that flavor extra-specs 
is a pile of half-standardized random key-value information instead of 
structured, standardized quantitative and qualitative information 
(*gasp* that's what resource classes and traits are in placement...)

Which is why I say this isn't actually unexpected behaviour or really a bug.

>> manually change database records for, though. Sucks, since it's hacky,
>> but not sure if it's something we should change in the API contract.
> 
> I'd be happy with nova-manage command for update extra specs in
> instance info, it doesn't need to be an API change :)

mysql -u$USER -p$PASSWORD -Dnova -e"UPDATE instance_extra SET flavor = 
REPLACE(flavor, 'old string', 'new string')"

There, no need for a nova-manage command.

Best,
-jay

p.s. test the above on a copy of your production DB before you trust 
it... :)



More information about the openstack-discuss mailing list