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: node unmount from the client before unpublish RPC #11892

Merged
merged 2 commits into from
Jan 28, 2022

Commits on Jan 27, 2022

  1. csi: node unmount from the client before unpublish RPC

    When an allocation stops, the `csi_hook` makes an unpublish RPC to the
    servers to unpublish via the CSI RPCs: first to the node plugins and
    then the controller plugins. The controller RPCs must happen after the
    node RPCs so that the node has had a chance to unmount the volume
    before the controller tries to detach the associated device.
    
    But the client has local access to the node plugins and can
    independently determine if it's safe to send unpublish RPC to those
    plugins. This will allow the server to treat the node plugin as
    abandoned if a client is disconnected and `stop_on_client_disconnect`
    is set. This will let the server try to send unpublish RPCs to the
    controller plugins, under the assumption that the client will be
    trying to unmount the volume on its end first.
    tgross committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    2a99584 View commit details
    Browse the repository at this point in the history
  2. [squash me] address comments from code review

    The CSI `NodeUnpublishVolume`/`NodeUnstageVolume` RPCs can return
    ignorable errors in the case where the volume has already been
    unmounted from the node. Handle all other errors by retrying until we
    get success so as to give operators the opportunity to reschedule a
    failed node plugin (ex. in the case where they accidentally drained a
    node without `-ignore-system`). Fan-out the work for each volume into
    its own goroutine so that we can release a subset of volumes if only
    one is stuck.
    tgross committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    3b7dedb View commit details
    Browse the repository at this point in the history