Skip to content

instance.boot_on_fault column probably ought to become an enum #6490

Closed

Description

@hawkw

Currently, the instance table has a boot_on_fault column, which is a bool. This is intended to indicate whether an instance should be automatically restarted in response to failures, although currently, it isn't actually consumed by anything. However, as determined in RFD 486, Nexus will eventually grow functionality for automatically restarting instances that have transitioned to the Failed state, if boot_on_fault is set.

@gjcolombo suggests that this field should probably be replaced with an enum, rather than a bool. This way, we could represent more boot-on-fault disciplines than "always reboot on faults" and "never do that". Since nothing is currently consuming this field, it's probably a good idea to go ahead and do the requisite SQL surgery to turn it into an enum now, before we write code that actually consumes it. For now, we could do a migration to an enum like:

CREATE TYPE IF NOT EXISTS omicron.public.boot_on_fault_discipline AS ENUM (
    'always',
    'never'
);

and turn all existing trues into 'always' and falsees into 'never'.

Activity

  1. added
    database
    nexus
    on Aug 30, 2024
  2. self-assigned this
    on Aug 30, 2024
  3. added a commit that references this issue on Sep 4, 2024
    aca08df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

databasenexus

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions