weaveworks / ignite

Ignite a Firecracker microVM
https://ignite.readthedocs.org
Apache License 2.0
3.49k stars 226 forks source link

timeout waiting for ignite-spawn startup #843

Closed networkop closed 3 years ago

networkop commented 3 years ago

I'm seeing this error every time when I try to re-start a stopped VM. Noticed it when E2E tests failed.

Here are the steps to reproduce:

sudo ignite run --name test weaveworks/ignite-ubuntu
sudo ignite stop test
sudo ignite start test

The logs from the container runtime seem to suggest it's a storage/devmapper issue:

INFO[0000] Moving IP address 172.17.0.2 (255.255.0.0) with gateway 172.17.0.1 from container to VM
INFO[0000] IP detected, stealing ...
INFO[0000] Called startVMM(), setting up a VMM on /var/lib/firecracker/vm/b3c4648a4f805a97/firecracker.sock
INFO[0000] Starting DHCP server for interface "br_eth0" (172.17.0.2)
INFO[0000] refreshMachineConfiguration: [GET /machine-config][200] getMachineConfigurationOK  &{CPUTemplate:Uninitialized HtEnabled:0xc000442613 MemSizeMib:0xc000442608 VcpuCount:0xc000442600}
INFO[0000] PutGuestBootSource: [PUT /boot-source][204] putGuestBootSourceNoContent
INFO[0000] Attaching drive /dev/mapper/ignite-b3c4648a4f805a97, slot 1, root true.
ERRO[0000] Attach drive failed: /dev/mapper/ignite-b3c4648a4f805a97: [PUT /drives/{drive_id}][400] putGuestDriveByIdBadRequest  &{FaultMessage:Unable to seek the block device backing file due to invalid permissions or the file was corrupted. Error number: No such device or address (os error 6)}
ERRO[0000] While attaching drive /dev/mapper/ignite-b3c4648a4f805a97, got error [PUT /drives/{drive_id}][400] putGuestDriveByIdBadRequest  &{FaultMessage:Unable to seek the block device backing file due to invalid permissions or the file was corrupted. Error number: No such device or address (os error 6)}
WARN[0000] Failed handler "fcinit.AttachDrives": [PUT /drives/{drive_id}][400] putGuestDriveByIdBadRequest  &{FaultMessage:Unable to seek the block device backing file due to invalid permissions or the file was corrupted. Error number: No such device or address (os error 6)}
WARN[0000] firecracker exited: signal: terminated
FATA[0000] runtime error for VM "b3c4648a4f805a97": failed to start machine: [PUT /drives/{drive_id}][400] putGuestDriveByIdBadRequest  &{FaultMessage:Unable to seek the block device backing file due to invalid permissions or the file was corrupted. Error number: No such device or address (os error 6)}

I can see that the /dev/mapper device is passed to the container runtime:

            "Devices": [
                {
                    "PathOnHost": "/dev/mapper/ignite-b3c4648a4f805a97",
                    "PathInContainer": "/dev/mapper/ignite-b3c4648a4f805a97",
                    "CgroupPermissions": "rwm"
                }

And it's definitely present when I try to restart the VM:

 ls -la /dev/mapper/ignite-b3c4648a4f805a97
brw-rw---- 1 root disk 252, 1 May 23 13:31 /dev/mapper/ignite-b3c4648a4f805a97

I'm not really sure what to look at next.

networkop commented 3 years ago

I can't seem to reproduce this anymore. Closing for now.