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

Jailer LinkFilesHandler should check if m.Cfg.JailerCfg.ChrootBaseDir is empty #313

Open
radekg opened this issue Feb 17, 2021 · 1 comment

Comments

@radekg
Copy link

radekg commented Feb 17, 2021

If yes, it should use the value of defaultJailerPath instead. The issue can be reproduced by using firectl with jailer but without --chroot-base-dir. Example:

radek@r720sas:~/dev/golang/src/github.com/firecracker-microvm/firectl$ sudo ./firectl --jailer=/usr/bin/jailer --exec-file=/usr/bin/firecracker-v0.22.4-x86_64 --id=alpine --kernel=/firecracker/kernels/vmlinux-v5.8 --root-drive=/firecracker/filesystems/alpine-base-root.ext4 --cni-network=alpine --ncpus=1 --memory=128
INFO[0000] Called startVMM(), setting up a VMM on /srv/jailer/firecracker-v0.22.4-x86_64/alpine/root/run/firecracker.socket
WARN[0000] Failed handler "fcinit.LinkFilesToRootFS": link /firecracker/kernels/vmlinux-v5.8 firecracker-v0.22.4-x86_64/alpine/root/vmlinux-v5.8: no such file or directory
FATA[0000] Failed to start machine: link /firecracker/kernels/vmlinux-v5.8 firecracker-v0.22.4-x86_64/alpine/root/vmlinux-v5.8: no such file or directory
radek@r720sas:~/dev/golang/src/github.com/firecracker-microvm/firectl$ sudo tree /srv/jailer/
/srv/jailer/
└── firecracker-v0.22.4-x86_64
    └── alpine
        └── root
            ├── dev
            │   ├── kvm
            │   └── net
            │       └── tun
            ├── firecracker-v0.22.4-x86_64
            └── run

The place in the code: https://github.com/firecracker-microvm/firecracker-go-sdk/blob/master/jailer.go#L360.

I can prepare a PR.

@ranjankuldeep
Copy link

Can I fix this ?
I personally faced this and after so much time wasted searching, I finally saw that you also raised the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants