-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
kmods fact produces null byte in parameters datastructure #98
Comments
I'm seeing a different error message since yesterday:
It's also Puppet: 7.26.0 |
Changing the line
to
fixes the issue, but I'm not sure, if that's the best way. |
The new error seems to be caused by new version of facter: |
@elfranne thanks for finding this. This is very helpful, as Puppet release notes does not say about the Facter bump, nor Facter release notes have a note about this behaviour. |
@saz can confirm that patch is good. You should send a PR. |
It looks like the check was added in puppetlabs/facter#2590. So basically, if the problem was already there, it was not reported before. Looking at https://elixir.bootlin.com/linux/latest/source/drivers/virtio/virtio_mmio.c#L784 it seems that this is supposed to be an empty string or multiple lines of text. What is your kernel version? |
maybe I can answer
|
@smortex this issue has been reported two months ago, maybe the error message was different due to the usage of Foreman? I'm seeing this error message on Ubuntu 20.04 and Ubuntu jammy. As the kernel version is still the same, as two days ago, it seems unrelated. I'll check, when facter has been upgraded on those affected systems. |
The Debian package release for Ubuntu Focal and Jammy happened on 2023-08-23. This perfectly matches the first time I've seen this issue. As @waipeng pointed out, there's no information about that change in any of the release notes. @smortex I don't understand why, but the error isn't shown on Debian Bookworm with kernel 6.1. Looks like it's only happening for me on Ubuntu systems with kernel 5.x |
This can be removed when upstream issue [1] has a patch, and a version we can use. [1]: voxpupuli#98
This can be removed when upstream issue [1] has a patch, and a version we can use. [1]: voxpupuli#98
All Debian nodes I have access to have no All these nodes are the same kind of nodes provided by the same service provider, so the Ubuntu kernel seems to expose some crap that the Debian kernel does not expose. Ubuntu being a Debian derivative, it's maybe worth looking for the root cause in the Ubuntu patches for the kernel? It's not clear what break when you have this error. Is it just some spam in the log (in which case I would expect Puppet not to hide it because it is indeed wrong)? Does it break things (in which case we can detect if a value read has null bytes and emit a warning and discard that value if so)? |
@smortex what are the kernel versions you tested with? I suspect the difference may be due to modules that gets loaded with the vendor default kernels. The impact is that there is an error emitted when running Puppet. E.g.
Puppet compilation still succeeds. However, this error makes it into |
This can be removed when upstream issue [1] has a patch, and a version we can use. [1]: voxpupuli#98 Change-Id: Ia6471d558e1207aa29c0ef3fbcbab5556cd3ba87
Debian:
Ubuntu:
The Debian nodes have a lot of virtio modules loaded (the machines with a $ facter kernelrelease
5.10.0-23-cloud-amd64
$ lsmod | grep virtio
virtio_console 40960 1
virtio_balloon 24576 0
virtio_net 61440 0
net_failover 24576 1 virtio_net
virtio_scsi 24576 2
scsi_mod 258048 4 virtio_scsi,sd_mod,libata,sg
virtio_pci 28672 0
virtio_ring 36864 5 virtio_console,virtio_balloon,virtio_scsi,virtio_pci,virtio_net
virtio 16384 5 virtio_console,virtio_balloon,virtio_scsi,virtio_pci,virtio_net The Ubuntu VMs have less modules, but these modules are loaded on Debian where we don't have this issue: $ facter kernelrelease
4.15.0-213-generic
$ lsmod | grep virtio
virtio_scsi 20480 2
virtio_net 49152 0 |
@smortex more info On Ubuntu the virtio_mmio appears to be compiled into kernel
On Debian 11, it is a module
After loading the module, it appears that the structure of /sys is different
It doesn't have Whether this is difference in kernel version or other compilation options, I have no idea. |
This is not the only impact, the I have this error on "Debian 11" machines as well but they're actually running a Proxmox VE kernel (which is newer than the Debian ones, and likely comes from the same source as Ubuntu's kernels). |
As the |
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
In my case Puppet ran in a libvirt VM where the parameter "virtio_mmio/device" has apparently no value. Running
puppet facts
produced:This produced the following error when uploading the fact to Foreman:
I know Foreman could handle such input more gracefully, but
\u0000
does not look like a correct value either.What are you seeing
See above.
What behaviour did you expect instead
An empty string like this:
Output log
See above.
Any additional information you'd like to impart
The text was updated successfully, but these errors were encountered: