resize server error

Asked by dimas zakky nalendra

I installed openstack (Essex) with singel node

I have running instance with id 75198f07-e377-4b6d-9dbf-ab5021df1e0f (flavor tiny.m1)

when I tried to resize with :
 nova --debug resize 75198f07-e377-4b6d-9dbf-ab5021df1e0f 2
its not reporting error

but when I tried to confirmed it, with :
 nova --debug resize-confirm 75198f07-e377-4b6d-9dbf-ab5021df1e0f
its get error :
  Instance is in an invalid state for 'confirmResize' (HTTP 409)

in nova.conf I added flag :
  --allow_resize_same_host = true

where was the wrong :???

thanks for advice :??

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
dimas zakky nalendra
Solved:
Last query:
Last reply:
Revision history for this message
dimas zakky nalendra (dimas-zakky) said :
#1

somebody help me :(

Revision history for this message
Belmiro Moreira (moreira-belmiro-email-lists) said :
#2

Hi,
I would suggest check your nova-compute logs for some error.
Also, you can check nova-scheduler logs to see if the VM was schedule to the compute node.
Can you ssh your machine?

Belmiro

Revision history for this message
dimas zakky nalendra (dimas-zakky) said :
#3

thanks
i will checking now

Revision history for this message
dimas zakky nalendra (dimas-zakky) said :
#4

this is the nova-scheduler.log when I execute resize command :
2012-11-21 21:37:12 DEBUG nova.rpc.amqp [-] received {u'_context_roles': [u'admin', u'KeystoneAdmin', u'KeystoneServiceAdmin'], u'_context_request_id': u'req-7c9c047d-acee-427e-8510-e3c09f5beb54', u'_context_read_deleted': u'no', u'args': {u'instance_uuid': u'9911a8d0-efaa-4514-84a1-18d844aca1e3', u'request_spec': {u'instance_properties': {u'vm_state': u'active', u'availability_zone': None, u'terminated_at': None, u'ephemeral_gb': 0, u'instance_type_id': 2, u'user_data': u'YXNkYXM=', u'vm_mode': None, u'deleted_at': None, u'reservation_id': u'r-1vkx0ca1', u'id': 1, u'security_groups': [{u'deleted_at': None, u'user_id': u'fdc08baa51394080953e3b2a1d03c0a0', u'name': u'default', u'deleted': False, u'created_at': u'2012-11-21 21:25:30', u'updated_at': None, u'rules': [], u'project_id': u'd4ef3920a3d94cfa8c3c4374aa675e33', u'id': 1, u'description': u'default'}], u'disable_terminate': False, u'root_device_name': u'/dev/vda', u'user_id': u'fdc08baa51394080953e3b2a1d03c0a0', u'uuid': u'9911a8d0-efaa-4514-84a1-18d844aca1e3', u'server_name': None, u'default_swap_device': None, u'info_cache': {u'deleted': False, u'created_at': u'2012-11-21 21:25:36', u'updated_at': u'2012-11-21 21:25:44', u'instance_id': u'9911a8d0-efaa-4514-84a1-18d844aca1e3', u'network_info': u'[{"network": {"bridge": "br100", "subnets": [{"ips": [{"meta": {}, "version": 4, "type": "fixed", "floating_ips": [], "address": "10.0.0.2"}], "version": 4, "meta": {"dhcp_server": "10.0.0.1"}, "dns": [{"meta": {}, "version": 4, "type": "dns", "address": "8.8.8.8"}, {"meta": {}, "version": 4, "type": "dns", "address": "8.8.4.4"}], "routes": [], "cidr": "10.0.0.0/24", "gateway": {"meta": {}, "version": 4, "type": "gateway", "address": "10.0.0.1"}}, {"ips": [], "version": null, "meta": {"dhcp_server": null}, "dns": [], "routes": [], "cidr": null, "gateway": {"meta": {}, "version": null, "type": "gateway", "address": null}}], "meta": {"tenant_id": null, "should_create_bridge": true, "bridge_interface": "dummy0"}, "id": "d2ea86aa-b433-467f-89d7-c748779fa63c", "label": "service"}, "meta": {}, "id": "cbe35204-cfeb-4f4f-84ae-d4fad3e9f923", "address": "fa:16:3e:6c:ac:f4"}]', u'deleted_at': None, u'id': 1}, u'hostname': u'dsa', u'launched_on': u'nova-controller', u'display_description': u'dsa', u'key_data': None, u'kernel_id': u'8ffb78cc-6963-4686-be83-b8dd66f43e81', u'config_drive': u'', u'power_state': 1, u'default_ephemeral_device': None, u'progress': 0, u'project_id': u'd4ef3920a3d94cfa8c3c4374aa675e33', u'launched_at': u'2012-11-21 21:25:57', u'scheduled_at': u'2012-11-21 21:25:37', u'ramdisk_id': u'', u'access_ip_v6': None, u'access_ip_v4': None, u'deleted': False, u'key_name': None, u'updated_at': u'2012-11-21 21:25:57', u'host': u'nova-controller', u'display_name': u'dsa', u'task_state': None, u'shutdown_terminate': True, u'cell_name': None, u'root_gb': 0, u'locked': False, u'name': u'instance-00000001', u'created_at': u'2012-11-21 21:25:36', u'launch_index': 0, u'memory_mb': 512, u'instance_type': {u'root_gb': 0, u'deleted_at': None, u'name': u'm1.tiny', u'deleted': False, u'created_at': None, u'ephemeral_gb': 0, u'updated_at': None, u'memory_mb': 512, u'vcpus': 1, u'swap': 0, u'rxtx_factor': 1.0, u'flavorid': u'1', u'vcpu_weight': None, u'id': 2}, u'vcpus': 1, u'image_ref': u'f2e354be-e75b-428f-a39f-256160b195fc', u'architecture': None, u'volumes': [], u'auto_disk_config': None, u'os_type': None, u'metadata': []}, u'instance_type': {u'root_gb': 1, u'name': u'asd', u'flavorid': u'6', u'deleted': False, u'created_at': u'2012-11-21 21:25:57', u'ephemeral_gb': 1, u'updated_at': None, u'memory_mb': 521, u'vcpus': 2, u'extra_specs': {}, u'swap': 0, u'rxtx_factor': 1.0, u'deleted_at': None, u'vcpu_weight': None, u'id': 6}, u'num_instances': 1}, u'image': {u'status': u'active', u'name': u'ttylinux-uec-amd64', u'deleted': False, u'container_format': u'ami', u'created_at': u'2012-11-09 02:58:53', u'disk_format': u'ami', u'updated_at': u'2012-11-09 02:58:53', u'properties': {u'kernel_id': u'8ffb78cc-6963-4686-be83-b8dd66f43e81'}, u'min_ram': u'0', u'checksum': u'10047a119149e08fb206eea89832eee0', u'min_disk': u'0', u'is_public': True, u'deleted_at': None, u'id': u'f2e354be-e75b-428f-a39f-256160b195fc', u'size': 25165824}, u'filter_properties': {u'ignore_hosts': [u'nova-controller']}, u'instance_type_id': 6, u'topic': u'compute', u'update_db': False}, u'_context_auth_token': '<SANITIZED>', u'_context_is_admin': True, u'_context_project_id': u'd4ef3920a3d94cfa8c3c4374aa675e33', u'_context_timestamp': u'2012-11-21T21:37:12.573409', u'_context_user_id': u'fdc08baa51394080953e3b2a1d03c0a0', u'method': u'prep_resize', u'_context_remote_address': u'127.0.0.1'} from (pid=892) _safe_log /usr/lib/python2.7/dist-packages/nova/rpc/common.py:160
2012-11-21 21:37:12 DEBUG nova.rpc.amqp [req-7c9c047d-acee-427e-8510-e3c09f5beb54 fdc08baa51394080953e3b2a1d03c0a0 d4ef3920a3d94cfa8c3c4374aa675e33] unpacked context: {'user_id': u'fdc08baa51394080953e3b2a1d03c0a0', 'roles': [u'admin', u'KeystoneAdmin', u'KeystoneServiceAdmin'], 'timestamp': '2012-11-21T21:37:12.573409', 'auth_token': '<SANITIZED>', 'remote_address': u'127.0.0.1', 'is_admin': True, 'request_id': u'req-7c9c047d-acee-427e-8510-e3c09f5beb54', 'project_id': u'd4ef3920a3d94cfa8c3c4374aa675e33', 'read_deleted': u'no'} from (pid=892) _safe_log /usr/lib/python2.7/dist-packages/nova/rpc/common.py:160
2012-11-21 21:37:12 WARNING nova.scheduler.manager [req-7c9c047d-acee-427e-8510-e3c09f5beb54 fdc08baa51394080953e3b2a1d03c0a0 d4ef3920a3d94cfa8c3c4374aa675e33] Failed to schedule_prep_resize: No valid host was found. Could not find another compute
2012-11-21 21:37:12 WARNING nova.scheduler.manager [req-7c9c047d-acee-427e-8510-e3c09f5beb54 fdc08baa51394080953e3b2a1d03c0a0 d4ef3920a3d94cfa8c3c4374aa675e33] Setting instance 9911a8d0-efaa-4514-84a1-18d844aca1e3 to ACTIVE state.
2012-11-21 21:37:13 DEBUG nova.rpc.amqp [req-7c9c047d-acee-427e-8510-e3c09f5beb54 fdc08baa51394080953e3b2a1d03c0a0 d4ef3920a3d94cfa8c3c4374aa675e33] Sending notification on notifications.error... from (pid=892) notify /usr/lib/python2.7/dist-packages/nova/rpc/amqp.py:384
2012-11-21 21:37:13 DEBUG nova.rpc.amqp [req-7c9c047d-acee-427e-8510-e3c09f5beb54 fdc08baa51394080953e3b2a1d03c0a0 d4ef3920a3d94cfa8c3c4374aa675e33] Pool creating new connection from (pid=892) create /usr/lib/python2.7/dist-packages/nova/rpc/amqp.py:60
2012-11-21 21:37:13 INFO nova.rpc.common [req-7c9c047d-acee-427e-8510-e3c09f5beb54 fdc08baa51394080953e3b2a1d03c0a0 d4ef3920a3d94cfa8c3c4374aa675e33] Connected to AMQP server on 192.168.1.25:5672
2012-11-21 21:37:13 DEBUG nova.rpc.amqp [req-7c9c047d-acee-427e-8510-e3c09f5beb54 fdc08baa51394080953e3b2a1d03c0a0 d4ef3920a3d94cfa8c3c4374aa675e33] Sending notification on monitor.error... from (pid=892) notify /usr/lib/python2.7/dist-packages/nova/rpc/amqp.py:384

and this is the log when I done resize --debug :
connect: (192.168.1.25, 5000)
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 192.168.1.25:5000\r\nContent-Length: 103\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "password"}}}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json
header: Vary: X-Auth-Token
header: Date: Wed, 21 Nov 2012 21:37:11 GMT
header: Transfer-Encoding: chunked
connect: (192.168.1.25, 80)
send: u'GET /compute/v1.1/d4ef3920a3d94cfa8c3c4374aa675e33/servers/9911a8d0-efaa-4514-84a1-18d844aca1e3 HTTP/1.1\r\nHost: 192.168.1.25\r\nx-auth-project-id: admin\r\nx-auth-token: 5acd269db3394c7db11b96a3d4546541\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Wed, 21 Nov 2012 21:37:12 GMT
header: X-Compute-Request-Id: req-e2c89264-3292-4162-ba29-09d07e0cbb0d
header: Content-Type: application/json
header: Content-Length: 1360
send: u'GET /compute/v1.1/d4ef3920a3d94cfa8c3c4374aa675e33/flavors/6 HTTP/1.1\r\nHost: 192.168.1.25\r\nx-auth-project-id: admin\r\nx-auth-token: 5acd269db3394c7db11b96a3d4546541\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Wed, 21 Nov 2012 21:37:12 GMT
header: X-Compute-Request-Id: req-a5964274-4dfe-4d3e-8298-d0ada399a1f6
header: Content-Type: application/json
header: Content-Length: 339
send: u'GET /compute/v1.1/d4ef3920a3d94cfa8c3c4374aa675e33/flavors/6 HTTP/1.1\r\nHost: 192.168.1.25\r\nx-auth-project-id: admin\r\nx-auth-token: 5acd269db3394c7db11b96a3d4546541\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Wed, 21 Nov 2012 21:37:12 GMT
header: X-Compute-Request-Id: req-44699efc-4888-41f1-88d5-410fb8bc670d
header: Content-Type: application/json
header: Content-Length: 339
send: u'GET /compute/v1.1/d4ef3920a3d94cfa8c3c4374aa675e33/servers/9911a8d0-efaa-4514-84a1-18d844aca1e3 HTTP/1.1\r\nHost: 192.168.1.25\r\nx-auth-project-id: admin\r\nx-auth-token: 5acd269db3394c7db11b96a3d4546541\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Wed, 21 Nov 2012 21:37:12 GMT
header: X-Compute-Request-Id: req-3977c552-5318-4af8-92dd-a03cc51f77e4
header: Content-Type: application/json
header: Content-Length: 1360
send: u'POST /compute/v1.1/d4ef3920a3d94cfa8c3c4374aa675e33/servers/9911a8d0-efaa-4514-84a1-18d844aca1e3/action HTTP/1.1\r\nHost: 192.168.1.25\r\nContent-Length: 30\r\nx-auth-project-id: admin\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nx-auth-token: 5acd269db3394c7db11b96a3d4546541\r\nuser-agent: python-novaclient\r\ncontent-type: application/json\r\n\r\n{"resize": {"flavorRef": "6"}}'
reply: 'HTTP/1.1 202 Accepted\r\n'
header: Date: Wed, 21 Nov 2012 21:37:12 GMT
header: Content-Type: text/html; charset=UTF-8
header: Vary: Accept-Encoding
header: Content-Encoding: gzip
header: Content-Length: 20

