monogon-dev / monogon

The Monogon Monorepo. May contain traces of peanuts and a ✨pure Go Linux userland✨. Work in progress!
https://monogon.tech
Apache License 2.0
378 stars 8 forks source link

metroctl: node update all panics #290

Closed fionera closed 4 months ago

fionera commented 4 months ago

After updating one node is crashes:

panic: runtime error: index out of range [0] with length 0

goroutine 45 [running]:
main.glob..func4.1(0xc0001fcb80)
        metropolis/cli/metroctl/cmd_node.go:182 +0xb15
created by main.glob..func4 in goroutine 1
        metropolis/cli/metroctl/cmd_node.go:152 +0x739
lorenz commented 4 months ago

Happens because the check that there are nodes logs the issue, but does not actually skip over the code which uses the node. I'll fix it.

lorenz commented 4 months ago

https://review.monogon.dev/c/monogon/+/2834