Problem:
Triggering DAGs from a DAG-generator DAG for the initial load was not successful. The generator DAG indicates success, but the downstream DAGs did not trigger. As a workaround, when the client triggers the DAG directly from the SQL ingestion DAG, the drivers come up and are running.
Solution:
The team investigated Airflow issues across the DAG file processor manager, the scheduler, and the log file system. Troubleshooting covered manual DAG triggering, local Airflow runs, and file cleanup. Problems with file system accessibility and insufficient logging were identified, and options such as scheduler restarts, Airflow redeployment, and reinstallation in a new Kubernetes namespace were evaluated, taking into account the risks of data loss and of switching file storage.
Next, a non-responsive Airflow scheduler was identified. Changes to the concurrency and max active runs settings led to temporary unavailability, likely related to autoscaling.
Further work included upgrading Airflow, running test simulations, and reviewing logs and metrics, which revealed issues in the interaction between the scheduler and the triggerer.
Debugging then focused on dynamic DAGs created by the generator DAG: the generated DAGs were not appearing in the Airflow UI. The setup was reproduced in a test environment, although without the original DAG-generator code.
Finally, script and namespace errors were fixed, the number of scheduler instances was increased, and the Airflow web server was tuned. Recommendations for configuration updates and monitoring were also provided.
As a result, the client successfully executed the planned steps to clear DAGs using the Airflow API, resulting in the resolution of the DAGs issue during testing. The initial problem could no longer be reproduced, and cleanup steps were documented to prevent similar occurrences in the future.
Conclusion:
The comprehensive approach undertaken to address the Apache Airflow issue involved a thorough investigation and exploration of the client’s system. Simulations were conducted in our environment to understand the intricacies of the issue.
The team dedicated efforts to debugging and troubleshooting the dynamic DAGs issue, considering multiple solutions. Recommendations were offered to the client, encompassing configuration updates, monitoring, and resolution strategies. A structured plan for future operations was provided, outlining steps to prevent and address similar issues, ensuring a more resilient and optimized system moving forward.