Sporadic gate issue: AttributeError: _strptime

Bug #1557021 reported by Mehdi Abaakouk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gnocchi
Fix Released
Critical
Mehdi Abaakouk

Bug Description

Gate often fail with:

Traceback (most recent call last):
  File "gnocchi/tests/base.py", line 55, in skip_if_not_implemented
    return func(*args, **kwargs)
  File "gnocchi/tests/test_rest.py", line 522, in test_get_resource_missing_named_metric_measure_aggregation
    "value": 16}])
  File "/home/jenkins/workspace/gate-gnocchi-tox-db-py27-mysql/.tox/py27-mysql/local/lib/python2.7/site-packages/webtest/utils.py", line 37, in wrapper
    return self._gen_request(method, url, **kw)
  File "/home/jenkins/workspace/gate-gnocchi-tox-db-py27-mysql/.tox/py27-mysql/local/lib/python2.7/site-packages/webtest/app.py", line 736, in _gen_request
    expect_errors=expect_errors)
  File "gnocchi/tests/test_rest.py", line 90, in do_request
    self.storage.process_background_tasks(self.indexer, sync=True)
  File "gnocchi/storage/__init__.py", line 185, in process_background_tasks
    self.process_measures(index, block_size, sync)
  File "gnocchi/storage/_carbonara.py", line 406, in process_measures
    ignore_too_old_timestamps=True)
  File "gnocchi/carbonara.py", line 239, in set_values
    before_truncate_callback(self)
  File "gnocchi/storage/_carbonara.py", line 399, in _map_add_measures
    for aggregation in agg_methods
  File "gnocchi/storage/_carbonara.py", line 503, in _map_in_thread
    return list(executor.map(lambda args: method(*args), list_of_args))
  File "/home/jenkins/workspace/gate-gnocchi-tox-db-py27-mysql/.tox/py27-mysql/local/lib/python2.7/site-packages/concurrent/futures/_base.py", line 581, in result_iterator
    yield future.result()
  File "/home/jenkins/workspace/gate-gnocchi-tox-db-py27-mysql/.tox/py27-mysql/local/lib/python2.7/site-packages/concurrent/futures/_base.py", line 398, in result
    return self.__get_result()
  File "/home/jenkins/workspace/gate-gnocchi-tox-db-py27-mysql/.tox/py27-mysql/local/lib/python2.7/site-packages/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "gnocchi/storage/_carbonara.py", line 503, in <lambda>
    return list(executor.map(lambda args: method(*args), list_of_args))
  File "gnocchi/storage/_carbonara.py", line 212, in _add_measures
    ts.update(timeserie)
  File "gnocchi/carbonara.py", line 509, in update
    self._resample(first_timestamp)
  File "gnocchi/carbonara.py", line 453, in _resample
    aggregated = agg_func(self.q)
  File "<string>", line 42, in quantile
  File "/home/jenkins/workspace/gate-gnocchi-tox-db-py27-mysql/.tox/py27-mysql/local/lib/python2.7/site-packages/pandas/core/groupby.py", line 481, in __getattr__
    if attr in self.obj:
  File "/home/jenkins/workspace/gate-gnocchi-tox-db-py27-mysql/.tox/py27-mysql/local/lib/python2.7/site-packages/pandas/core/generic.py", line 841, in __contains__
    return key in self._info_axis
  File "/home/jenkins/workspace/gate-gnocchi-tox-db-py27-mysql/.tox/py27-mysql/local/lib/python2.7/site-packages/pandas/tseries/base.py", line 147, in __contains__
    res = self.get_loc(key)
  File "/home/jenkins/workspace/gate-gnocchi-tox-db-py27-mysql/.tox/py27-mysql/local/lib/python2.7/site-packages/pandas/tseries/index.py", line 1428, in get_loc
    return self._get_string_slice(key)
  File "/home/jenkins/workspace/gate-gnocchi-tox-db-py27-mysql/.tox/py27-mysql/local/lib/python2.7/site-packages/pandas/tseries/index.py", line 1474, in _get_string_slice
    _, parsed, reso = parse_time_string(key, freq)
  File "/home/jenkins/workspace/gate-gnocchi-tox-db-py27-mysql/.tox/py27-mysql/local/lib/python2.7/site-packages/pandas/tseries/tools.py", line 521, in parse_time_string
    yearfirst=yearfirst)
  File "pandas/tslib.pyx", line 1753, in pandas.tslib.parse_datetime_string_with_reso (pandas/tslib.c:32019)
  File "pandas/tslib.pyx", line 1857, in pandas.tslib._parse_dateabbr_string (pandas/tslib.c:33882)
AttributeError: _strptime

Cheers;

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to gnocchi (master)

Fix proposed to branch: master
Review: https://review.openstack.org/292465

Changed in gnocchi:
assignee: nobody → Mehdi Abaakouk (sileht)
status: New → In Progress
Julien Danjou (jdanjou)
Changed in gnocchi:
importance: Undecided → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to gnocchi (master)

Reviewed: https://review.openstack.org/292465
Committed: https://git.openstack.org/cgit/openstack/gnocchi/commit/?id=9086e8ce09fd580cefc87cf41a8c677f135e4a50
Submitter: Jenkins
Branch: master

commit 9086e8ce09fd580cefc87cf41a8c677f135e4a50
Author: Mehdi Abaakouk <email address hidden>
Date: Mon Mar 14 16:42:26 2016 +0100

    workaround to _strptime import issue on py2

    This is a workaround to avoid to trigger:
    http://bugs.python.org/issue7980

    Change-Id: I154d4eca3f5c9350df169b931df3bd5154a487b7
    Closes-bug: #1557021

Changed in gnocchi:
status: In Progress → Fix Committed
Julien Danjou (jdanjou)
Changed in gnocchi:
milestone: none → 2.1.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.