← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1663163] Re: Improper prompt when update existed resource class

 

Reviewed:  https://review.openstack.org/431392
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ff1133c8ba649d6bfe2af6abc68bf42ebb68831e
Submitter: Jenkins
Branch:    master

commit ff1133c8ba649d6bfe2af6abc68bf42ebb68831e
Author: ericxiett <eric_xiett@xxxxxxx>
Date:   Thu Feb 9 16:55:11 2017 +0800

    Fix improper prompt when update RC with existed one's name.
    
    When update resource class with existed one's name,
    the exception message was formatted by the updated resource
    class's name, rather than the required existed one's name.
    This patch formats the message with existed one's name, and
    changing tests to add the right name.
    
    Change-Id: I78ae8d872748de243d74b9954ce634fccf5e7310
    Closes-Bug: #1663163


** Changed in: nova
       Status: In Progress => 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/1663163

Title:
  Improper prompt when update existed resource class

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Description
  ===========
  When i updated the resource class 'CUSTOM_A' with name 'CUSTOM_B', which resource class 'CUSTOM_B' exists,
  the prompt returned by Placement API was 'Resource class already exists: CUSTOM_A'.
  But it should be 'CUSTOM_B' that already exists.

  Steps to reproduce
  ==================
  * POST http://**IP**/placement/resource_classes
  {
      "name": "CUSTOM_A"
  }
  * POST http://**IP**/placement/resource_classes
  {
      "name": "CUSTOM_B"
  }
  * PUT http://172.23.28.30/placement/resource_classes/CUSTOM_A
  {
      "name": "CUSTOM_B"
  }

  Expected result
  ===============
  Response:
  {
    "errors": [
      {
        "status": 409,
        "request_id": "req-111941ae-839c-4e3e-92fb-eb76a692567c",
        "detail": "There was a conflict when trying to complete your request.\n\n Resource class already exists: CUSTOM_B  ",
        "title": "Conflict"
      }
    ]
  }

  Actual result
  =============
  {
    "errors": [
      {
        "status": 409,
        "request_id": "req-111941ae-839c-4e3e-92fb-eb76a692567c",
        "detail": "There was a conflict when trying to complete your request.\n\n Resource class already exists: CUSTOM_A  ",
        "title": "Conflict"
      }
    ]
  }

  Environment
  ===========
  1. nova version
  [root@controller nova]# git log
  commit 50d402821be7476eb58ccd791c50d8ed801e85eb
  Author: Matt Riedemann <mriedem@xxxxxxxxxx>
  Date:   Wed Feb 8 10:23:14 2017 -0500

      Consider startup scenario in _get_compute_nodes_in_db

  2. Which hypervisor did you use?
  devstack + libvirt + kvm

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


References