Comments (7)
Hi, Thank you for posting!
Would love to help but I would need an example dag, with minimal configuration if you can.
This seems like an error where a pod has multiple containers. Is that correct?
I'm not sure about the timeline, but I'm pretty confident we can resolve this issue.
from kubernetesjoboperator.
Hi, I was able to reproduce your error with (testpod.py
),
from airflow import DAG
from airflow_kubernetes_job_operator import KubernetesJobOperator
from airflow.utils.dates import days_ago
default_args = {
"depends_on_past": False,
"start_date": days_ago(1),
}
dag = DAG(dag_id="test_multi_container", default_args=default_args, schedule_interval=None)
with dag:
KubernetesJobOperator(
task_id="test-multi-container",
body_filepath="./testdag.yaml",
)
if __name__ == "__main__":
dag.schedule_interval = None
dag.clear()
dag.run()
Job configuration (testpod.yaml
):
apiVersion: v1
kind: Pod
metadata:
name: 'multi-container-test'
labels:
app: 'multi-container-test'
spec:
restartPolicy: Never
containers:
- name: container1
image: 'alpine:latest'
command:
- sh
- -c
- |
echo starting sleep...
sleep 10
echo end
resources:
limits:
cpu: 200m
memory: 500Mi
requests:
cpu: 100m
memory: 200Mi
- name: container2
image: 'alpine:latest'
command:
- sh
- -c
- |
echo starting sleep...
sleep 10
echo end
resources:
limits:
cpu: 200m
memory: 500Mi
requests:
cpu: 100m
memory: 200Mi
from kubernetesjoboperator.
It may be a few days before I can get to this, apologies for that. The error lies in the Kuberentes api call, where it dose not specify to load the logs from all executing containers inside a pod. This of course can be changed. Error location is here:
Log reader needs to be able to define a container here:
Watcher needs to define a reader for each container here:
This is a nice catch. Thank you.
from kubernetesjoboperator.
Please see resolution PR here:
#39
from kubernetesjoboperator.
Please see resolution version:
https://github.com/LamaAni/KubernetesJobOperator/releases/tag/1.0.19
Please close this issue once validated. Thank you!
from kubernetesjoboperator.
I'm so very grateful for your time. We switch to the new version and it works like a charm. I'm closing the issue.
from kubernetesjoboperator.
Awesome, if you can add a testimonial, that would be fantastic. Here: #40
from kubernetesjoboperator.
Related Issues (20)
- FEATURE: templated specification file / override specific fields HOT 5
- Duplicate pod logs HOT 4
- BUG: Delete pods after job completion HOT 6
- Connection reset by peer on long job run HOT 14
- Uses cases and testimonials HOT 3
- Executing each task without restarting pods for every task HOT 7
- Is KubernetesJobOperator compatible with Apache Airflow >= v2.0? HOT 10
- FEATURE: Delete all completed tasks, regardless the final result of the task (successful or failed). HOT 24
- Investigate warnings HOT 3
- Secrets not found HOT 1
- FEATURE: Refresh aws token HOT 13
- Error after upgrading to airflow 2.3.3 HOT 2
- Cannot create resource "jobs" HOT 1
- No logs from pod HOT 3
- Namespace resolution failed HOT 5
- Any specific setup on kubernetes? HOT 22
- ConnectionResetError: [Errno 104] Connection reset by peer HOT 5
- Running task logs is incomplete HOT 12
- FEATURE: need 'templates_dict' to ensure proper rendering of time macros. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubernetesjoboperator.