← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1746796] Re: Error Compute API - Live-Migrate Server

 

*** This bug is a duplicate of bug 1701451 ***
    https://bugs.launchpad.net/bugs/1701451

This all looks correct to me:

https://github.com/openstack/nova/blob/d189e682277b4b5d5b70c46a2ad065e29ccccb22/nova/api/openstack/compute/schemas/migrate_server.py#L48

You should have gotten a 400 response rather than a 500. My guess is you
were hitting the legacy v2 API code which didn't use jsonschema
validation and that's why you got a 500 error. That code is gone now and
you should be hitting the 2.1 endpoint.

OSC defaults disk_over_commit=False:

https://github.com/openstack/python-
openstackclient/blob/stable/ocata/openstackclient/compute/v2/server.py#L1054

So retry your request with that, or use microversion>=2.25.

** Changed in: nova
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1746796

Title:
  Error Compute API - Live-Migrate Server

Status in OpenStack Compute (nova):
  New

Bug description:
  Good afternoon,

  I'm experiencing difficulties with Computing API.

  When I migrate VMs by command line everything works fine.

  According to the command: openstack server migrate 7ca6ee39-bab1-422c-
  a19f-1b73d2aeaf31 --live compute1 (OK)

  But when I try to migrate through the API I get the following error:

  
  {"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n<type 'exceptions.KeyError'>", "code": 500}}

  
  To request a migration through the API I am using the following Json:

  Note: The variable $ TOKEN_AUTENTICACAO is all right, already testing.

          curl -s -H "Content-Type: application/json" -H "X-Auth-Token: $TOKEN_AUTENTICACAO" \
  	-X POST http://controller:8774/v2/servers/7ca6ee39-bab1-422c-a19f-1b73d2aeaf31/action \
          -d '{
                  "os-migrateLive": {
                          "host": "compute3",
                          "block_migration": "auto",
                          "force": false
                  }
          }'

  Can someone help me please? Sorry for English, I'm Brazilian.

  Follow the /var/log/nova/nova-api.log log

  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions [req-2e1b20c9-ca88-47b1-8ed3-976ad50c3f6e 77fe89f8145846bf9240428144f96fba 00e4a214dab74548b8728df515a2a9d7 - default default] Unexpected exception in API method
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions Traceback (most recent call last):
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/extensions.py", line 338, in wrapped
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions     return f(*args, **kwargs)
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions     return func(*args, **kwargs)
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions     return func(*args, **kwargs)
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions     return func(*args, **kwargs)
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/migrate_server.py", line 90, in _migrate_live
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions     disk_over_commit = body["os-migrateLive"]["disk_over_commit"]
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions KeyError: 'disk_over_commit'
  2018-02-01 17:54:34.413 3532 ERROR nova.api.openstack.extensions 
  2018-02-01 17:54:34.414 3532 INFO nova.api.openstack.wsgi [req-2e1b20c9-ca88-47b1-8ed3-976ad50c3f6e 77fe89f8145846bf9240428144f96fba 00e4a214dab74548b8728df515a2a9d7 - default default] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <type 'exceptions.KeyError'>
  2018-02-01 17:54:34.415 3532 INFO nova.osapi_compute.wsgi.server [req-2e1b20c9-ca88-47b1-8ed3-976ad50c3f6e 77fe89f8145846bf9240428144f96fba 00e4a214dab74548b8728df515a2a9d7 - default default] 10.0.0.2 "POST /v2/servers/74eb35a6-e9f5-4f44-b058-63dab362fc2e/action HTTP/1.1" status: 500 len: 399 time: 0.0144310

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1746796/+subscriptions


References