after that I checked with nova list and the status of the instance still ACTIVE not RESIZE

Revision history for this message
dimas zakky nalendra (dimas-zakky) said :
#5

the log above is because I'm not adding :
  allow_resize_to_same_host=True
in nova.conf

after i tried to add :
  allow_resize_to_same_host=True
i got an error :

2012-11-21 21:53:35 TRACE nova.rpc.amqp Traceback (most recent call last):
2012-11-21 21:53:35 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 253, in _process_data
2012-11-21 21:53:35 TRACE nova.rpc.amqp rval = node_func(context=ctxt, **node_args)
2012-11-21 21:53:35 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 114, in wrapped
2012-11-21 21:53:35 TRACE nova.rpc.amqp return f(*args, **kw)
2012-11-21 21:53:35 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 159, in decorated_function
2012-11-21 21:53:35 TRACE nova.rpc.amqp function(self, context, instance_uuid, *args, **kwargs)
2012-11-21 21:53:35 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 183, in decorated_function
2012-11-21 21:53:35 TRACE nova.rpc.amqp sys.exc_info())
2012-11-21 21:53:35 TRACE nova.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2012-11-21 21:53:35 TRACE nova.rpc.amqp self.gen.next()
2012-11-21 21:53:35 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 177, in decorated_function
2012-11-21 21:53:35 TRACE nova.rpc.amqp return function(self, context, instance_uuid, *args, **kwargs)
2012-11-21 21:53:35 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1300, in prep_resize
2012-11-21 21:53:35 TRACE nova.rpc.amqp raise exception.MigrationError(msg)
2012-11-21 21:53:35 TRACE nova.rpc.amqp MigrationError: destination same as source!
2012-11-21 21:53:35 TRACE nova.rpc.amqp

I found that in nova-compute.log

explain me that

Revision history for this message
dimas zakky nalendra (dimas-zakky) said :
#6

ohhhhh thanks God

the FLAGS allow_resize_to_same_host=True is have to add to both nova.conf and nova-api.conf
in explain in http://docs.openstack.org/trunk/openstack-compute/admin/content/configuring-openstack-compute-basics.html