Public bug reported:

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

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to