Provide a way to disable the fix for LIVY-697 #388
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 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:
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