You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/07 01:31:20 UTC

[GitHub] [airflow] potiuk commented on issue #21994: scheduler: livenessProbe redundant exec leads to false-positive result

potiuk commented on issue #21994:
URL: https://github.com/apache/airflow/issues/21994#issuecomment-1060100995


   Hey @ephraimbuddy @jedcunningham  - I think that one might be important enough to cancel 1.5.0 of chart and make a release candidate 2.  I just checked it and I think this is is indeed wrong what we have.
   
   The current liveness probe is:
   
   ```
               exec:
                 command:
                   - sh
                   - -c
                   - exec
                   - |
                     CONNECTION_CHECK_MAX_COUNT=0 /entrypoint python -Wignore -c "
                     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
   
                     with create_session() as session:
                         job = session.query(SchedulerJob).filter_by(hostname=get_hostname()).order_by(
                             SchedulerJob.latest_heartbeat.desc()).limit(1).first()
   
                     sys.exit(0 if job.is_alive() else 1)
                     "
   ```
   
   But it should be IMHO:
   
   ```
               exec:
                 command:
                   - sh
                   - -c
                   - | 
                     CONNECTION_CHECK_MAX_COUNT=0 /entrypoint python -Wignore -c "
                     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
   
                     with create_session() as session:
                         job = session.query(SchedulerJob).filter_by(hostname=get_hostname()).order_by(
                             SchedulerJob.latest_heartbeat.desc()).limit(1).first()
   
                     sys.exit(0 if job.is_alive() else 1)
                     "
   ```
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org