Why can't see the changed size in the instance after changing flavor on OpenStack?

asked 2020-03-27 02:14:06 -0500

rawmain gravatar image

I have 2 flavors:

  • flavor1: 0MB
  • flavor2: 10000MB

I created a stack on OpenStack with flavor1. Now want to change flavor to flavor2. So in the OpenStack dashboard, I found the instance and selected 'Resize Instance' to set to flavor2.

I found it was indeed changed to flavor2 on the dashboard. I also checked by OpenStack's Nova CLI:

nova show [INSTANCE_NAME]

It has changed to flavor2.

However, when I login to the instance by ssh, check the spec, it was still flavor1.

In the 'Stacks' page of OpenStack dashboard, click the stack and see the details, it was flavor1 there!

$ grep Swap /proc/meminfo

SwapCached: 0 kB SwapTotal: 0 kB SwapFree: 0 kB

I tried to resize the instance by CLI

nova resize [INSTANCE_NAME] [FLAVOR_ID] --poll

ERROR (BadRequest): When resizing, instances must change flavor! (HTTP 400)

Also used heat template to change to flavor item and run again, got the same error as above.

I google it found should set nova config for that: https://ask.openstack.org/en/question/97350/unable-to-resize-instance/ (https://ask.openstack.org/en/question...), but now we can't change it's setting.

So 2 questions:

  1. Why the flavor information in the instance and stack page is different?
  2. How to change the flavor successfully without delete the stack?
edit retag flag offensive close merge delete


Are you try to resize disk size or memory size? I tried resize the memory from 2gb to 4gb by changing the flavor, it was working.

darkglobe gravatar imagedarkglobe ( 2020-03-30 23:16:32 -0500 )edit

I have to reboot with poweroff reboot -p works.

rawmain gravatar imagerawmain ( 2020-03-31 18:54:28 -0500 )edit