GWphua commented on PR #18206:
URL: https://github.com/apache/druid/pull/18206#issuecomment-3048097227

   After making the appropriate changes, I find that tasks started by pod 
templates are able to execute the task without reporting the 404 error to 
frontend, but K8s tasks that do not use Pod Templates still fail.
   
   Going into the job container shows a mismatch between expected task report 
directory, and actual task report directory:
   
   1. PodTemplate:
      1. Actual: 
`/opt/druid/var/tmp/persistent/task/query-dbf9c83f-da9c-4873-9c89-693392662770/attempt/1/report.json`
  
      2. Expected: 
`/opt/druid/var/tmp/query-cc8b4f9d-1079-4a59-9d67-8ecd7b9aeb20/attempt/1/report.json`
  
   2. SingleContainer
      1. Actual: 
`/opt/druid/var/tmp/persistent/task/query-dbf9c83f-da9c-4873-9c89-693392662770/attempt/1/report.json`
      2. Expected: 
`/tmp/persistent/task/query-4903642a-6abe-4e29-9725-063c32650c45/attempt/1/report.json`
   
   Findings:
   - Recommended by the 
[documentation](https://druid.apache.org/docs/latest/development/extensions-core/k8s-jobs#custom-template-pod-adapter),
 PodTemplate has `baseTaskDir` set, while SingleContainer does not.
   - If `baseTaskDir` is not set, Druid will 
[default](https://druid.apache.org/docs/latest/configuration/#additional-peon-configuration)
 to `System.getProperty("java.io.tmpdir")`
   - The absence of `baseTaskDir` causes the problem. Without setting 
`baseTaskDir`, the task may use the default `baseTaskDir`, which is 
system-dependent. This may lead to differences from the variables used to call 
`peon.sh`.
   
   Current Solution in Mind:
   K8sMode should spin up `peon.sh` and add `baseTaskDir` as an environment 
variable.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to