← Back to team overview

graphite-dev team mailing list archive

[Question #171240]: Invalid retention format?

 

New question #171240 on Graphite:
https://answers.launchpad.net/graphite/+question/171240

Hi.

(Note: this is with graphite/carbon/whisper trunk.)

I was trying to add a new section to storage-schemas.conf with a retention setting of "10s:6h,1m:1w,10m:5y".  It initially chokes on the "m", but if I comment out all but the first component, it complains about the "6h":

Traceback (most recent call last):
  File "./bin/carbon-cache.py", line 30, in <module>
    run_twistd_plugin(__file__)
  File "/opt/graphite/lib/carbon/util.py", line 84, in run_twistd_plugin
    runApp(config)
  File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 23, in runApp
    _SomeApplicationRunner(config).run()
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 374, in run
    self.application = self.createOrGetApplication()
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 434, in createOrGetApplication
    ser = plg.makeService(self.config.subOptions)
  File "/opt/graphite/lib/twisted/plugins/carbon_cache_plugin.py", line 21, in makeService
    return service.createCacheService(options)
  File "/opt/graphite/lib/carbon/service.py", line 111, in createCacheService
    from carbon.writer import WriterService
  File "/opt/graphite/lib/carbon/writer.py", line 40, in <module>
    schemas = loadStorageSchemas()
  File "/opt/graphite/lib/carbon/storage.py", line 126, in loadStorageSchemas
    archives = [ Archive.fromString(s) for s in retentions ]
  File "/opt/graphite/lib/carbon/storage.py", line 110, in fromString
    (secondsPerPoint, points) = whisper.parseRetentionDef(retentionDef)
  File "/usr/local/lib/python2.7/dist-packages/whisper.py", line 96, in parseRetentionDef
    raise ValueError("Invalid unit: '%s'" % pointsUnit)
ValueError: Invalid unit: 'w'

Traceback (most recent call last):
  File "./bin/carbon-cache.py", line 30, in <module>
    run_twistd_plugin(__file__)
  File "/opt/graphite/lib/carbon/util.py", line 84, in run_twistd_plugin
    runApp(config)

  File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 23, in runApp
    _SomeApplicationRunner(config).run()
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 374, in run
    self.application = self.createOrGetApplication()
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 434, in createOrGetApplication
    ser = plg.makeService(self.config.subOptions)
  File "/opt/graphite/lib/twisted/plugins/carbon_cache_plugin.py", line 21, in makeService
    return service.createCacheService(options)
  File "/opt/graphite/lib/carbon/service.py", line 111, in createCacheService
    from carbon.writer import WriterService
  File "/opt/graphite/lib/carbon/writer.py", line 40, in <module>
    schemas = loadStorageSchemas()
  File "/opt/graphite/lib/carbon/storage.py", line 126, in loadStorageSchemas
    archives = [ Archive.fromString(s) for s in retentions ]
  File "/opt/graphite/lib/carbon/storage.py", line 110, in fromString
    (secondsPerPoint, points) = whisper.parseRetentionDef(retentionDef)
  File "/usr/local/lib/python2.7/dist-packages/whisper.py", line 90, in parseRetentionDef
    points = int( points[:-1] )
ValueError: invalid literal for int() with base 10: '6h'


I managed to work around it by using "10:2160,60:10080,600:262974" instead, but I'd prefer to use the human-readable form.

thanks.
seth

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.