Commit 2b82efb8 authored by Chrysostomos Nanakos's avatar Chrysostomos Nanakos
Browse files

pithos: Add Archipelago conf file to params

parent c75cda52
......@@ -44,7 +44,7 @@ class ArchipelagoBlocker(object):
def __init__(self, **params):
cfg = {}
bcfg = ConfigParser.ConfigParser()
bcfg.readfp(open(glue.WorkerGlue.ArchipelagoConfFile))
bcfg.readfp(open(params['archipelago_cfile']))
cfg['blockerb'] = bcfg.getint('mapperd', 'blockerb_port')
blocksize = params['blocksize']
hashtype = params['hashtype']
......
......@@ -14,8 +14,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from binascii import hexlify
import os
import re
import ctypes
import ConfigParser
import logging
......@@ -50,7 +48,7 @@ class ArchipelagoMapper(object):
self.namelen = params['namelen']
cfg = {}
bcfg = ConfigParser.ConfigParser()
bcfg.readfp(open(glue.WorkerGlue.ArchipelagoConfFile))
bcfg.readfp(open(params['archipelago_cfile']))
cfg['blockerm'] = bcfg.getint('mapperd','blockerm_port')
cfg['mapperd'] = bcfg.getint('vlmcd','mapper_port')
self.ioctx_pool = glue.WorkerGlue().ioctx_pool
......
......@@ -32,9 +32,11 @@ class Store(object):
pb = {'blocksize': params['block_size'],
'hashtype': params['hash_algorithm'],
'archipelago_cfile': params['archipelago_cfile'],
}
self.blocker = Blocker(**pb)
pm = {'namelen': self.blocker.hashlen,
'archipelago_cfile': params['archipelago_cfile'],
}
self.mapper = Mapper(**pm)
......
......@@ -295,7 +295,8 @@ class ModularBackend(BaseBackend):
params = {'path': block_path,
'block_size': self.block_size,
'hash_algorithm': self.hash_algorithm,
'umask': block_umask}
'umask': block_umask,
'archipelago_cfile': archipelago_conf_file}
params.update(self.block_params)
self.store = self.block_module.Store(**params)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment