marlof / ScORCH

DevOps Orchestration for Obrar deploy and Ansible playbooks
http://www.autoscorch.com
Apache License 2.0
5 stars 1 forks source link

Change "Copy" job so it references the "active" job rather than the job state. #161

Closed marlof closed 3 years ago

marlof commented 3 years ago

If the job changed state while being viewed, the location of the job fails to get sedded

sed: can't read

/jobs/running/Job_IDxxx

marlof commented 3 years ago

Variable already available for active job - switching

marlof commented 3 years ago

Now the copy part is failing here:

+ b_StartGroupAdded=1
+ int_SubTask=0
+ Task 'sleep 15'
+ int_TaskCount=2
+ typeset local 'str_Task1=sleep 15'
+ typeset local str_OR=
+ typeset local str_Task2=
+ typeset local str_AltTask=
+ typeset local file_Job=/home/marc/scorch/jobs/new/Job_ID-199_199.DEMO-GROUP.1_DEMO-GROUP_NA_
+ [[ '' = \O\R ]]
+ [[ -n & ]]
+ ((   int_SubTask++  )

This can be replicated with

/home/marc/scorch/scorch -f /home/marc/scorch/tmp/scorch.7902.copy -p /home/marc/scorch/plugins -j /home/marc/scorch/jobs
marlof commented 3 years ago

It doesnt happen after copying a normal job. It only occurs when the job has a startGroup

Its appears to be the increment of zero issue