Skip to content

gimlet-seq-server: Allow A0 -> A0 and A2 -> A2 transitions #1466

@jgallagher

Description

@jgallagher

Currently, gimlet-seq-server's set_state_internal only allows A0 -> A2 and A2 -> A0 transitions; any other request results in Err(SeqError::IllegalTransition). This has ramifications for wicket doing updates: it wants to send sleds to A2, but if the sled is already in A2, that request fails. Wicket could ask the current state of the sled before sending the command to go to A2, but that introduces a (small) race window similar to a TOCTOU error. If we instead change gimlet-seq-server to allow A0 -> A0 and A2 -> A2 (which would do nothing except return Ok), that would allow wicket to always request the sled move to A2 regardless of its current state.

Would fix oxidecomputer/omicron#3644.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions