Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSI: failed allocation should not block its own controller unpublish #14484

Merged
merged 4 commits into from
Sep 8, 2022

Commits on Sep 7, 2022

  1. csi: fix missing copies in volume unpublish workflow

    Entities we get from the state store should always be copied before
    altering. Ensure that we copy the volume in the top-level unpublish workflow
    before handing off to the steps.
    tgross committed Sep 7, 2022
    Configuration menu
    Copy the full SHA
    16cfd8e View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2022

  1. csi: fix unpopulated fields in List Volumes API

    The list stub object for volumes in `nomad/structs` did not match the stub
    object in `api`. The `api` package also did not include the current
    readers/writers fields that are expected by the UI. True up the two objects and
    add the previously undocumented fields to the docs.
    tgross committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    25e2302 View commit details
    Browse the repository at this point in the history
  2. CSI: allocation should not block its own controller unpublish

    Nomad user reported problems with CSI volumes associated with failed
    allocations, where the Nomad server did not send a controller unpublish RPC.
    
    The controller unpublish is skipped if other non-terminal allocations on the
    same node claim the volume. The check has a bug where the allocation belonging
    to the claim being freed was included in the check incorrectly. During a normal
    allocation stop for job stop or a new version of the job, the allocation is
    terminal. But allocations that fail are not yet marked terminal at the point in
    time when the client sends the unpublish RPC to the server.
    
    For CSI plugins that support controller attach/detach, this means that the
    controller will not be able to detach the volume from the allocation's host and
    the replacement claim will fail until a GC is run. This changeset fixes the
    conditional so that the claim's own allocation is not included, and makes the
    logic easier to read. Include a test case covering this path.
    tgross committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    2dc870c View commit details
    Browse the repository at this point in the history
  3. changelog entry

    tgross committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    1038b68 View commit details
    Browse the repository at this point in the history