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

Change docker volume create to non-idempotent #27675

Commits on Jun 28, 2017

  1. Change docker volume create to non-idempotent

    This fix tries to address the issue raised in 16068 where
    non-idempotency is desired for `docker volume create`.
    
    Previously `docker volume create` will silently ignore in case
    a volume with the same name has already been created with the
    same driver (idempotency). This fix made the change so that
    an `already exist` error is returned together with the already
    created volume `v` in `Create/CreateWithRef` func.
    
    The change is to add functional options to `Create` so that
    caller has the option to return error if a volume has been
    found.
    
    Tests has been added to cover the chagnes.
    
    This fix fixes 16068.
    
    Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
    yongtang committed Jun 28, 2017
    Copy the full SHA
    9b737d4 View commit details
    Browse the repository at this point in the history
  2. Only return an error if options are different for docker volume create

    This commit is an update of the last commit such that an error is only returned
    if options are different for `docker volume create`.
    
    The change is based on the feedback:
    moby#27675 (comment)
    
    Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
    yongtang committed Jun 28, 2017
    Copy the full SHA
    b79b9f5 View commit details
    Browse the repository at this point in the history
  3. Move found to checkConflict

    Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
    yongtang committed Jun 28, 2017
    Copy the full SHA
    8c668b2 View commit details
    Browse the repository at this point in the history