Skip to content

rootio action will panic if MIRROR_HOST is set incorrectly #130

@agruetz

Description

@agruetz

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)

  1. Set incorrect MIRROR_HOST in template file when using the rootio action
  2. PXE boot physical device
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions