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

commit d88a2f00e184475258eebe4f6a2bff8a6b9e341f
Author: liyingjun <yingjun...@kylin-cloud.com>
Date:   Wed Feb 22 11:20:12 2017 +0800

    Error message should not include SQL command
    
    There is SQL command included in the http response for conflicting
    resource provider. We should remove SQL related errors from the
    error message.
    
    Change-Id: I47726919f9a2d2a767564909f454c334e42ffbe0
    Closes-bug: 1664117


** 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/1664117

Title:
  Error message should not include SQL command

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Description
  ===========
  When i create one resource provider with existed one's name,
  returned error message includes SQL command.

  Steps to reproduce
  ==================
  * Create one resource provider with name 'RP_test'
  * Create another resource provider with name 'RP_test'

  Expected result
  ===============
        "detail": "There was a conflict when trying to complete your 
request.\n\n Conflicting resource provider RP_test already exists.",

  I think message above is detailed enough.

  Actual result
  =============
        "detail": "There was a conflict when trying to complete your 
request.\n\n Conflicting resource provider already exists: 
(pymysql.err.IntegrityError) (1062, u\"Duplicate entry 'RP_test' for key 
'uniq_resource_providers0name'\") [SQL: u'INSERT INTO resource_providers 
(created_at, updated_at, uuid, name, generation, can_host) VALUES 
(%(created_at)s, %(updated_at)s, %(uuid)s, %(name)s, %(generation)s, 
%(can_host)s)'] [parameters: {'uuid': 'cfafc096-4b15-4dc1-bb44-2bad0cd6d9e5', 
'generation': 0, 'created_at': datetime.datetime(2017, 2, 13, 5, 27, 41, 
686138), 'updated_at': None, 'can_host': 0, 'name': u'RP_test'}]  ",

  Environment
  ===========
  1. nova version
  [root@controller nova]# git log
  commit 50d402821be7476eb58ccd791c50d8ed801e85eb
  Author: Matt Riedemann <mrie...@us.ibm.com>
  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/1664117/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to