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

feat: implement Talos kernel log receiver #650

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

smira
Copy link
Member

@smira smira commented Nov 26, 2021

Fixes #527

Talos logs (see siderolabs/talos#4600) are
delivered to Sidero over the SideroLink tunnel.

Logs can be seen with:

$ kubectl logs -n sidero-system deployment/sidero-controller-manager -c serverlogs -f
{"clock":67194673,"cluster":"management-cluster","facility":"user","machine":"default/management-cluster-cp-4j8f4","metal_machine":"default/management-cluster-cp-hbq57","msg":"[talos] phase bootloader (19/19): done, 176.795226ms\n","priority":"warning","seq":768,"server_uuid":"5b72932a-c482-4aa5-b00e-4b8773d3ac48","talos-level":"warn","talos-time":"2021-11-26T19:34:42.444342392Z"}

Logs are annotated on the fly with the information about Server,
MetalMachine, Machine and Cluster.

Signed-off-by: Andrey Smirnov [email protected]

@netlify
Copy link

netlify bot commented Nov 26, 2021

👷 Deploy request for wonderful-swartz-a1308c pending review.
Visit the deploys page to approve it

🔨 Explore the source changes: ab12b81

@smira
Copy link
Member Author

smira commented Nov 26, 2021

/approve

@@ -405,14 +407,21 @@ func newEnvironmentFromServerClass(serverBinding *infrav1.ServerBinding) (env *m
}

func appendTalosArguments(env *metalv1alpha1.Environment) {
if sideroLinkConfig.ServerAddress.IsZero() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe can load it in newEnvironment call. Then it will be possible to handle an error there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it's weird. we can't load before mgr is started, as client is not initialized yet.

we don't have a good pre-hook for it. probably we can put it to some errgroup in main

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended using mgr.Add in main.go

Fixes siderolabs#527

Talos logs (see siderolabs/talos#4600) are
delivered to Sidero over the SideroLink tunnel.

Logs can be seen with:

```
$ kubectl logs -n sidero-system deployment/sidero-controller-manager -c serverlogs -f
{"clock":67194673,"cluster":"management-cluster","facility":"user","machine":"default/management-cluster-cp-4j8f4","metal_machine":"default/management-cluster-cp-hbq57","msg":"[talos] phase bootloader (19/19): done, 176.795226ms\n","priority":"warning","seq":768,"server_uuid":"5b72932a-c482-4aa5-b00e-4b8773d3ac48","talos-level":"warn","talos-time":"2021-11-26T19:34:42.444342392Z"}
```

Logs are annotated on the fly with the information about `Server`,
`MetalMachine`, `Machine` and `Cluster`.

Signed-off-by: Andrey Smirnov <[email protected]>
@smira smira marked this pull request as ready for review November 30, 2021 20:46
@smira
Copy link
Member Author

smira commented Dec 1, 2021

/m --ff

@talos-bot talos-bot merged commit ab12b81 into siderolabs:master Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

log receiver service
3 participants