direktiv / vorteil

turn your applications and containers into micro virtual machines
https://direktiv.io
Apache License 2.0
174 stars 13 forks source link

Firecracker visualizer logic earlier than kernel manager logic #45

Closed jalfvort closed 4 years ago

jalfvort commented 4 years ago

It looks like the Firecracker visualizer is running earlier than the kernel manager or whatever merges the default kernel values. Here is an example of what kind of problem this causes:

Scenario 1 - Not Kernel defined :

VCFG

....
[vm]
  cpus = 1
  ram = "91 MiB"
  inodes = 100
  disk-size = "+10 MiB"
.$ /cli run /tmp/helloworld/ --platform firecracker
Scanning inputs  ⠋                                                                                
Writing image done [=================================] 32.0 MiB / 32.0 MiB
Kernel 'firecracker-' VMLinux does not exist

visualizers logic thinks kernel is = "" , but it should be whatever the default / latest kernel is.

Scenario 2 - Old Kernel defined :

VCFG

....
[vm]
  cpus = 1
  ram = "91 MiB"
  inodes = 100
  kernel = "20.8.3"
  disk-size = "+10 MiB"
$ ./cli run /tmp/helloworld/ --platform firecracker
Scanning inputs  ⠋                                                                                
Requested kernel '20.8.3' is too old for this compiler. Using latest kernel instead.
Writing image done [==============================] 32.0 MiB / 32.0 MiB
Kernel 'firecracker-20.8.3' VMLinux does not exist

visualizers logic thinks kernel is = "20.8.3" (from vcfg) , but it should be whatever the default / latest kernel is (kernel manger is setting this).