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 2021/05/22 21:06:40 UTC

[GitHub] [airflow] Anirudhaagrawal opened a new issue #16000: If external postgres password contains '@' then it appends it to host.

Anirudhaagrawal opened a new issue #16000:
URL: https://github.com/apache/airflow/issues/16000


   ```
   kc logs airflow-run-airflow-xxx
   BACKEND=postgresql
   DB_HOST=123@{{postgres_host}}
   DB_PORT=5432
   ....................
   ERROR! Maximum number of retries (20) reached.
   
   Last check result:
   $ run_nc '123@{{postgres_host}}' '5432'
   Traceback (most recent call last):
     File "<string>", line 1, in <module>
   socket.gaierror: [Errno -2] Name or service not known
   Can't parse  as an IP address
   ```
   My password for external Postgres RDS contained '@123' at the end which got appended to the host of the DB due to some bug. One can notice in the logs, the DB_HOST has an unwanted 123@ in the front of it  DB_HOST=**123@**{{postgres_host}}. I removed '@' character from the password and it worked fine. 
   
   One can easily reproduce this by using a password that contains the '@' character in it.
   ```
   data:
     metadataConnection:
       user: {{postgres_airflow_username}}
       pass: {{postgres_airflow_password}}
       protocol: postgresql  
       host: {{postgres_host}}
       port: 5432
       db: {{postgres_airflow_dbname}}
   ```
   
   Expected behavior:
   Migrations should run irrespective if the Postgres password contains an @ character or not.


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



[GitHub] [airflow] mik-laj removed a comment on issue #16000: If external postgres password contains '@' then it appends it to host.

Posted by GitBox <gi...@apache.org>.
mik-laj removed a comment on issue #16000:
URL: https://github.com/apache/airflow/issues/16000#issuecomment-846491567


   In Apache Airflow, we need to build the URL from the values from the `values.yaml` file, but unfortunately this cannot be done because to build the URL with userinfo we need a function that percent-encode the usernaame/password.  
   More context: https://github.com/apache/airflow/pull/16004


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



[GitHub] [airflow] mik-laj commented on issue #16000: If external postgres password contains '@' then it appends it to host.

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #16000:
URL: https://github.com/apache/airflow/issues/16000#issuecomment-846563463


   @Anirudhaagrawal I working on this bug. Can you check my PR? https://github.com/apache/airflow/pull/16004


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



[GitHub] [airflow] mik-laj closed issue #16000: If external postgres password contains '@' then it appends it to host.

Posted by GitBox <gi...@apache.org>.
mik-laj closed issue #16000:
URL: https://github.com/apache/airflow/issues/16000


   


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



[GitHub] [airflow] mik-laj closed issue #16000: If external postgres password contains '@' then it appends it to host.

Posted by GitBox <gi...@apache.org>.
mik-laj closed issue #16000:
URL: https://github.com/apache/airflow/issues/16000


   


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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #16000: If external postgres password contains '@' then it appends it to host.

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #16000:
URL: https://github.com/apache/airflow/issues/16000#issuecomment-846463514


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


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



[GitHub] [airflow] mik-laj commented on issue #16000: If external postgres password contains '@' then it appends it to host.

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #16000:
URL: https://github.com/apache/airflow/issues/16000#issuecomment-846491567


   In Apache Airflow, we need to build the URL from the values from the `values.yaml` file, but unfortunately this cannot be done because to build the URL with userinfo we need a function that percent-encode the usernaame/password.  
   More context: https://github.com/apache/airflow/pull/16004


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



[GitHub] [airflow] mik-laj commented on issue #16000: If external postgres password contains '@' then it appends it to host.

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #16000:
URL: https://github.com/apache/airflow/issues/16000#issuecomment-846484424


   But yes. This is a bug, not in Docker Image, but in Helm Chart. It uses string concatenation to build URI.


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



[GitHub] [airflow] mik-laj commented on issue #16000: If external postgres password contains '@' then it appends it to host.

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #16000:
URL: https://github.com/apache/airflow/issues/16000#issuecomment-846484171


   Password should be percent encoded. See: https://github.com/apache/airflow/pull/15089


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