Olivier Sallou pushed to branch master at Debian Med / biomaj3-process
Commits: 985faf41 by Olivier Sallou at 2019-11-12T10:32:00Z New upstream version 3.0.15 - - - - - 2ac6bb5f by Olivier Sallou at 2019-11-12T10:32:00Z Update upstream source from tag 'upstream/3.0.15' Update to upstream version '3.0.15' with Debian dir 7d24309f82429c3c7e52b8b3be0fc91fdd730e84 - - - - - 7fac5c6f by Olivier Sallou at 2019-11-12T10:32:28Z new upstream 3.0.15 - - - - - 6 changed files: - CHANGES.txt - README.md - biomaj_process/process.py - biomaj_process/process_client.py - debian/changelog - setup.py Changes: ===================================== CHANGES.txt ===================================== @@ -1,3 +1,9 @@ +3.0.15: + Add proc name in logs for waiting and result +3.0.14: + Add env var BIOMAJ_HOST_DATA_DIR to use with *docker* process executor to specify data.dir location if different between host and container (if BIOMAJ_DATA_DIR not a subdirectory of BIOMAJ_DIR for example) + If variable is not set, container wil mount data.dir between host and container, + else will mount BIOMAJ_HOST_DATA_DIR:data.dir 3.0.13: Fix traefik prefix 3.0.12: ===================================== README.md ===================================== @@ -1,5 +1,7 @@ # About +[](https://badge.fury.io/py/biomaj-process) + Microservice to manage the process execution of biomaj. A protobuf interface is available in biomaj_process/message/message_pb2.py to exchange messages between BioMAJ and the download service. ===================================== biomaj_process/process.py ===================================== @@ -224,9 +224,10 @@ class DockerProcess(Process): depends.append(value) # docker run with data.dir env as shared volume # forwarded env variables - data_dir = self.bank_env['datadir'] + '/' + self.bank_env['dirversion'] - if 'BIOMAJ_DIR' in os.environ and os.environ['BIOMAJ_DIR'] and not os.environ['BIOMAJ_DIR'].startswith('local'): - data_dir = os.environ['BIOMAJ_DIR'] + '/' + self.bank_env['dirversion'] + container_data_dir = self.bank_env['datadir'] + '/' + self.bank_env['dirversion'] + host_data_dir = container_data_dir + if 'BIOMAJ_HOST_DATA_DIR' in os.environ and os.environ['BIOMAJ_HOST_DATA_DIR'] and not os.environ['BIOMAJ_HOST_DATA_DIR'].startswith('local'): + host_data_dir = os.environ['BIOMAJ_HOST_DATA_DIR'] + '/' + self.bank_env['dirversion'] depends_vol = '' for vol in depends: @@ -236,13 +237,14 @@ class DockerProcess(Process): cmd = '''uid={uid} gid={gid} {sudo} docker {docker_url} pull {container_id} - {sudo} docker {docker_url} run --rm -w {bank_dir} {depends_vol} -v {data_dir}:{data_dir} {env} {container_id} \ + {sudo} docker {docker_url} run --rm -w {bank_dir} {depends_vol} -v {host_data_dir}:{container_data_dir} {env} {container_id} \ bash -c "groupadd --gid {gid} {group_biomaj} && useradd --uid {uid} --gid {gid} {user_biomaj}; \ {exe} {args}; \ chown -R {uid}:{gid} {bank_dir}"'''.format( uid=os.getuid(), gid=os.getgid(), - data_dir=data_dir, + host_data_dir=host_data_dir, + container_data_dir=container_data_dir, env=env, container_id=self.docker, group_biomaj='biomaj', @@ -257,12 +259,13 @@ class DockerProcess(Process): else: cmd = ''' {sudo} docker {docker_url} pull {container_id} - {sudo} docker {docker_url} run --rm -w {bank_dir} {depends_vol} -v {data_dir}:{data_dir} {env} {container_id} \ + {sudo} docker {docker_url} run --rm -w {bank_dir} {depends_vol} -v {host_data_dir}:{container_data_dir} {env} {container_id} \ {exe} {args} \ '''.format( uid=os.getuid(), gid=os.getgid(), - data_dir=data_dir, + host_data_dir=host_data_dir, + container_data_dir=container_data_dir, env=env, container_id=self.docker, group_biomaj='biomaj', ===================================== biomaj_process/process_client.py ===================================== @@ -49,6 +49,7 @@ class ProcessServiceClient(object): raise Exception('Failed to connect to the process proxy') def execute_process(self, biomaj_process): + self.biomaj_process = biomaj_process if self.remote: self.channel.basic_publish( exchange='', @@ -58,14 +59,12 @@ class ProcessServiceClient(object): # make message persistent delivery_mode=2 )) - else: - self.biomaj_process = biomaj_process def wait_for_process(self): over = False exitcode = -1 info = None - logging.info("Process:RemoteProcess:Waiting") + logging.info("Process:RemoteProcess:Waiting:" + str(self.biomaj_process.process.name)) errors = 0 while not over: if errors >= 3: @@ -89,7 +88,7 @@ class ProcessServiceClient(object): over = True if result['exitcode'] > 0: info = result['info'] - self.logger.error('Process:RemoteProcess:Error:' + str(result['info'])) + self.logger.error('Process:RemoteProcess:Error:' + str(self.biomaj_process.process.name) + ': ' + str(result['info'])) else: time.sleep(10) return (exitcode, info) ===================================== debian/changelog ===================================== @@ -1,3 +1,9 @@ +biomaj3-process (3.0.15-1) unstable; urgency=medium + + * New upstream release + + -- Olivier Sallou <[email protected]> Tue, 12 Nov 2019 10:32:06 +0000 + biomaj3-process (3.0.13-1) unstable; urgency=medium * New upstream release ===================================== setup.py ===================================== @@ -21,7 +21,7 @@ config = { 'url': 'http://biomaj.genouest.org', 'download_url': 'http://biomaj.genouest.org', 'author_email': '[email protected]', - 'version': '3.0.13', + 'version': '3.0.15', 'classifiers': [ # How mature is this project? Common values are # 3 - Alpha View it on GitLab: https://salsa.debian.org/med-team/biomaj3-process/compare/085f9f3c631ae0661f95004bba6a0b77e777492e...7fac5c6f01f2c4e886331e5943ad1debcb147ec7 -- View it on GitLab: https://salsa.debian.org/med-team/biomaj3-process/compare/085f9f3c631ae0661f95004bba6a0b77e777492e...7fac5c6f01f2c4e886331e5943ad1debcb147ec7 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
