Stanislav Porotikov created ZEPPELIN-6168:
---------------------------------------------

             Summary: Can't launch k8s interpreter with dots in pod name
                 Key: ZEPPELIN-6168
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-6168
             Project: Zeppelin
          Issue Type: Bug
          Components: docker, interpreter-launcher, interpreter-setting, 
Interpreters
    Affects Versions: 0.12.0
            Reporter: Stanislav Porotikov


I've also configured [trino 
interpreter|https://trino.io/docs/current/overview.html] I had used to use 
scoped per user mode in standard Zeppelin setup, so I tried it in my k8s 
deployment. It leads Zeppelin to create a Pod and Service with the same name 
like {{{{<interpreter_group>-<username>-<RANDOM_STRING>}}}} (for example 
{{{}trino-mr.user-zpxesi{}}}).

But Kubernetes doesn't allow creating Service name with dots in it (more 
information in 
[issue|https://github.com/kubernetes/kubernetes/issues/3752#issuecomment-234752944]).

If username contains dots, it cause error:
Failure executing: POST at: 
https://10.96.0.1/api/v1/namespaces/zeppelin/services. Message: Service 
"trino-mr.user-zpxesi" is invalid: metadata.name: Invalid value: 
"trino-mr.user-zpxesi": a DNS-1035 label must consist of lower case 
alphanumeric characters or '-', start with an alphabetic character, and end 
with an alphanumeric character (e.g. 'my-name',  or 'abc-123', regex used for 
validation is '[a-z]([-a-z0-9]*[a-z0-9])?')
I can change Service name template in interpreter Pod definition, but in this 
case Zeppelin server still tries to resolve invalid interpreter Pod dns name 
with dot and this cause error:
java.lang.RuntimeException
    at 
org.apache.zeppelin.interpreter.remote.PooledRemoteClient.callRemoteFunction(PooledRemoteClient.java:123)
    at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreterProcess.callRemoteFunction(RemoteInterpreterProcess.java:100)
    at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreterProcess.init(RemoteInterpreterProcess.java:104)
    at 
org.apache.zeppelin.interpreter.ManagedInterpreterGroup.getOrCreateInterpreterProcess(ManagedInterpreterGroup.java:72)
    at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getOrCreateInterpreterProcess(RemoteInterpreter.java:106)
    at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.internal_create(RemoteInterpreter.java:156)
    at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.open(RemoteInterpreter.java:128)
    at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getFormType(RemoteInterpreter.java:273)
    at org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:428)
    at org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:68)
    at org.apache.zeppelin.scheduler.Job.run(Job.java:187)
    at 
org.apache.zeppelin.scheduler.AbstractScheduler.runJob(AbstractScheduler.java:136)
    at 
org.apache.zeppelin.scheduler.RemoteScheduler$JobRunner.run(RemoteScheduler.java:186)
    at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to