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 2020/12/21 20:18:53 UTC

[GitHub] [airflow] XD-DENG commented on a change in pull request #13232: Enforce PID file path to be absolute when deamonize a process (like scheduler, etc)

XD-DENG commented on a change in pull request #13232:
URL: https://github.com/apache/airflow/pull/13232#discussion_r546910814



##########
File path: airflow/utils/cli.py
##########
@@ -227,8 +227,12 @@ def setup_locations(process, pid=None, stdout=None, stderr=None, log=None):
         stdout = os.path.join(settings.AIRFLOW_HOME, f'airflow-{process}.out')
     if not log:
         log = os.path.join(settings.AIRFLOW_HOME, f'airflow-{process}.log')
+
     if not pid:
         pid = os.path.join(settings.AIRFLOW_HOME, f'airflow-{process}.pid')
+    else:
+        if not os.path.isabs(pid):
+            raise AirflowException("Path of PID file must be absolute")

Review comment:
       That's what I thought of and proposed in the beginning. Please check the discussion at #13200 




----------------------------------------------------------------
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:
users@infra.apache.org