Closed jeromegn closed 1 year ago
can confirm what you're seeing; we'll take a look
as for boot_args I wasn't aware we were actually honoring those but I guess we are in some cases
Thanks!
For completeness, I also tried with firecracker 1.3.3 and the latest cloud-hypervisor w/ the same result.
@jeromegn while not sure where that date-time comes from and why (both fc and ch), but if you want to test/use ntp klib, you need to have the application running for a bit longer, since it takes about 53-54 seconds for the ntp klib to collect samples and apply the clock changes.
From tests some time ago, on my env tests,
false
) and system frooze https://github.com/nanovms/nanos/blob/67aa0d1b35d2fcda3a3370ab8ea734efe45f3bb9/src/x86_64/rtc.c#L59@rinor interesting. I don't think I tried the cloud-hypervisor + ntp combo. Even if that works, ~1 minute to become time-synced is way too long. During that time, no TLS handshakes can happen (or maybe no TLS handshakes using certificates only valid after a date later than August 16th 2021).
I did notice a freeze when using firecracker, but didn't link that to ntp.
--nanos-version f0fe064
flag to the Ops command line to create an image@jeromegn as for your questions:
Thank you! I should be able to continue my research into nanos with this. I'll try it out later today.
If there's no debugging server available, would there be a way to output verbose logs at runtime (especially boot time) from the nanos kernel? Somewhat like the debug
Linux kernel boot arg.
Concerning boot args: I added the trust_cpu one, but wasn't sure it would do anything. The rest of the args was taken from the ops docs for firecracker.
Nanos supports various tracing options to output verbose logs at runtime, see https://docs.ops.city/ops/configuration and specifically the trace, ltrace and NoTrace sections. But most of this output results from the interaction between the kernel and the user program, so does not cover what happens during boot before the user program begins execution. To get verbose logs at boot time one has to recompile the kernel after adding *_DEBUG
preprocessor defines in various source files (e.g. uncommenting the INIT_DEBUG
line at https://github.com/nanovms/nanos/blob/2e9393b6753e0fb98491a029a3a41380c1716526/platform/pc/service.c#L30).
at the moment, the only boot_args we support are those inserted by firecracker to describe the topology of virtio_mmio devices (such as the disk and network interfaces)
That made me wonder if there's support for vsock devices? I thought there wasn't, but I noticed there's 1 reference to "VSOCK" in this codebase. However, trying to bind w/ a AF_VSOCK family socket does not work. Maybe I'm just missing a vsock device config in the boot arg?
No, vsock devices are not supported yet.
I'm not sure how to debug this, there aren't many docs about firecracker usage, but the clock is very wrong when using firecracker.
It appears to be stuck on Aug 16th 2021, on boot. I can't figure out why exactly. Firecracker supports KVM clock (pv), but I don't know if nanos is detecting it.
Using the C program defined here: https://github.com/nanovms/nanos/issues/357#issuecomment-464216122
I get:
fc.json
```json { "boot-source": { "kernel_image_path": "/home/jerome/.ops/0.1.43/kernel.img", "boot_args": "console=ttyS0 reboot=k panic=1 pci=off random.trust_cpu=on" }, "drives": [ { "drive_id": "rootfs", "path_on_host": "/home/jerome/.ops/images/hello", "is_root_device": true, "is_read_only": false } ], "network-interfaces": [ { "iface_id": "eth0", "guest_mac": "AA:FC:00:00:00:01", "host_dev_name": "tap0" } ], "machine-config": { "vcpu_count": 1, "mem_size_mib": 512, "ht_enabled": false }, "logger": { "log_path": "logs.fifo", "level": "info" } } ```ops.json
```json { "Env": { "PORT": "8080" }, "Klibs": ["ntp.dbg"], "ManifestPassthrough": { "ntp_servers": ["0.us.pool.ntp.org:123"], "ntp_poll_min": "4", "ntp_poll_max": "6" } } ```I'm only trying the
ntp
klib as an attempt to fix it, but that doesn't help either.A few questions:
boot_args
for the kernel?