Skip to content

Commit

Permalink
Merge pull request #19 from a6350202/master
Browse files Browse the repository at this point in the history
k8s: Change to pilot2
  • Loading branch information
fbarreir authored Nov 28, 2019
2 parents 6e3f8e6 + 58c2958 commit 6556770
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pandaharvester/harvestercloud/k8s_startup_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ def get_configuration():
os.environ['GTAG'] = log_download_url # GTAG env variable is read by pilot

# get the pilot wrapper
wrapper_path = "/tmp/runpilot3-wrapper.sh"
wrapper_url = "https://raw.githubusercontent.com/fbarreir/adc/master/runpilot3-wrapper.sh"
wrapper_path = "/tmp/runpilot2-wrapper.sh"
wrapper_url = "https://raw.githubusercontent.com/ptrlv/adc/master/runpilot2-wrapper.sh"
wrapper_string = get_url(wrapper_url)
with open(wrapper_path, "w") as wrapper_file:
wrapper_file.write(wrapper_string)
Expand All @@ -172,16 +172,16 @@ def get_configuration():
logging.debug('[main] starting pilot wrapper...')
resource_type_option = ''
if resource_type:
resource_type_option = '-R {0}'.format(resource_type)
wrapper_params = '-s {0} -h {1} {2}'.format(panda_site, panda_queue, resource_type_option)
resource_type_option = '--resource-type {0}'.format(resource_type)
wrapper_params = '-s {0} -r {1} -q {2} {3}'.format(panda_site, panda_queue, panda_queue, resource_type_option)
if 'ANALY' in panda_queue:
wrapper_params = '{0} -u user'.format(wrapper_params)
wrapper_params = '{0} -j user'.format(wrapper_params)
else:
wrapper_params = '{0} -u managed'.format(wrapper_params)
command = "/tmp/runpilot3-wrapper.sh {0} -p 25443 -w https://pandaserver.cern.ch >& /tmp/wrapper-wid.log".\
wrapper_params = '{0} -j managed'.format(wrapper_params)
command = "/tmp/runpilot2-wrapper.sh {0} -i PR -w generic --pilot-user=ATLAS --url=https://pandaserver.cern.ch -d --harvester-submit-mode=PULL --allow-same-user=False >& /tmp/wrapper-wid.log".\
format(wrapper_params, worker_id)
subprocess.call(command, shell=True)
logging.debug('[main] pilot wrapper done...')

# upload logs to e.g. panda cache or similar
upload_logs(logs_frontend_w, '/tmp/wrapper-wid.log', destination_name, proxy_path)
upload_logs(logs_frontend_w, '/tmp/wrapper-wid.log', destination_name, proxy_path)

0 comments on commit 6556770

Please sign in to comment.