Public bug reported:

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 <[email protected]>
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

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: placement

** Tags added: placement

-- 
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):
  New

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 <[email protected]>
  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     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to