You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@livy.apache.org by "idzikovsky (via GitHub)" <gi...@apache.org> on 2023/01/31 21:26:21 UTC

[GitHub] [incubator-livy] idzikovsky opened a new pull request, #388: Provide a way to disable the fix for LIVY-697

idzikovsky opened a new pull request, #388:
URL: https://github.com/apache/incubator-livy/pull/388

   The fix for the LIVY-697 (#246) works fine for the problem it was designed to solve. But it causes another problem:
   the host reported to Livy Server from the RSC Driver is never used.
   
   I know that this is kind of unsupported for now, but I'm trying to run Livy in Kubernetes in the namespace with Istio injections enabled.
   And after fix for LIVY-697 it stopped working (I use Livy 0.7 with patches from #249), howerver when I used patches from #167 applied on Livy 0.5 everything was fine.
   
   **Root cause**
   In the fix for #167 we are explicitly (setting the host)[https://github.com/apache/incubator-livy/pull/249/files#diff-43114318c4b009c2404f7eb326a84c184fb1501a3237c49a771df851d0f6f328R175-R177] that will be reported by RSC Driver back to Livy Server. And because of the fix for LIVY-697 a value of this property is ignored.
   
   And even in that case, everything works fine, until we try to enable Istio: as Istio wraps all TCP traffic through a proxy, the following piece of code would set the host property not to the host of the actual RSC Driver, but to the IP address of TCP proxy server which would be 127.0.0.6:
   ```java
           InetSocketAddress insocket = (InetSocketAddress) ctx.channel().remoteAddress();
           host = insocket.getAddress().getHostAddress();
   ```
   
   So it would be good to add some option to disable the workaround that was made in the scope of LIVY-697.
   Especially taking into account that initially Livy was designed to connect to the driver using host/port reported by the driver, and not by using hacks that get the host from a remote connection channel.
   
   In my fix, I'm providing an option to enable the fix for LIVY-697 and leave it enabled by default to keep the current behavior as is.
   
   ## How was this patch tested?
   
   Manual
   
   


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

To unsubscribe, e-mail: commits-unsubscribe@livy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org