← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1682693] Re: not-tags cannot work properly

 

** Tags added: api cells ocata-backport-potential

** Changed in: nova
   Importance: Undecided => High

** Changed in: nova
       Status: New => Confirmed

** Also affects: nova/ocata
   Importance: Undecided
       Status: New

** Changed in: nova/ocata
       Status: New => Confirmed

** Changed in: nova/ocata
   Importance: Undecided => High

-- 
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/1682693

Title:
  not-tags cannot work properly

Status in OpenStack Compute (nova):
  Confirmed
Status in OpenStack Compute (nova) ocata series:
  Confirmed

Bug description:
  When there is no tags in the system and user uses "nova list --not-tags xxx",
  HTTP 500 will return:

  root@SZX1000291918:/var/log/nova# nova list --not-tags 123
  /usr/local/lib/python2.7/dist-packages/novaclient/client.py:278: UserWarning: The 'tenant_id' argument is deprecated in Ocata and its use may result in errors in future releases. As 'project_id' is provided, the 'tenant_id' argument will be ignored.
    warnings.warn(msg)
  ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <type 'exceptions.IndexError'> (HTTP 500) (Request-ID: req-225940e7-1976-4ec9-8970-a8c2b4b103ea)

  
  nova-api Logs:
  2017-04-14 09:34:29.952 111211 DEBUG oslo_db.sqlalchemy.engines [req-225940e7-1976-4ec9-8970-a8c2b4b103ea f9e4d94bbfbd4cf1b774108650faa855 d4fd94accf2a4718b2ec8100e4e2e5f1 - default default] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION _check_effective_sql_mode /usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/engines.py:260
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions [req-225940e7-1976-4ec9-8970-a8c2b4b103ea f9e4d94bbfbd4cf1b774108650faa855 d4fd94accf2a4718b2ec8100e4e2e5f1 - default default] Unexpected exception in API method
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions Traceback (most recent call last):
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/extensions.py", line 336, in wrapped
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     return f(*args, **kwargs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/validation/__init__.py", line 181, in wrapper
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     return func(*args, **kwargs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/validation/__init__.py", line 181, in wrapper
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     return func(*args, **kwargs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/compute/servers.py", line 167, in detail
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     servers = self._get_servers(req, is_detail=True)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/compute/servers.py", line 310, in _get_servers
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     sort_keys=sort_keys, sort_dirs=sort_dirs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 2572, in get_all
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     sort_dirs=sort_dirs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 2657, in _get_instances_by_filters_all_cells
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     **kwargs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 2688, in _get_instances_by_filters
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     expected_attrs=fields, sort_keys=sort_keys, sort_dirs=sort_dirs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 184, in wrapper
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     result = fn(cls, context, *args, **kwargs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/objects/instance.py", line 1220, in get_by_filters
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     use_slave=use_slave, sort_keys=sort_keys, sort_dirs=sort_dirs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 236, in wrapper
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     return f(*args, **kwargs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/objects/instance.py", line 1204, in _get_by_filters_impl
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     sort_keys=sort_keys, sort_dirs=sort_dirs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/db/api.py", line 763, in instance_get_all_by_filters_sort
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     sort_dirs=sort_dirs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 180, in wrapper
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     return f(*args, **kwargs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 281, in wrapped
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     return f(context, *args, **kwargs)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 2211, in instance_get_all_by_filters_sort
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions     first_tag = tags.pop(0)
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions IndexError: pop from empty list
  2017-04-14 09:34:29.955 111211 ERROR nova.api.openstack.extensions
  2017-04-14 09:34:29.958 111211 INFO nova.api.openstack.wsgi [req-225940e7-1976-4ec9-8970-a8c2b4b103ea f9e4d94bbfbd4cf1b774108650faa855 d4fd94accf2a4718b2ec8100e4e2e5f1 - default default] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <type 'exceptions.IndexError'>
  2017-04-14 09:34:29.959 111211 DEBUG nova.api.openstack.wsgi [req-225940e7-1976-4ec9-8970-a8c2b4b103ea f9e4d94bbfbd4cf1b774108650faa855 d4fd94accf2a4718b2ec8100e4e2e5f1 - default default] Returning 500 to user: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <type 'exceptions.IndexError'> __call__ /opt/stack/nova/nova/api/openstack/wsgi.py:1041
  2017-04-14 09:34:29.960 111211 INFO nova.osapi_compute.wsgi.server [req-225940e7-1976-4ec9-8970-a8c2b4b103ea f9e4d94bbfbd4cf1b774108650faa855 d4fd94accf2a4718b2ec8100e4e2e5f1 - default default] 10.229.45.145 "GET /v2.1/servers/detail?not-tags=123 HTTP/1.1" status: 500 len: 563 time: 0.1029530

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


References