scylla_io_setup: assume default directories under /var/lib/scylla

If a specific directory is not configure in scylla.yaml, scylla assumes
a default location under /var/lib/scylla.

Hard code these locations in scylla_io_setup until we have a better way
to probe scylla about it.

Be permissive and ignore the default directories if they don't not exist
on disk and silently ignore them.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
Benny Halevy
2018-11-29 09:58:53 +02:00
parent 88b85b363a
commit 5ec191536e

View File

@@ -77,10 +77,13 @@ if __name__ == "__main__":
sys.exit(1)
data_dirs = cfg["data_file_directories"]
default_path = '/var/lib/scylla/'
for t in [ "commitlog", "hints", "saved_caches" ]:
key = "%s_directory" % t
if key in cfg:
data_dirs += [ cfg[key] ]
elif os.path.isdir(default_path + key):
data_dirs += [ default_path + key ]
iotune_args = []
for data_dir in data_dirs: