exception in ceilometer middeware when reseller_prefix is set as empty string

Bug #1835894 reported by manu
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

when we set the reseller_prefix is set to empty string swift-proxy ceilometermiddleware runs into the following exception

STDERR: ERROR:ceilometermiddleware.swift:An exception occurred processing the API call: empty separator #012Traceback (most recent call last):#012 File "/usr/lib/python2.7/site-packages/ceilometermiddleware/swift.py", line 98, in wrapper#012 return fn(*args, **kwargs)#012 File "/usr/lib/python2.7/site-packages/ceilometermiddleware/swift.py", line 342, in emit_event#012 id=account.partition(self.reseller_prefix)[2] or path)#012ValueError: empty separator (txn: txc750116f2a644428b8577-005d239afb)

Revision history for this message
manu (manuvakery) wrote :

this can be fixed by adding a small check like below

if self.reseller_prefix:
   target = cadf_resource.Resource(
                id=account.partition(self.reseller_prefix)[2] or path)
  target = cadf_resource.Resource(

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.