Skip to content
Snippets Groups Projects
Commit 74d7543f authored by Daniel Nemergut's avatar Daniel Nemergut Committed by Charlotte Hausman
Browse files

Added instantclient to the curator condor file for CV nodes and bumped the...

Added instantclient to the curator condor file for CV nodes and bumped the instantclient version for other workflows
parent c676fe6d
No related branches found
No related tags found
3 merge requests!1571catch 2.8.2.3 up with main,!15592.8.2.2-DEVELOPMENT into main,!1551Cherry pick partial curation for patch
"""workflows oracle update
Revision ID: 49b7c8150e72
Revises: f2a76d224984
Create Date: 2023-11-22 14:26:55.355861
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '49b7c8150e72'
down_revision = 'f2a76d224984'
branch_labels = None
depends_on = None
# Add instantclient_21_1 to the path for CV nodes
old_curator_condor = """executable = curator.sh
arguments = metadata.json {{curator_type}}
output = curator.out
error = curator.err
log = condor.log
should_transfer_files = NO
+WantIOProxy = True
request_memory = {{ramInGb}}
getenv = True
environment = "CAPO_PATH=/home/casa/capo"
requirements = HasLustre == True
queue
"""
new_curator_condor = """executable = curator.sh
arguments = metadata.json {{curator_type}}
output = curator.out
error = curator.err
log = condor.log
should_transfer_files = NO
+WantIOProxy = True
request_memory = {{ramInGb}}
{{^remote-cv}}
getenv = True
environment = "CAPO_PATH=/home/casa/capo"
requirements = HasLustre == True
{{/remote-cv}}
{{#remote-cv}}
environment = "CAPO_PATH=. CAPO_PROFILE={{profile}} LD_LIBRARY_PATH=/home/ssa/share/oracle/instantclient_21_1"
requirements = HasLustre == True && (CVPOST == True)
+partition = "CVPOST"
{{/remote-cv}}
queue
"""
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{new_curator_condor}'
WHERE filename='curator.condor'
"""
)
# Use instantclient_21_1 in the other templates
op.execute(
f"""
UPDATE workflow_templates
SET content= regexp_replace(convert_from(content, 'utf-8'), E'instantclient_12_1', E'instantclient_21_1', 'g')::bytea
WHERE filename='download.condor' OR filename='ingest_cal.condor'
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{old_curator_condor}'
WHERE filename='curator.condor'
"""
)
op.execute(
f"""
UPDATE workflow_templates
SET content= regexp_replace(convert_from(content, 'utf-8'), E'instantclient_21_1', E'instantclient_12_1', 'g')::bytea
WHERE filename='download.condor' OR filename='ingest_cal.condor'
"""
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment