You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "squakez (via GitHub)" <gi...@apache.org> on 2023/04/12 11:10:04 UTC

[GitHub] [camel-k] squakez opened a new issue, #4246: Acquiring lock at startup is taking long

squakez opened a new issue, #4246:
URL: https://github.com/apache/camel-k/issues/4246

   I recall the lock acquiring used to take long some release ago. Now, it seems again it takes like 15 seconds, which I think it's longer than it should:
   ```
   camel-k-operator-6844754cc8-98bw7 camel-k-operator {"level":"info","ts":1681297670.2073886,"logger":"camel-k.cmd","msg":"attempting to acquire leader lease default/camel-k-lock...\n"}
   camel-k-operator-6844754cc8-98bw7 camel-k-operator {"level":"info","ts":1681297685.6172009,"logger":"camel-k.cmd","msg":"successfully acquired lease default/camel-k-lock\n"}
   ```
   We need to put an eye on it.


-- 
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@camel.apache.org.apache.org

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


[GitHub] [camel-k] squakez commented on issue #4246: Acquiring lock at startup is taking long

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #4246:
URL: https://github.com/apache/camel-k/issues/4246#issuecomment-1507069197

   It seems this is because we're failing to release the lease, and it happens when a previous `Lease` was present on the namespace. When we shutdown the operator, we can see we have some error:
   ```
   camel-k-operator-6844754cc8-kj76g camel-k-operator {"level":"info","ts":1681395538.729762,"msg":"Wait completed, proceeding to shutdown the manager"}
   camel-k-operator-6844754cc8-kj76g camel-k-operator {"level":"error","ts":1681395538.7311943,"logger":"camel-k.cmd","msg":"Failed to release lock: leases.coordination.k8s.io \"camel-k-lock\" is forbidden: User \"system:serviceaccount:default:camel-k-operator\" cannot update resource \"leases\" in API group \"coordination.k8s.io\" in the namespace \"default\"\n","stacktrace":"k8s.io/klog/v2.(*loggingT).output\n\tk8s.io/klog/v2@v2.80.0/klog.go:877\nk8s.io/klog/v2.(*loggingT).printfDepth\n\tk8s.io/klog/v2@v2.80.0/klog.go:739\nk8s.io/klog/v2.(*loggingT).printf\n\tk8s.io/klog/v2@v2.80.0/klog.go:721\nk8s.io/klog/v2.Errorf\n\tk8s.io/klog/v2@v2.80.0/klog.go:1555\nk8s.io/client-go/tools/leaderelection.(*LeaderElector).release\n\tk8s.io/client-go@v0.25.6/tools/leaderelection/leaderelection.go:306\nk8s.io/client-go/tools/leaderelection.(*LeaderElector).renew\n\tk8s.io/client-go@v0.25.6/tools/leaderelection/leaderelection.go:289\nk8s.io/client-go/tools/leaderelection.(*LeaderElector).Run\n\tk8
 s.io/client-go@v0.25.6/tools/leaderelection/leaderelection.go:212\nsigs.k8s.io/controller-runtime/pkg/manager.(*controllerManager).startLeaderElection.func3\n\tsigs.k8s.io/controller-runtime@v0.13.1/pkg/manager/internal.go:647"}
   camel-k-operator-6844754cc8-kj76g camel-k-operator {"level":"error","ts":1681395538.7313108,"msg":"error received after stop sequence was engaged","error":"leader election lost","stacktrace":"sigs.k8s.io/controller-runtime/pkg/manager.(*controllerManager).engageStopProcedure.func1\n\tsigs.k8s.io/controller-runtime@v0.13.1/pkg/manager/internal.go:545"}
   ```
   We need to fix this one and make sure the `Lease` is released when the manager stops.


-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez closed issue #4246: Acquiring lock at startup is taking long

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez closed issue #4246: Acquiring lock at startup is taking long
URL: https://github.com/apache/camel-k/issues/4246


-- 
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@camel.apache.org

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