jsdelivr / globalping-hwprobe

OS image for Globalping hardware probes. Become a GitHub Sponsor to get yours!
19 stars 6 forks source link

Firmware v2 #42

Closed kernelgurumeditation closed 4 months ago

kernelgurumeditation commented 7 months ago

@jimaek , @MartinKolarik

Container update in Firmware V2 (skopeo edition :D )

A container version is still bundled when the firmware is created, this is the initial version. The check for new container versions is performed just before the mandatory reboot (that happens between every 3 and 5 days) If a new version is detected, it is downloaded to a special partition(mmcblock0p4), and after the download finishes, it is copied to the container partition(mmcblk0p3) If the probe was working correctly at the time of mmcblk0p3 update, the tested version will be used to update the bundled container. The new version now present in the mmcblk0p3 will be used from the next reboot onwards If, for any reason, the container fails to start (corruption in the file/card or bug in the container), the jsdelivr-systemWatchdog.sh script will reset the system to use the bundled container. After the probe returns to normal function, it will be updated automatically.

Note: The change to skopeo eliminated the concurrent update possibility, as skopeo design is very far from "embedded software" mindset, and the sdcard image size also increased (go runtime....)

MartinKolarik commented 7 months ago

Note: The change to skopeo eliminated the concurrent update possibility, as skopeo design is very far from "embedded software" mindset, and the sdcard image size also increased (go runtime....)

This part simply means the probe is offline while it's updating, or something else?

kernelgurumeditation commented 7 months ago

Note: The change to skopeo eliminated the concurrent update possibility, as skopeo design is very far from "embedded software" mindset, and the sdcard image size also increased (go runtime....)

This part simply means the probe is offline while it's updating, or something else?

This means that the tool downloads the layers to RAM before saving them to flash, forcing us to shut everything to have enough RAM. Also, because the tool was written in GO, that forces us to have the GO runtime in the sdcard image... It is not memory efficient and has a far from minimal footprint != Embedded Software Mindset...

jimaek commented 7 months ago

Does anyone know if there is a way to run this as a docker container itself for easier testing? e.g. ipv6 tests

kernelgurumeditation commented 7 months ago

Does anyone know if there is a way to run this as a docker container itself for easier testing? e.g. ipv6 tests Real tests need to be done on the hardware; running a container on a PC will not mimic the slow CPU or reduced RAM...

If the purpose is just to test IPV6, I don't expect the HW probe to introduce any issues; it's a standard kernel. So any test done with the container running on an x86 machine should mimic the hw probe ipv6 behavior