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

commit 723ee0195f11a2df819613728f12148290a100b4
Author: Sylvain Bauza <sba...@redhat.com>
Date:   Mon Sep 5 18:16:24 2016 +0200

    Update BuildRequest if instance currently being scheduled
    
    There are some cases where the instance is still waiting to be scheduled and
    consequently there is still a BuildRequest object where we would also like 
to
    update the instance attributes, like the display name.
    
    In that case, we need to update the nested instance field from the 
BuildRequest
    instead of trying to update the instance object itself, which could be 
located
    in a child cell.
    
    Change-Id: I97cd6dbae10ca1a29f646b0b25bc08edd699edca
    Closes-Bug: #1620248


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

Title:
  Can't rename instance right after creation (regression)

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  environment: latest devstack
  bug come from gating job: 
http://logs.openstack.org/66/357766/4/check/gate-functional-neutron-dsvm-ec2api/bd0d68d/logs/

  
  1) instance creation was successful:
  2016-09-05 08:46:53.165 995 DEBUG novaclient.v2.client 
[req-6bb4aca0-6181-49da-88b7-aa417cae68ba b24eb09f471a4a23910aac1e43b31019 
584db43c0b344f628f0c5ec565896f7b - - -] REQ: curl -g -i -X POST 
http://127.0.0.1:8774/v2.1/servers -H "User-Agent: python-novaclient" -H 
"Content-Type: application/json" -H "Accept: application/json" -H 
"X-OpenStack-Nova-API-Version: 2.10" -H "X-Auth-Token: 
{SHA1}265ec9d6a4e7c7aa9e817ea0e94a601153eaa6f9" -d '{"server": {"name": 
"r-arw7epu0-0", "imageRef": "3adede2d-bcc5-4aba-9cad-759ca6a03bd0", 
"availability_zone": "nova", "flavorRef": "16", "max_count": 1, "min_count": 1, 
"networks": [{"uuid": "532db1fe-13e1-44b1-8958-1ba64e250580"}]}}' 
_http_log_request 
/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py:206

  2016-09-05 08:46:53.613 995 DEBUG novaclient.v2.client 
[req-6bb4aca0-6181-49da-88b7-aa417cae68ba b24eb09f471a4a23910aac1e43b31019 
584db43c0b344f628f0c5ec565896f7b - - -] RESP: [202] Content-Length: 370 
Location: 
http://127.0.0.1:8774/v2.1/servers/6229c916-7cde-4c76-b26c-a9c13c36a1fc 
Content-Type: application/json Openstack-Api-Version: compute 2.10 
X-Openstack-Nova-Api-Version: 2.10 Vary: OpenStack-API-Version, 
X-OpenStack-Nova-API-Version X-Compute-Request-Id: 
req-287852b6-b247-4466-b0c3-2a740c0361e9 Date: Mon, 05 Sep 2016 08:46:53 GMT 
Connection: keep-alive 
  RESP BODY: {"server": {"security_groups": [{"name": "default"}], 
"OS-DCF:diskConfig": "MANUAL", "id": "6229c916-7cde-4c76-b26c-a9c13c36a1fc", 
"links": [{"href": 
"http://127.0.0.1:8774/v2.1/servers/6229c916-7cde-4c76-b26c-a9c13c36a1fc";, 
"rel": "self"}, {"href": 
"http://127.0.0.1:8774/servers/6229c916-7cde-4c76-b26c-a9c13c36a1fc";, "rel": 
"bookmark"}], "adminPass": "***"}}
   _http_log_response 
/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py:231

  
  2) but next call to update server has failed.
  2016-09-05 08:46:53.614 995 DEBUG novaclient.v2.client 
[req-6bb4aca0-6181-49da-88b7-aa417cae68ba b24eb09f471a4a23910aac1e43b31019 
584db43c0b344f628f0c5ec565896f7b - - -] POST call to compute for 
http://127.0.0.1:8774/v2.1/servers used request id 
req-287852b6-b247-4466-b0c3-2a740c0361e9 _log_request_id 
/usr/local/lib/python2.7/dist-packages/novaclient/client.py:85
  2016-09-05 08:46:53.619 995 DEBUG novaclient.v2.client 
[req-6bb4aca0-6181-49da-88b7-aa417cae68ba b24eb09f471a4a23910aac1e43b31019 
584db43c0b344f628f0c5ec565896f7b - - -] REQ: curl -g -i -X PUT 
http://127.0.0.1:8774/v2.1/servers/6229c916-7cde-4c76-b26c-a9c13c36a1fc -H 
"User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: 
application/json" -H "X-OpenStack-Nova-API-Version: 2.10" -H "X-Auth-Token: 
{SHA1}265ec9d6a4e7c7aa9e817ea0e94a601153eaa6f9" -d '{"server": {"name": 
"i-aca22cdc"}}' _http_log_request 
/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py:206

  2016-09-05 08:46:53.647 995 DEBUG novaclient.v2.client 
