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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

larsks
Copy link

@larsks larsks commented Jun 22, 2024

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]

A common first experience with firecracker (see e.g. firecracker-microvm#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]>
@zulinx86
Copy link
Contributor

zulinx86 commented Jun 28, 2024

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 zulinx86 added the Status: Awaiting author Indicates that an issue or pull request requires author action label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting author Indicates that an issue or pull request requires author action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants