rootio action will panic if MIRROR_HOST is set incorrectly
agruetz opened this issue · comments
If you set an invalid/non-existant metadata server for the MIRROR_HOST env the rootio action will throw a nil pointer error.
Expected Behaviour
The rootio action should gracefully handle an incorrectly set MIRROR_HOST or if the metadata service does not respond with all the correct informaiton.
Current Behaviour
panic at line 48 of rootio/cmd/rootio.go
Possible Solution
Better error handling an nil pointer checking before usage of metadata.Instance.Storage.Disks on line 48.
Steps to Reproduce (for bugs)
- Set incorrect MIRROR_HOST in template file when using the rootio action
- PXE boot physical device
- docker logs tink-worker --follow
Context
The issue is minor and using the correct MIRROR_HOST for the metadata service works as expected. It did cause confusion and debug time as it is not clear what MIRROR_HOST was used for and what was causing the panic.
Your Environment
Physical Intel NUC 11's with a Ubiquiti Router.
Thanks, @agruetz. We'll take a look.