Skip to content

Commit

Permalink
Fix package path
Browse files Browse the repository at this point in the history
  • Loading branch information
iychoi committed Mar 3, 2016
1 parent 4f1d6c4 commit 41f9b20
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docker/gateways/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ MAINTAINER Illyoung Choi <[email protected]>

RUN apt-get update
RUN apt-get install -y wget unzip
RUN apt-get install -y python-pip

##############################################
# Setup a Syndicate account
Expand Down Expand Up @@ -48,6 +49,7 @@ RUN make install
# syndicate
##############################################
RUN apt-get install -y protobuf-compiler libprotobuf-dev libcurl4-gnutls-dev libmicrohttpd-dev libjson0-dev valgrind cython python-protobuf libssl-dev python-crypto python-requests
RUN pip install pika python-irodsclient retrying timeout_decorator

USER syndicate
WORKDIR $HOME
Expand Down
11 changes: 10 additions & 1 deletion python/syndicate/ag/drivers/fs/driver
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ import time
import threading
import json
import syndicate.util.gateway as gateway
import syndicate.ag.fs_driver_common.abstract_fs as abstract_fs

from syndicate.ag.fs_driver_common.fs_backend_loader import fs_backend_loader


dataset_dir = None
path_queue = []
fs = None
Expand Down Expand Up @@ -104,6 +106,7 @@ def driver_init( driver_config, driver_secrets ):
fs.connect()
except Exception as e:
gateway.log_error("Unable to initialize a driver")
gateway.log_error(str(e))
return False

if not fs.exists( dataset_dir ):
Expand Down Expand Up @@ -243,7 +246,12 @@ def read( request, chunk_fd, driver_config, driver_secrets ):
sys.exit(1)

backend = driver_config['DRIVER_FS_BACKEND']
backend_config = driver_config['DRIVER_FS_BACKEND_CONFIG']

if isinstance(driver_config['DRIVER_FS_BACKEND_CONFIG'], dict):
backend_config = driver_config['DRIVER_FS_BACKEND_CONFIG']
elif isinstance(driver_config['DRIVER_FS_BACKEND_CONFIG'], basestring):
json_backend_config = driver_config['DRIVER_FS_BACKEND_CONFIG']
backend_config = json.loads(json_backend_config)

backend_config["secrets"] = driver_secrets
backend_config["dataset_root"] = dataset_dir
Expand All @@ -259,6 +267,7 @@ def read( request, chunk_fd, driver_config, driver_secrets ):
fs.connect()
except Exception as e:
gateway.log_error("Unable to initialize a driver")
gateway.log_error(str(e))
sys.exit(1)

if not fs.exists( file_path ):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@
import os
import time
import logging

from syndicate.ag.fs_driver_common.abstract_fs import abstract_fs
from syndicate.ag.fs_driver_common.abstract_fs import metadata
from . import bms_client
from . import irods_client
import syndicate.ag.fs_driver_common.abstract_fs as abstract_fs
import syndicate.ag.fs_driver_common.metadata as metadata
import syndicate.ag.fs_driver_common.fs_backends.iplant_datastore.bms_client as bms_client
import syndicate.ag.fs_driver_common.fs_backends.iplant_datastore.irods_client as irods_client

logging.basicConfig( format='[%(asctime)s] [%(levelname)s] [%(module)s:%(lineno)d] %(message)s' )

Expand Down

0 comments on commit 41f9b20

Please sign in to comment.