apache/airflow

Set up multiple Airflow instances under the same domain with different sessions

Open

Aperta il 18 ago 2021

Vedi su GitHub
 (6 commenti) (0 reazioni) (0 assegnatari)Python (44.809 star) (16.781 fork)batch import
area:webservergood first issuekind:documentationpriority:low

Descrizione

Apache Airflow version: v2.1.1

OS: Ubuntu 20.04.2 LTS

Apache Airflow Provider versions: Not relevent

Deployment: AWS EC2 Instances

What happened: When using multiple Airflow instances (i.e. Production instance and a Development instance) the webserver navigation/redirection can send you back to the incorrect instance.

What you expected to happen: I expect when I press "Back" or "Save" within Airflow (for instance, when editing a 'pool' from the GUI' that it goes back to the previous page (of the instance I am working on, not a different instance that I happen to also be working with at the same time).

How to reproduce it: It seems both webserver instances are using the same cookie or session information. I am using a single NGINX reverse proxy to access both a dev instance and a prod instance (but with a unique URL to differentiate the two)..

Example URLs: https://ec2-myIP.eu-central-1.compute.amazonaws.com/airflow [ points to the PRODUCTION instance ] https://ec2-myIP.eu-central-1.compute.amazonaws.com/airflow_dev [ points to the DEVELOPMENT instance ]

Example ISSUE (using pools as an example, but it is not limited there):

  1. On PRODUCTION instance browse to Admin->Pools
  2. On DEVELOPMENT instance browse to Admin->Pools
  3. On PRODUCTION instance click Airflows Back navigation arrow/button
  4. On DEVELOPMENT instance browse to Admin->Pools, edit a pool, then click Airflows Back navigation arrow/button

Note that the "Save" button can redirect back to the other instance as well (just depends).

Anything else we need to know: Issue occurs frequently when using two independent instances of Airflow. There are no logs to speak of.

Are you willing to submit a PR?

Guida contributor