darch
darch copied to clipboard
Add the ability to sort stages by age
I renamed the darch grub config to /etc/grub.d/05_darch so it would appear on the top of the list in grub.
I however tag my images by the build number (imagename:v10, imagename:v11, ...) so staging a new one will make it appear in grub after the old one as it's sorted alphabetically.
It would be nice to be able to sort them by age in grub menu so an unattended reboot will boot the newest stage.
Maybe a /etc/darch/config.toml to configure how the darch command runs (particularly when invoked by grub)? I've been meaning to add a /etc/darch/config.toml for other reasons as well (like the location of the containerd socket, etc).
Sounds good to me.
For my use case a reverse alphabetical order would work fine (with the exception of going from v99 to v100) but having more options might be useful.
But as far as I can tell darch doesn't save the stage time anywhere so that would need to be implemented first, right?
But as far as I can tell darch doesn't save the stage time anywhere so that would need to be implemented first, right?
Correct.
Can you think of an obvious place to put it? image.json doesn't seem like it.
Question, if you tag an existing staged image, would you expect the date to stay the same?
Maybe get the date modified/created of the folder for the staged item?
Question, if you tag an existing staged image, would you expect the date to stay the same?
I would expect it to be when you actually ran darch stage upload I think.
Maybe get the date modified/created of the folder for the staged item?
I think that's a good plan! 👍
@pauldotknopf Is there any work being done on implementing /etc/darch/config.toml?
Also, making it easier (possible?) to tweak /etc defaults/grub which would allow an unnatended reboot to the same image name - obviously @arnarg that's not exactly your use case, but it's a similar concept.