darch icon indicating copy to clipboard operation
darch copied to clipboard

Add the ability to sort stages by age

Open arnarg opened this issue 6 years ago • 9 comments

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.

arnarg avatar Feb 25 '19 19:02 arnarg

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).

pauldotknopf avatar Feb 25 '19 19:02 pauldotknopf

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?

arnarg avatar Feb 25 '19 19:02 arnarg

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.

pauldotknopf avatar Feb 25 '19 19:02 pauldotknopf

Can you think of an obvious place to put it? image.json doesn't seem like it.

arnarg avatar Feb 25 '19 19:02 arnarg

Question, if you tag an existing staged image, would you expect the date to stay the same?

pauldotknopf avatar Feb 25 '19 19:02 pauldotknopf

Maybe get the date modified/created of the folder for the staged item?

pauldotknopf avatar Feb 25 '19 19:02 pauldotknopf

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! 👍

arnarg avatar Feb 25 '19 19:02 arnarg

@pauldotknopf Is there any work being done on implementing /etc/darch/config.toml?

arnarg avatar May 05 '19 13:05 arnarg

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.

phunni avatar Dec 18 '19 15:12 phunni