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/07/12 15:16:47 UTC

[GitHub] [airflow] jedcunningham commented on a diff in pull request #24999: [FIX] Scheduler crashloopbackoff when using `hostname_callable`

jedcunningham commented on code in PR #24999:
URL: https://github.com/apache/airflow/pull/24999#discussion_r919073408


##########
airflow/cli/commands/jobs_command.py:
##########
@@ -36,6 +40,9 @@ def check(args, session=None):
         query = query.filter(BaseJob.job_type == args.job_type)
     if args.hostname:
         query = query.filter(BaseJob.hostname == args.hostname)
+    if args.use_hostname_callable:
+        hostname = get_hostname()
+        query = query.filter(BaseJob.hostname == hostname)

Review Comment:
   ```suggestion
           query = query.filter(BaseJob.hostname == get_hostname())
   ```
   
   nit



##########
airflow/cli/cli_parser.py:
##########
@@ -897,6 +897,13 @@ def string_lower_type(val):
     help="The hostname of job(s) that will be checked.",
 )
 
+ARG_JOB_HOSTNAME_CALLABLE_FILTER = Arg(
+    ("--use-hostname-callable",),

Review Comment:
   Not sure I love `use-hostname-callable`. Maybe `local-only`? @dstandish @ephraimbuddy 



##########
chart/templates/_helpers.yaml:
##########
@@ -638,7 +638,7 @@ Create the name of the cleanup service account to use
   - -c
   - |
     CONNECTION_CHECK_MAX_COUNT=0 AIRFLOW__LOGGING__LOGGING_LEVEL=ERROR exec /entrypoint \
-    airflow jobs check --job-type SchedulerJob --hostname $(hostname)
+    airflow jobs check --job-type SchedulerJob

Review Comment:
   ```suggestion
       airflow jobs check --job-type SchedulerJob --use-hostname-callback
   ```
   
   This also needs to be done conditionally based on `airflowVersion`.



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