EEXIST stack trace when removing measures files

Bug #1619509 reported by Danek Duvall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gnocchi
Fix Released
Undecided
Danek Duvall

Bug Description

I'm getting this stack trace in the gnocchi-metricd logs:

    [-] Error processing new measures
    Traceback (most recent call last):
      File ".../gnocchi/storage/_carbonara.py", line 434, in process_measures
        ts.serialize())
      File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
        self.gen.next()
      File ".../gnocchi/storage/file.py", line 194, in _process_measure_for_metric
        self._delete_measures_files_for_metric_id(metric.id, files)
      File ".../gnocchi/storage/file.py", line 167, in _delete_measures_files_for_metric_id
        os.rmdir(self._build_measure_path(metric_id))
    OSError: [Errno 17] File exists: '/var/lib/gnocchi/measure/a9a09b69-58d0-4edb-a944-8f492cf7dcc1'

This is because on Solaris, rmdir() sets errno to EEXIST when there are entries in the directory you're trying to remove, not ENOTEMPTY.

Changed in gnocchi:
assignee: nobody → Danek Duvall (danek-duvall)
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/364601

Changed in gnocchi:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to gnocchi (master)

Reviewed: https://review.openstack.org/364601
Committed: https://git.openstack.org/cgit/openstack/gnocchi/commit/?id=10fd2690d46f12709b9666ffd602843a666e94ed
Submitter: Jenkins
Branch: master

commit 10fd2690d46f12709b9666ffd602843a666e94ed
Author: Danek Duvall <email address hidden>
Date: Thu Sep 1 17:26:53 2016 -0700

    Ignore EEXIST when removing measures directories

    On Linux, rmdir() sets errno to ENOTEMPTY when the directory is not
    empty. On Solaris, it sets errno to EEXIST. They should be treated
    equivalently here.

    Change-Id: I1024e757ac46936a421cc2a1013a0b5735747719
    Closes-Bug: #1619509

Changed in gnocchi:
status: In Progress → Fix Committed
Julien Danjou (jdanjou)
Changed in gnocchi:
milestone: none → 3.0.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.