← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1175776] Re: [LOGGING] "instance_id" parameter is not converted to string during an exception from get-vnc-console

 

I see it's already fixed by commit
702fdf2fc1acc32b5ccd9e0830e574c42770ab5d (giving
instance_id=instance['uuid'] to InstanceNotFound exception in the
decorator used by get_vnc_console).

I hope I choosed the right bug status, if not, please set it to the
right status.

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

Title:
  [LOGGING] "instance_id" parameter is not converted to string during an
  exception from get-vnc-console

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  Description
  ===========
  The error message from the following command contains a variable name ("instance_id") instead of it's value, it happens when trying to get a vnc console of instance in error status:

  nova get-vnc-console 7d770210-d38d-45ac-9081-81afbb42d07d novnc

  Error:

  ERROR: Instance %(instance_id)s is not ready (HTTP 409) (Request-ID:
  req-1edc01b8-3c78-4e98-8229-a0d07271e464)

  Expected result
  ===============
  The "instance_id" parameter should be converted to the actual instance uuid.

  Reproduction
  ============
  It reproduces when the instance is for instance in error status, a reproduction can be achieved using the following command on all-in-one deployment:

  /etc/init.d/openstack-nova-compute stop ; nova get-vnc-console $(nova
  boot --flavor 2 --image $(nova image-list | grep ACTIVE | head -1 |
  cut -d" " -f 2,4) | awk '/\ id\ / {print $4}') novnc ; /etc/init.d
  /openstack-nova-compute start

  From /var/log/nova/api.log
  ==========================
  2013-05-02 22:03:19 INFO nova.api.openstack.wsgi [req-1edc01b8-3c78-4e98-8229-a0d07271e464 fdbffa3ce6b24193bff152a4628cef4e 3d0ebafd5bb44db09a71c3ba4325f003] POST http://10.35.1
  60.29:8774/v2/3d0ebafd5bb44db09a71c3ba4325f003/servers/7d770210-d38d-45ac-9081-81afbb42d07d/action
  2013-05-02 22:03:19 ERROR nova.exception [req-1edc01b8-3c78-4e98-8229-a0d07271e464 fdbffa3ce6b24193bff152a4628cef4e 3d0ebafd5bb44db09a71c3ba4325f003] Exception in string format 
  operation
  2013-05-02 22:03:19 23745 TRACE nova.exception Traceback (most recent call last):
  2013-05-02 22:03:19 23745 TRACE nova.exception   File "/usr/lib/python2.6/site-packages/nova/exception.py", line 147, in __init__
  2013-05-02 22:03:19 23745 TRACE nova.exception     message = self.message % kwargs
  2013-05-02 22:03:19 23745 TRACE nova.exception KeyError: u'instance_id'
  2013-05-02 22:03:19 23745 TRACE nova.exception 
  2013-05-02 22:03:19 ERROR nova.exception [req-1edc01b8-3c78-4e98-8229-a0d07271e464 fdbffa3ce6b24193bff152a4628cef4e 3d0ebafd5bb44db09a71c3ba4325f003] instance: {'vm_state': u'er
  ror', 'availability_zone': None, 'terminated_at': None, 'ephemeral_gb': 0L, 'instance_type_id': 5L, 'user_data': None, 'vm_mode': None, 'deleted_at': None, 'reservation_id': u'r
  -vg064d8x', 'id': 1L, 'security_groups': [<nova.db.sqlalchemy.models.SecurityGroup object at 0x5cb3750>], 'disable_terminate': False, 'root_device_name': None, 'user_id': u'fdbf
  fa3ce6b24193bff152a4628cef4e', 'uuid': u'7d770210-d38d-45ac-9081-81afbb42d07d', 'server_name': None, 'default_swap_device': None, 'info_cache': <nova.db.sqlalchemy.models.Instan
  ceInfoCache object at 0x5cb34d0>, 'hostname': u'rhel64-vlan-212-1', 'launched_on': None, 'display_description': u'rhel64_vlan_212_1', 'key_data': u'ssh-rsa AAAAB3NzaC1yc2EAAAABI
  wAAAQEA4uvt3GzY8zuZm1LfR/UriZOG+dzkEESOaNc6sb0a5tuavT1qWUveaICvL/xvLXP/kq3PiIg5BHRoaHEOAsmeR281PcU2qxuxdHJrhUo7xhXZpI1u9P7fcbSPB5hvaypEcfPSUdQigAq3GkfWbn/5EWfyRtfOw2Oia+37oOFS04
  8KyuzTZNmSQPTaQwzEZSLyZtzTiajsm9AXCwL+I4GC5dkx+NJ/NySDoW9m0ygCMrRkj7v6exF4Htf1gzYs2sodjvImS0mfZyzwrOx9ESux1SxU0paayptPOH9scGWxPkHiRzr+a4SDmGfZ7OdLW6wvdyixo9kTMje7orcxjA7NQQ== Ge
  nerated by Nova\n', 'deleted': False, 'config_drive': u'', 'power_state': 0L, 'default_ephemeral_device': None, 'progress': 0L, 'project_id': u'3d0ebafd5bb44db09a71c3ba4325f003'
  , 'launched_at': None, 'scheduled_at': None, 'ramdisk_id': u'', 'access_ip_v6': None, 'access_ip_v4': None, 'kernel_id': u'', 'key_name': u'oskey', 'updated_at': datetime.dateti
  me(2013, 5, 2, 19, 0, 53), 'host': None, 'display_name': u'rhel64_vlan_212_1', 'task_state': None, 'shutdown_terminate': False, 'root_gb': 20L, 'locked': False, 'name': 'instanc
  e-00000001', 'created_at': datetime.datetime(2013, 5, 2, 19, 0, 53), 'launch_index': 0L, 'memory_mb': 2048L, 'instance_type': <nova.db.sqlalchemy.models.InstanceTypes object at 
  0x5cb3650>, 'vcpus': 1L, 'image_ref': u'c18ed9e2-d3a7-4ab5-80e7-5751f7b66203', 'architecture': None, 'auto_disk_config': None, 'os_type': None, 'metadata': []}
  2013-05-02 22:03:19 ERROR nova.exception [req-1edc01b8-3c78-4e98-8229-a0d07271e464 fdbffa3ce6b24193bff152a4628cef4e 3d0ebafd5bb44db09a71c3ba4325f003] code: 400
  2013-05-02 22:03:19 INFO nova.api.openstack.wsgi [req-1edc01b8-3c78-4e98-8229-a0d07271e464 fdbffa3ce6b24193bff152a4628cef4e 3d0ebafd5bb44db09a71c3ba4325f003] HTTP exception thro
  wn: Instance %(instance_id)s is not ready
  2013-05-02 22:03:19 INFO nova.api.openstack.wsgi [req-1edc01b8-3c78-4e98-8229-a0d07271e464 fdbffa3ce6b24193bff152a4628cef4e 3d0ebafd5bb44db09a71c3ba4325f003] http://10.35.160.29
  :8774/v2/3d0ebafd5bb44db09a71c3ba4325f003/servers/7d770210-d38d-45ac-9081-81afbb42d07d/action returned with HTTP 409
  2013-05-02 22:03:19 INFO nova.osapi_compute.wsgi.server [req-1edc01b8-3c78-4e98-8229-a0d07271e464 fdbffa3ce6b24193bff152a4628cef4e 3d0ebafd5bb44db09a71c3ba4325f003] 10.35.160.29 - - [02/May/2013 22:03:19] "POST /v2/3d0ebafd5bb44db09a71c3ba4325f003/servers/7d770210-d38d-45ac-9081-81afbb42d07d/action HTTP/1.1" 409 282 0.094766

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