← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1521928] Re: Nova API v2.1 error to specify multiple different_hosts.

 

** Changed in: nova/liberty
       Status: Fix Committed => Fix Released

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

Title:
  Nova API v2.1 error to specify multiple different_hosts.

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) liberty series:
  Fix Released

Bug description:
  1.rpm -qa | grep nova
  openstack-novncproxy-12.0.0-1.el7.noarch
  openstack-console-12.0.0-1.el7.noarch
  openstack-common-12.0.0-1.el7.noarch
  openstack-conductor-12.0.0-1.el7.noarch
  openstack-cert-12.0.0-1.el7.noarch
  openstack-nova-api-12.0.0-1.el7.noarch
  openstack-nova-scheduler-12.0.0-1.el7.noarch
  python-novaclient-2.30.1-1.el7.noarch
  python-nova-12.0.0-1.el7.noarch

  2.log
  [server create request]
  POST /v2/28983b2ce4354747a9958de57ea9c328/servers HTTP/1.1
  Host: 220.xxx.xxx.xxx:8774
  X-Auth-Token: 54fdf9becfcc4540b009a29618f13545
  Content-Type: application/json
  Cache-Control: no-cache
  Postman-Token: 7c2f7922-7ac6-0667-0c09-a3a1587d60ba

  {
      "os:scheduler_hints": {
          "different_host": [
              "099b8bee-9264-48fe-a745-45b22f7ff79f",
              "99644acc-8893-4656-9481-0114efdbc9b6"
          ]
      },
      "server": {
          "name": "ccc",
          "imageRef": "df4191a9-caa6-496b-bed0-eb57ec683fcf",
          "flavorRef": "1",
          "networks": [
              {
                  "uuid": "fb0232ba-e9f0-423f-b928-aea3fd3741c7"
              }
          ],
          "availability_zone": "nova"
      }
  }

  [api response]
  Status 400 OK
  Time 768 ms

  Connection →
  Connection
  Options that are desired for the connection
  close
  Content-Length → 283
  Content-Type → application/json; charset=UTF-8
  Date → Wed, 02 Dec 2015 09:21:43 GMT
  Server → Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips
  X-Compute-Request-Id → req-f3702257-76b1-4f32-b07c-a0d3608c014f

  {
      "badRequest": {
          "message": "Invalid input for field/attribute different_host. Value: [u'099b8bee-9264-48fe-a745-45b22f7ff79f', u'99644acc-8893-4656-9481-0114efdbc9b6']. [u'099b8bee-9264-48fe-a745-45b22f7ff79f', u'99644acc-8893-4656-9481-0114efdbc9b6'] is not a 'uuid'",
          "code": 400
      }
  }

  [nova-api.log]
  2015-12-02 09:21:43.975 22018 DEBUG nova.osapi_compute.wsgi.server [-] (22018) accepted ('192.168.0.22', 43272) server /usr/lib/python2.7/site-packages/eventlet/wsgi.py:826
  2015-12-02 09:21:43.982 22018 DEBUG nova.api.openstack.wsgi [req-f3702257-76b1-4f32-b07c-a0d3608c014f 5c5696fa83854f7690e7fc36320bacd0 28983b2ce4354747a9958de57ea9c328 - - -] Action: 'create', calling method: <bound method ServersController.create of <nova.api.openstack.compute.servers.ServersController object at 0x79c6110>>, body: {
      "os:scheduler_hints": {
          "different_host": [
              "099b8bee-9264-48fe-a745-45b22f7ff79f",
              "99644acc-8893-4656-9481-0114efdbc9b6"
          ]
      },
      "server": {
          "name": "ccc",
          "imageRef": "df4191a9-caa6-496b-bed0-eb57ec683fcf",
          "flavorRef": "1",
          "networks": [
              {
                  "uuid": "fb0232ba-e9f0-423f-b928-aea3fd3741c7"
              }
          ],
          "availability_zone": "nova"
      }
  } _process_stack /usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py:789
  2015-12-02 09:21:43.986 22018 DEBUG nova.api.openstack.wsgi [req-f3702257-76b1-4f32-b07c-a0d3608c014f 5c5696fa83854f7690e7fc36320bacd0 28983b2ce4354747a9958de57ea9c328 - - -] Returning 400 to user: Invalid input for field/attribute different_host. Value: [u'099b8bee-9264-48fe-a745-45b22f7ff79f', u'99644acc-8893-4656-9481-0114efdbc9b6']. [u'099b8bee-9264-48fe-a745-45b22f7ff79f', u'99644acc-8893-4656-9481-0114efdbc9b6'] is not a 'uuid' __call__ /usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py:1175
  2015-12-02 09:21:43.987 22018 INFO nova.osapi_compute.wsgi.server [req-f3702257-76b1-4f32-b07c-a0d3608c014f 5c5696fa83854f7690e7fc36320bacd0 28983b2ce4354747a9958de57ea9c328 - - -] xxx.xxx.xxx.xxx,192.168.0.22 "POST /v2/28983b2ce4354747a9958de57ea9c328/servers HTTP/1.1" status: 400 len: 493 time: 0.0096600

  [nova list]
  [root@liberty-controll-1 ~(keystone_admin)]# nova list --all-tenants --fields name,host_id
  +--------------------------------------+---------------------------+----------------------------------------------------------+
  | ID                                   | Name                      | Host Id                                                  |
  +--------------------------------------+---------------------------+----------------------------------------------------------+
  | 099b8bee-9264-48fe-a745-45b22f7ff79f | aa02                      | 9962f246261aeb103a440fdd0141da24e15b383a05573f50ed201616 |
  | 99644acc-8893-4656-9481-0114efdbc9b6 | aa03                      | f8bc3b367d0efd50a587acebcc887a020f776a5a14f3f2e9689cd639 |
  | 22bdd6e1-336b-4d74-a1c2-4d3eb1b776a2 | server-test2              | 9962f246261aeb103a440fdd0141da24e15b383a05573f50ed201616 |
  | 474603c5-dc69-456e-b237-5a502d79b2d2 | server-test3/server-test4 | f8bc3b367d0efd50a587acebcc887a020f776a5a14f3f2e9689cd639 |
  | 9205a464-6c81-475b-b632-7d0890b66e6e | test1                     | 36b8822f9a58a1fa1da66ed61482e4c599311eb62b4a73e0eac0be63 |
  | 25c1cebf-bbcd-4593-936d-79fe8af5b658 | test2                     | 936afc22f57c1a3f6513e4cec1a3ad6c8527173c6580bee4c303900c |
  | 8127f5a8-3a80-41ad-b937-ea1a3580f543 | test2                     | 936afc22f57c1a3f6513e4cec1a3ad6c8527173c6580bee4c303900c |
  | 118dfb58-3b46-4af4-ab59-77cdbdc2d4cb | test3                     | 936afc22f57c1a3f6513e4cec1a3ad6c8527173c6580bee4c303900c |
  | 5fc8378b-ad45-4af3-a317-2fc6c53fdd49 | test5                     | 36b8822f9a58a1fa1da66ed61482e4c599311eb62b4a73e0eac0be63 |
  | 525b845f-5edc-47b2-bd1a-172ab6efc7d8 | test6                     | 936afc22f57c1a3f6513e4cec1a3ad6c8527173c6580bee4c303900c |
  | 6d50a40b-3ca1-4861-8069-a3b20b4b158c | test7                     | 8065a46dcb5f3b23e4deaa5cab9e08b4dcccf57fa2fc089d81d0332d |
  | 351d9151-d616-4e29-996f-9be0fd2a87e8 | test8                     | 936afc22f57c1a3f6513e4cec1a3ad6c8527173c6580bee4c303900c |
  | ea909da4-5246-41cb-b070-5aab65214283 | test9                     | 36b8822f9a58a1fa1da66ed61482e4c599311eb62b4a73e0eac0be63 |
  +--------------------------------------+---------------------------+----------------------------------------------------------+

  3.step
  (1)create server aa02
  (2)create server aa03 with DifferentHostFilter(different_host=aa02_ID) -> OK
  (3)create server ccc  with DifferentHostFilter(different_host=aa02,aa03 ID) -> NG
   Error:
    nvalid input for field/attribute different_host. Value: [u'099b8bee-9264-48fe-a745-45b22f7ff79f', u'99644acc-8893-4656-9481-0114efdbc9b6']. [u'099b8bee-9264-48fe-a745-45b22f7ff79f', u'99644acc-8893-4656-9481-0114efdbc9b6'] is not a 'uuid'

  This error has not occured on "Kilo Compute v2" and "Juno Compute
  v2",but same error has occured on "Kilo Compute V2.1"

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


References