firecracker-microvm / firecracker-go-sdk

An SDK in Go for the Firecracker microVM API
Apache License 2.0
498 stars 126 forks source link

New info/warning messages from Firecracker when using SDK #534

Open alexellis opened 10 months ago

alexellis commented 10 months ago

Hi there, I've been using Firecracker for a while, mainly via the Go SDK and noticed a bunch of new messages with the v1.5.1 release.

Is there a recommended way to disable these as they're not required and it's not entirely clear where they are coming from.

2024-02-05T18:34:55.694924617 [anonymous-instance:fc_vcpu 0] Received KVM_SYSTEM_EVENT: type: 2, event: 0
2024-02-05T18:34:55.694954408 [anonymous-instance:main] Vmm is stopping.
2024-02-05T18:34:55.695110571 [anonymous-instance:main] Vmm is stopping.
2024-02-05T18:34:55.725922300 [anonymous-instance:main] Firecracker exited successfully

Thanks. Hope the answer is also useful to others landing here.

alexellis commented 8 months ago

There are also dozens of messages generated which were not shown before during the initial setup of the VM.. a short snippet:

2024-03-22T09:16:24.701798179 [anonymous-instance:main] Running Firecracker v1.5.1
2024-03-22T09:16:24.711814138 [anonymous-instance:fc_api] The API server received a Get request on "/machine-config".
2024-03-22T09:16:24.711860706 [anonymous-instance:fc_api] The request was executed successfully. Status code: 200 OK.
2024-03-22T09:16:24.712049926 [anonymous-instance:fc_api] The API server received a Put request on "/metrics" with body "{\"metrics_path\":\"...-2720694948/metrics.json\"}\n".
2024-03-22T09:16:24.712084928 [anonymous-instance:fc_api] The request was executed successfully. Status code: 204 No Content.
2024-03-22T09:16:24.712214834 [anonymous-instance:fc_api] The API server received a Put request on "/machine-config" with body "{\"mem_size_mib\":7000,\"smt\":false,\"vcpu_count\":8}\n".
2024-03-22T09:16:24.712245202 [anonymous-instance:fc_api] The request was executed successfully. Status code: 204 No Content.
2024-03-22T09:16:24.712379454 [anonymous-instance:fc_api] The API server received a Get request on "/machine-config".
2024-03-22T09:16:24.712407169 [anonymous-instance:fc_api] The request was executed successfully. Status code: 200 OK.
alexellis commented 8 months ago

This seems like regression because we have the log level set to "Error" and none of these messages are errors.

Could someone who maintains this SDK please take a look or consider responding to my question?

@fangn2 are you involved with the project?

gudmundur commented 5 months ago

@alexellis I hit this same issue when upgrading. We're using the jailer and we don't set a log path or a FIFO and relied on the default log level from firecracker. When I upgraded I saw all the same log lines as you were, and fixed this by passing the --level argument through the jailer as shown in #574. If this fix doesn't work for you, let me know what your setup is and I'll see if I can incorporate a fix for you as part of my PR.