mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #4720 from erasche/integrity-exceptions
Add logging during for script integrity exceptions
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import logging
|
||||
import os
|
||||
import subprocess
|
||||
import time
|
||||
@@ -8,6 +9,7 @@ from six import text_type
|
||||
|
||||
from galaxy.util import unicodify
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
DEFAULT_SHELL = '/bin/bash'
|
||||
|
||||
DEFAULT_JOB_FILE_TEMPLATE = Template(
|
||||
@@ -124,6 +126,8 @@ def _handle_script_integrity(path, config):
|
||||
script_integrity_verified = True
|
||||
break
|
||||
|
||||
log.debug("Script integrity error: returncode was %d", returncode)
|
||||
|
||||
# Else we will sync and wait to see if the script becomes
|
||||
# executable.
|
||||
try:
|
||||
@@ -131,11 +135,13 @@ def _handle_script_integrity(path, config):
|
||||
# These have occurred both in Docker containers and on EC2 clusters
|
||||
# under high load.
|
||||
subprocess.check_call(INTEGRITY_SYNC_COMMAND)
|
||||
except Exception:
|
||||
pass
|
||||
time.sleep(sleep_amt)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as e:
|
||||
log.debug("Error syncing the filesystem: %s", unicodify(e))
|
||||
|
||||
except Exception as exc:
|
||||
log.debug("Script not available yet: %s", unicodify(exc))
|
||||
|
||||
time.sleep(sleep_amt)
|
||||
|
||||
if not script_integrity_verified:
|
||||
raise Exception("Failed to write job script, could not verify job script integrity.")
|
||||
|
||||
Reference in New Issue
Block a user