This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v3-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-3-test by this push:
     new c5da24a71fc [v3-3-test] Add systemd unit file for Airflow Dag 
processor (#72772) (#72797)
c5da24a71fc is described below

commit c5da24a71fcd33c4568c0b8be0d0ccdc15ce5e9f
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Sep 10 10:37:30 2026 +0200

    [v3-3-test] Add systemd unit file for Airflow Dag processor (#72772) 
(#72797)
    
    * [v3-3-test] Add systemd unit file for Airflow Dag processor (#72772)
    
    Airflow 3 runs the Dag processor as a standalone process that the
    scheduler no longer starts, so a systemd deployment must run at least
    the scheduler, the Dag processor and the api-server. The systemd units
    that were updated for Airflow 3 left out the Dag processor service, so
    deployments that only started the scheduler and api-server showed the
    dag_processor and triggerer entries of /api/v2/monitor/health as
    unhealthy and, worse, never parsed any Dags.
    
    Add airflow-dag-processor.service and document which services are
    required and which are optional so the health endpoint reports match
    the running components.
    (cherry picked from commit edbdb049f532b3dd034fb094c00811d2b9e96677)
    
    Co-authored-by: Kunal <[email protected]>
    Co-authored-by: Kunal8954 <[email protected]>
    
    * Update airflow-core/docs/howto/run-with-systemd.rst
    
    Co-authored-by: Jason(Zhe-You) Liu 
<[email protected]>
    
    * Update airflow-core/docs/howto/run-with-systemd.rst
    
    Co-authored-by: Jason(Zhe-You) Liu 
<[email protected]>
    
    * Update scripts/systemd/README
    
    Co-authored-by: Jason(Zhe-You) Liu 
<[email protected]>
    
    * Update scripts/systemd/README
    
    Co-authored-by: Jason(Zhe-You) Liu 
<[email protected]>
    
    ---------
    
    Co-authored-by: Kunal <[email protected]>
    Co-authored-by: Kunal8954 <[email protected]>
    Co-authored-by: Rahul Vats <[email protected]>
    Co-authored-by: Jarek Potiuk <[email protected]>
    Co-authored-by: Jason(Zhe-You) Liu 
<[email protected]>
---
 airflow-core/docs/howto/run-with-systemd.rst  | 22 +++++++++++++++++
 scripts/systemd/README                        | 24 +++++++++++++++++++
 scripts/systemd/airflow-dag-processor.service | 34 +++++++++++++++++++++++++++
 3 files changed, 80 insertions(+)

diff --git a/airflow-core/docs/howto/run-with-systemd.rst 
b/airflow-core/docs/howto/run-with-systemd.rst
index 1006ce4a06a..57a012e5a93 100644
--- a/airflow-core/docs/howto/run-with-systemd.rst
+++ b/airflow-core/docs/howto/run-with-systemd.rst
@@ -67,5 +67,27 @@ New Airflow 3.0 Services
 
 Since Apache Airflow 3.0, additional components have been split out into 
separate services. The following new unit files are available:
 
+- ``airflow-dag-processor.service`` for Dag file parsing
 - ``airflow-triggerer.service`` for deferrable task triggering
 - ``airflow-api.service`` for the standalone REST API server
+
+Required services
+'''''''''''''''''
+
+At a minimum, you must run the ``scheduler``, the ``dag-processor`` and the 
``api-server``:
+
+- ``airflow-scheduler.service``
+- ``airflow-dag-processor.service``
+- ``airflow-api.service``
+
+Without a running Dag processor, Dag files are not parsed.
+
+The ``airflow-triggerer.service`` is optional if you do not use deferrable 
tasks or
+event-driven :doc:`triggers <../authoring-and-scheduling/event-scheduling>`.
+
+For both ``dag_processor`` and ``triggerer``, the ``/api/v2/monitor/health`` 
endpoint returns
+``null`` for the status and latest heartbeat when no corresponding job record 
exists. If a job
+record exists but the job is no longer alive, its status is ``unhealthy``. You 
can ignore the
+``triggerer`` health status only when your deployment intentionally does not 
use a triggerer.
+
+See :ref:`Checking Airflow Health Status <check-health/http-endpoint>` for 
details on how each component reports its health.
diff --git a/scripts/systemd/README b/scripts/systemd/README
index e32df5f52f6..5f9a5be83d7 100644
--- a/scripts/systemd/README
+++ b/scripts/systemd/README
@@ -9,3 +9,27 @@ By default the environment configuration points to 
/etc/sysconfig/airflow . You
 directory and adjust it to your liking.
 
 With some minor changes they probably work on other systemd systems.
+
+Required services
+-----------------
+
+Since Airflow 3.0 the airflow processes that handle the different components 
are split into separate services. At a
+minimum you need to run the following services:
+
+* airflow-scheduler.service
+* airflow-dag-processor.service
+* airflow-api.service
+
+Additionally the following services are available and can be enabled as needed:
+
+* airflow-triggerer.service for deferrable task triggering (required only if 
you use deferrable tasks or event
+  scheduling)
+* airflow-worker.service for a Celery worker
+* airflow-flower.service for a Flower monitoring interface
+* airflow-kerberos.service for the Kerberos renewal daemon
+
+For both ``dag_processor`` and ``triggerer``, the ``/api/v2/monitor/health`` 
endpoint returns ``null`` for the
+status and latest heartbeat when no corresponding job record exists. If a job 
record exists but the job is no
+longer alive, its status is ``unhealthy``. Make sure the services you depend 
on are started; ignore the triggerer
+health status only when your deployment intentionally does not use a 
triggerer. See the "Checking Airflow
+Health Status" documentation for details.
diff --git a/scripts/systemd/airflow-dag-processor.service 
b/scripts/systemd/airflow-dag-processor.service
new file mode 100644
index 00000000000..48c09e1adea
--- /dev/null
+++ b/scripts/systemd/airflow-dag-processor.service
@@ -0,0 +1,34 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[Unit]
+Description=Airflow Dag processor daemon
+After=network.target postgresql.service mysql.service redis.service 
rabbitmq-server.service
+Wants=postgresql.service mysql.service redis.service rabbitmq-server.service
+
+[Service]
+EnvironmentFile=/etc/sysconfig/airflow
+User=airflow
+Group=airflow
+Type=simple
+ExecStart=/bin/bash -c 'source /home/airflow/airflow_venv/bin/activate && 
airflow dag-processor'
+Restart=always
+RestartSec=5s
+
+[Install]
+WantedBy=multi-user.target

Reply via email to