Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
2b82efb8
Commit
2b82efb8
authored
Jun 17, 2014
by
Chrysostomos Nanakos
Browse files
pithos: Add Archipelago conf file to params
parent
c75cda52
Changes
4
Hide whitespace changes
Inline
Side-by-side
snf-pithos-backend/pithos/backends/lib/hashfiler/archipelagoblocker.py
View file @
2b82efb8
...
...
@@ -44,7 +44,7 @@ class ArchipelagoBlocker(object):
def
__init__
(
self
,
**
params
):
cfg
=
{}
bcfg
=
ConfigParser
.
ConfigParser
()
bcfg
.
readfp
(
open
(
glue
.
WorkerGlue
.
A
rchipelago
ConfF
ile
))
bcfg
.
readfp
(
open
(
params
[
'a
rchipelago
_cf
ile
'
]
))
cfg
[
'blockerb'
]
=
bcfg
.
getint
(
'mapperd'
,
'blockerb_port'
)
blocksize
=
params
[
'blocksize'
]
hashtype
=
params
[
'hashtype'
]
...
...
snf-pithos-backend/pithos/backends/lib/hashfiler/archipelagomapper.py
View file @
2b82efb8
...
...
@@ -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
.
A
rchipelago
ConfF
ile
))
bcfg
.
readfp
(
open
(
params
[
'a
rchipelago
_cf
ile
'
]
))
cfg
[
'blockerm'
]
=
bcfg
.
getint
(
'mapperd'
,
'blockerm_port'
)
cfg
[
'mapperd'
]
=
bcfg
.
getint
(
'vlmcd'
,
'mapper_port'
)
self
.
ioctx_pool
=
glue
.
WorkerGlue
().
ioctx_pool
...
...
snf-pithos-backend/pithos/backends/lib/hashfiler/store.py
View file @
2b82efb8
...
...
@@ -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
)
...
...
snf-pithos-backend/pithos/backends/modular.py
View file @
2b82efb8
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment