Skip to content

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

@hawkw

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

Metadata

Metadata

Assignees

Labels

databaseRelated to database accessnexusRelated to nexus

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions