--config parameter to carbon-cache.py does not work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Graphite |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
According to --help, I should be able to specify a configuration file with --config:
/opt/graphite/
usage: carbon-cache.py [options] <start|stop|status>
options:
-h, --help show this help message and exit
--debug Run in the foreground, log to stdout
--profile=PROFILE Record performance profile data to the given file
--pidfile=PIDFILE Write pid to the given file
--config=CONFIG Use the given config file
--logdir=LOGDIR Write logs in the given directory
However, when I run it like this:
/opt/graphite/
I get this:
03/12/2010 04:29:27 :: Log opened.
03/12/2010 04:29:27 :: twisted.
03/12/2010 04:29:27 :: Starting factory <twisted.
03/12/2010 04:29:27 :: twisted.
03/12/2010 04:29:27 :: Starting factory <twisted.
03/12/2010 04:29:27 :: twisted.
03/12/2010 04:29:27 :: Starting factory <twisted.
03/12/2010 04:29:27 :: Failed to reload storage schemas
03/12/2010 04:29:27 :: Unhandled Error
Traceback (most recent call last):
File "/opt/graphite/
schemaReloa
File "/usr/lib64/
self()
File "/usr/lib64/
d = defer.maybeDefe
File "/usr/lib64/
result = f(*args, **kw)
--- <exception caught here> ---
File "/opt/graphite/
schemas = loadStorageSche
File "/opt/graphite/
config.
File "/opt/graphite/
for line in open(path):
exceptions.IOError: [Errno 2] No such file or directory: 'conf/storage-
Seems like my call to --config should work. I stumbled upon this while creating an init.d script. My current workaround is to cd into /opt/graphite prior to calling carbon-cache.py. This is similar to the documentation bug I filed earlier.
Pete
Changed in graphite: | |
status: | New → Confirmed |
Changed in graphite: | |
status: | Fix Committed → Fix Released |
The --config option actually does work but it only applies to carbon.conf, not storage- schemas. conf. There probably ought to just be an option to specify the config directory instead of an option for each individual file honestly. Anyways, the reason your startup failed was because of Bug #591504, which I just fixed.