marclamberti commented on issue #14261:
URL: https://github.com/apache/airflow/issues/14261#issuecomment-809560041


   Unfortunately not
   ```
   Events:
     Type     Reason     Age                 From               Message
     ----     ------     ----                ----               -------
     Normal   Scheduled  16m                 default-scheduler  Successfully 
assigned airflow/airflow-scheduler-78997cd45-6j5mw to airflow-cluster-worker
     Normal   Pulled     16m                 kubelet            Container image 
"apache/airflow:2.0.1" already present on machine
     Normal   Created    16m                 kubelet            Created 
container wait-for-airflow-migrations
     Normal   Started    16m                 kubelet            Started 
container wait-for-airflow-migrations
     Normal   Pulled     15m                 kubelet            Container image 
"apache/airflow:2.0.1" already present on machine
     Normal   Created    15m                 kubelet            Created 
container scheduler-gc
     Normal   Started    15m                 kubelet            Started 
container scheduler-gc
     Normal   Killing    11m                 kubelet            Container 
scheduler failed liveness probe, will be restarted
     Normal   Pulled     11m (x2 over 15m)   kubelet            Container image 
"apache/airflow:2.0.1" already present on machine
     Normal   Started    11m (x2 over 15m)   kubelet            Started 
container scheduler
     Normal   Created    11m (x2 over 15m)   kubelet            Created 
container scheduler
     Warning  Unhealthy  95s (x29 over 15m)  kubelet            Liveness probe 
failed:
   ```
   
   But, after a lot of trials and errors, those 2 lines:
   ```
                   from airflow.jobs.scheduler_job import SchedulerJob
                   from airflow.utils.db import create_session
   ```
   make the livenessprob failing.
   Right now I have only this:
   ```
                   import os
                   os.environ['AIRFLOW__CORE__LOGGING_LEVEL'] = 'ERROR'
                   os.environ['AIRFLOW__LOGGING__LOGGING_LEVEL'] = 'ERROR'
   
                   from airflow.jobs.scheduler_job import SchedulerJob
                   from airflow.utils.db import create_session
                   from airflow.utils.net import get_hostname
                   import sys
   
                   sys.exit(0)
   ```
   and still, every 5 mins the scheduler is restarted.
   If I remove those lines, it works as sys.exit(0)


-- 
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.

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


Reply via email to