firecracker icon indicating copy to clipboard operation
firecracker copied to clipboard

Don't spam console with "failed to write to tap" messages

Open larsks opened this issue 1 year ago • 1 comments

A common first experience with firecracker (see e.g. #746) is to start a new virtual machine and immediately start getting spammed with messages like:

2024-06-21T22:10:18.189726925 [anonymous-instance:main] Failed to write
to tap: Os { code: 5, kind: Uncategorized, message: "Input/output
error" }

This happens because firecracker will create the tap device if it doesn't already exist, and unlike most vmms it will not configure the device up in this case.

All that means that this is both a common and an expected situation and does not require this level of notification.

Signed-off-by: Lars Kellogg-Stedman [email protected]

larsks avatar Jun 22 '24 02:06 larsks

Hi @larsks , Thank you for your PR.

As explained in our network setup doc, the first step to use network is to create a tap device: https://github.com/firecracker-microvm/firecracker/blob/main/docs/network-setup.md

Also, as mentioned in the issue #764, we recommend to provide an already-created tap interface.

The recommended method of running firecracker though is unprivileged and providing an already-created tap interface.

To prevent users from misusing Firecracker, we attempted to make it exit with error when the tap has not been created in issue #754, but we weren't able to find the way to detect that unfortunately.

Double checked in the kernel code if there is any native way we could use to detect whether a tap device already exists. Could not find one. Closing this since no other viable way to implement the proposed enhancement was found.

We think just suppressing the error message doesn't solve the fundamental problem now, but we might get chance of reconsidering it! So could you please provide more information?

  • Are you seeing the error message before microVM starts or after?
  • How do you set up the tap device created by Firecracker to make it work?
  • Could you provide detailed steps of your setup?
  • Are there any reasons why you set up the tap device before running Firecracker?

Thanks,

zulinx86 avatar Jun 28 '24 12:06 zulinx86

Hi @larsks ,

We hope this finds you well. Had you have a chance to look at the previous update?

We are closing this issue because there is no updates for more than 1 month and we think this may not be relevant to you anymore. Please feel free to reopen it or reach us out if you have any questions or updates.

Thanks for your understanding.

zulinx86 avatar Aug 12 '24 09:08 zulinx86