Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jifa can only be deployed in the "jifa" k8s namespace? #262

Closed
mark8s opened this issue Mar 18, 2024 · 8 comments
Closed

jifa can only be deployed in the "jifa" k8s namespace? #262

mark8s opened this issue Mar 18, 2024 · 8 comments

Comments

@mark8s
Copy link
Contributor

mark8s commented Mar 18, 2024

Well, I am currently building a jifa helm chart by myself, and I also want to contribute to this project after it is completed.

But when I deployed it in the test-jifa namespace, the following error log occurred:

2024-03-18T10:29:17.795Z  INFO 1 --- [nio-8102-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-03-18T10:29:17.795Z  INFO 1 --- [nio-8102-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2024-03-18T10:29:17.798Z  INFO 1 --- [nio-8102-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 2 ms
2024-03-18T10:29:26.393Z ERROR 1 --- [ker - 1 Starter] o.e.j.s.service.impl.K8SWorkerScheduler  : Failed to start elastic worker, response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods is forbidden: User \"system:serviceaccount:test-jifa:jifa\" cannot create resource \"pods\" in API group \"\" in the namespace \"jifa\"","reason":"Forbidden","details":{"kind":"pods"},"code":403}

2024-03-18T10:29:48.920Z ERROR 1 --- [MessageBroker-3] o.e.j.s.service.impl.K8SWorkerScheduler  : Error occurred when terminating inconsistent instances

io.kubernetes.client.openapi.ApiException: 
	at io.kubernetes.client.openapi.ApiClient.handleResponse(ApiClient.java:973) ~[client-java-api-18.0.1.jar:na]
	at io.kubernetes.client.openapi.ApiClient.execute(ApiClient.java:885) ~[client-java-api-18.0.1.jar:na]
	at io.kubernetes.client.openapi.apis.CoreV1Api.listNamespacedPodWithHttpInfo(CoreV1Api.java:32918) ~[client-java-api-18.0.1.jar:na]
	at io.kubernetes.client.openapi.apis.CoreV1Api.listNamespacedPod(CoreV1Api.java:32807) ~[client-java-api-18.0.1.jar:na]
	at org.eclipse.jifa.server.service.impl.K8SWorkerScheduler.terminateInconsistentInstancesQuietly(K8SWorkerScheduler.java:179) ~[jifa/:na]
	at org.eclipse.jifa.server.task.LockSupport.runUnderLock(LockSupport.java:35) ~[jifa/:na]
	at org.eclipse.jifa.server.task.ElasticWorkerRelatedTasks.terminateInconsistentInstances(ElasticWorkerRelatedTasks.java:56) ~[jifa/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-6.0.12.jar:6.0.12]
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-6.0.12.jar:6.0.12]
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

image

image

I looked through the source code, and it seems that this is hard-coded in the code. It seems that it can't be passed in using args?

@D-D-H
Copy link
Contributor

D-D-H commented Mar 18, 2024

I agree. We should make it configurable.

@mark8s
Copy link
Contributor Author

mark8s commented Mar 19, 2024

@D-D-H Can this problem be fixed in the next two days? Also update to the latest image by the way. 😄😄😄

@D-D-H
Copy link
Contributor

D-D-H commented Mar 19, 2024

@mark8s

I can fix this quickly.

The current main branch code is very different from the last time the image was built. Is it convenient for you to build a local image yourself first?

@mark8s
Copy link
Contributor Author

mark8s commented Mar 19, 2024

@D-D-H Yes, I can build the image myself. I want to submit the helm charts I made myself to deploy jifa, is that OK?

@D-D-H
Copy link
Contributor

D-D-H commented Mar 19, 2024

I want to submit the helm charts I made myself to deploy jifa, is that OK?

Do you mean you want to submit a PR for adding support for helm? Contributions are very welcome.

@D-D-H
Copy link
Contributor

D-D-H commented Mar 19, 2024

@mark8s

I filed a PR for this issue. Please verify it if it works for you.

#264

@mark8s
Copy link
Contributor Author

mark8s commented Mar 19, 2024

@D-D-H Could you please help me review this PR? I submit helm chart #268

@D-D-H
Copy link
Contributor

D-D-H commented Mar 19, 2024

@D-D-H Could you please help me review this PR? I submit helm chart #268

Thanks.

We will review it.

@D-D-H D-D-H closed this as completed Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants