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

Unexpected error log message in antrea-mc-controller for leader #6152

Open
antoninbas opened this issue Mar 26, 2024 · 2 comments
Open

Unexpected error log message in antrea-mc-controller for leader #6152

antoninbas opened this issue Mar 26, 2024 · 2 comments
Labels
area/multi-cluster Issues or PRs related to multi cluster. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@antoninbas
Copy link
Contributor

I observed the following error log:

E0326 21:26:11.127301       1 stale_controller.go:71] "Fail to get MemberClusterAnnounces" err="the cache is not started, can not read objects"

With a bit more context:

I0326 21:26:11.126810       1 leader.go:122] "Leader MC Controller Starting Manager"
I0326 21:26:11.127037       1 stale_controller.go:97] "Starting StaleResCleanupController"
I0326 21:26:11.127301       1 server.go:50] "starting server" kind="health probe" addr="[::]:8080"
E0326 21:26:11.127301       1 stale_controller.go:71] "Fail to get MemberClusterAnnounces" err="the cache is not started, can not read objects"
I0326 21:26:11.127633       1 server.go:191] "Starting webhook server" logger="controller-runtime.webhook"
I0326 21:26:11.128119       1 certwatcher.go:161] "Updated current TLS certificate" logger="controller-runtime.certwatcher"
I0326 21:26:11.128596       1 server.go:242] "Serving webhook server" logger="controller-runtime.webhook" host="" port=9443
I0326 21:26:11.129095       1 certwatcher.go:115] "Starting certificate watcher" logger="controller-runtime.certwatcher"
I0326 21:26:11.232539       1 controller.go:178] "Starting EventSource" controller="memberclusterannounce" controllerGroup="multicluster.crd.antrea.io" controllerKind="MemberClusterAnnounce" source="kind source: *v1alpha1.MemberClusterAnnounce"

It is probably harmless, but we could also probably avoid it with a more "correct" initialization order?

cc @luolanzone

@antoninbas antoninbas added priority/backlog Higher priority than priority/awaiting-more-evidence. area/multi-cluster Issues or PRs related to multi cluster. labels Mar 26, 2024
@roopeshsn
Copy link
Contributor

Hi @antoninbas! What's the correct initialization order? That information will help me to work on this issue.

@antoninbas
Copy link
Contributor Author

Hi @antoninbas! What's the correct initialization order? That information will help me to work on this issue.

A correct initialization order would be one that doesn't produce this error.

Maybe the manager should be started before running the staleController:

go staleController.Run(stopCh)
klog.InfoS("Leader MC Controller Starting Manager")
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
return fmt.Errorf("error running Manager: %v", err)
}

This can probably be confirmed with a little bit of research (controller-runtime library documentation & examples).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/multi-cluster Issues or PRs related to multi cluster. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

2 participants