-
Notifications
You must be signed in to change notification settings - Fork 62
Description
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'.