[req-6bb4aca0-6181-49da-88b7-aa417cae68ba b24eb09f471a4a23910aac1e43b31019 
584db43c0b344f628f0c5ec565896f7b - - -] RESP: [500] Openstack-Api-Version: 
compute 2.10 X-Openstack-Nova-Api-Version: 2.10 Vary: OpenStack-API-Version, 
X-OpenStack-Nova-API-Version Content-Type: application/json; charset=UTF-8 
Content-Length: 225 X-Compute-Request-Id: 
req-39cece3c-1787-4226-a661-61adbf34eec1 Date: Mon, 05 Sep 2016 08:46:53 GMT 
Connection: keep-alive 
  RESP BODY: {"computeFault": {"message": "Unexpected API Error. Please report 
this at http://bugs.launchpad.net/nova/ and attach the Nova API log if 
possible.\n<class 'oslo_versionedobjects.exception.OrphanedObjectError'>", 
"code": 500}}



  logs from nova-api:

  2016-09-05 08:46:53.626 23353 DEBUG nova.api.openstack.wsgi 
[req-39cece3c-1787-4226-a661-61adbf34eec1 user-62ad2e65 project-bd1b71ed] 
Action: 'update', calling method: <bound method ServersController.update of 
<nova.api.openstack.compute.servers.ServersController object at 
0x7ff5118499d0>>, body: {"server": {"name": "i-aca22cdc"}} _process_stack 
/opt/stack/new/nova/nova/api/openstack/wsgi.py:633
  2016-09-05 08:46:53.627 23353 DEBUG nova.compute.api 
[req-39cece3c-1787-4226-a661-61adbf34eec1 user-62ad2e65 project-bd1b71ed] 
[instance: 6229c916-7cde-4c76-b26c-a9c13c36a1fc] Fetching instance by UUID get 
/opt/stack/new/nova/nova/compute/api.py:2209
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions 
[req-39cece3c-1787-4226-a661-61adbf34eec1 user-62ad2e65 project-bd1b71ed] 
Unexpected exception in API method
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions Traceback 
(most recent call last):
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions   File 
"/opt/stack/new/nova/nova/api/openstack/extensions.py", line 338, in wrapped
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions     return 
f(*args, **kwargs)
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions   File 
"/opt/stack/new/nova/nova/api/validation/__init__.py", line 73, in wrapper
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions     return 
func(*args, **kwargs)
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions   File 
"/opt/stack/new/nova/nova/api/validation/__init__.py", line 73, in wrapper
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions     return 
func(*args, **kwargs)
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions   File 
"/opt/stack/new/nova/nova/api/validation/__init__.py", line 73, in wrapper
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions     return 
func(*args, **kwargs)
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions   File 
"/opt/stack/new/nova/nova/api/openstack/compute/servers.py", line 799, in update
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions     
instance.save()
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions   File 
"/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 
207, in wrapper
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions     
objtype=self.obj_name())
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions 
OrphanedObjectError: Cannot call save on orphaned Instance object
  2016-09-05 08:46:53.643 23353 ERROR nova.api.openstack.extensions 
  2016-09-05 08:46:53.644 23353 INFO nova.api.openstack.wsgi 
[req-39cece3c-1787-4226-a661-61adbf34eec1 user-62ad2e65 project-bd1b71ed] HTTP 
exception thrown: Unexpected API Error. Please report this at 
http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <class 'oslo_versionedobjects.exception.OrphanedObjectError'>
  2016-09-05 08:46:53.645 23353 DEBUG nova.api.openstack.wsgi 
[req-39cece3c-1787-4226-a661-61adbf34eec1 user-62ad2e65 project-bd1b71ed] 
Returning 500 to user: Unexpected API Error. Please report this at 
http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <class 'oslo_versionedobjects.exception.OrphanedObjectError'> __call__ 
/opt/stack/new/nova/nova/api/openstack/wsgi.py:1044
  2016-09-05 08:46:53.646 23353 INFO nova.osapi_compute.wsgi.server 
[req-39cece3c-1787-4226-a661-61adbf34eec1 user-62ad2e65 project-bd1b71ed] 
127.0.0.1 "PUT /v2.1/servers/6229c916-7cde-4c76-b26c-a9c13c36a1fc HTTP/1.1" 
status: 500 len: 594 time: 0.0250192

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1620248/+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