Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-8862

Issuing multiple attach-volume commands simultaneously can be problematic

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.5.0, 4.5.1, 4.5.2, 4.6.0
    • Fix Version/s: Future
    • Component/s: Management Server
    • Security Level: Public (Anyone can view this level - this is the default.)
    • Labels:
      None
    • Environment:
      N/A

      Description

      If a user submits two volumeAttach commands around the same time, the first one can succeed while the second one can fail and can lead CloudStack to ask the underlying storage plug-in to remove the volume from a given ACL (but the volume should be in the ACL because the first attachVolume command succeeded).

      A somewhat similar problem can happen if you submit the second attachVolume command to another VM in the same cluster.

      Proposed solution:

      A data volume should make use of a new column in the volumes table: attach_state (or some name like that).

      This column can have five possible values: null (for root disks), detached (default state for data volumes), attaching, attached, and detaching.

      When an attachVolume command is submitted, the volume should immediately be placed into the "attaching" state. If a transition to that state is not possible, an exception is thrown (for example, if you're already in the "attached" state, you can't transition to the "attaching" state).

      A similar kind of logic already exists for volume snapshots.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mike-tutkowski Mike Tutkowski
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: