Skip to content

Disk Attach has some race conditions #1073

Closed
@smklein

Description

@smklein

Following-up on @plotnick 's comment here, I think there may be some deeper issues with disk attaching / detaching.

Background

The following steps attempt to roughly map out the disk attach process:

Issues

  • Between (2) and (3), other disks may be concurrently attached, bypassing the check. This is a TOCTTOU.
  • Between (4) and (6a-1), the disk state may be modified before the sled agent request is made. This could result in the sled agent attaching a disk that has been deleted or attached to a different instance.
  • Between (5) and (6), the instance state may be modified. The instance has a "state_generation" value for optimistic concurrency control, but it is not being checked / modified here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't working.nexusRelated to nexus

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions