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

Generic /cmd endpoint and dm specific operations (resize/resize-pool/trim-pool) #4202

Closed
wants to merge 6 commits into from

Commits on Jun 9, 2014

  1. engine: Make Engine threadsafe

    This allows registering handlers after you've started using the engine,
    as well as setting hack envs.
    
    Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
    alexlarsson committed Jun 9, 2014
    Configuration menu
    Copy the full SHA
    75cd7d4 View commit details
    Browse the repository at this point in the history
  2. Add generic /cmd entrypoint w/ cli support

    If you do
      docker devmapper:resize -o Key=Value -o Foo=Bar plugin:op arg1 arg2
    
    This will do a GET http request to /cmd/devmapper/resize with the
    arguments and options as keys. This will then try to spawn a job on
    the engine called "devmapper:resize" with the arg1, arg2, etc as
    arguments and the -o options as environment.
    
    Also, any graph driver implementing the engine.Installer interface
    will get installed on the engine when the daemon is created.
    
    This will be used by e.g. the devicemapper to allow driver-specific
    operations like pool resizing.
    
    Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
    alexlarsson committed Jun 9, 2014
    Configuration menu
    Copy the full SHA
    acff0a6 View commit details
    Browse the repository at this point in the history
  3. devicemapper: Add resize-pool operation

    This lets you live-resize the devicemapper loopback files for the pool.
    Use it like this:
     docker dm:resize-pool 140G
    
    Also, it changes the way pool sizes are reported to use the units.HumanSize
    call which uses base 1000, not 1024, to match the FromHumanSize call.
    
    Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
    alexlarsson committed Jun 9, 2014
    Configuration menu
    Copy the full SHA
    9f07075 View commit details
    Browse the repository at this point in the history
  4. devicemapper: Add docker driver resize operations

    This lets you resize individual images or containers like:
    
    docker dm:resize f4eff8c9f36d3114c3a16fc7b213512153a2d25caef6f11f385020e6558600f1 12G
    
    Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
    alexlarsson committed Jun 9, 2014
    Configuration menu
    Copy the full SHA
    6bee65e View commit details
    Browse the repository at this point in the history
  5. devicemapper: Split out BlockDeviceDiscard

    This adds a BlockDeviceDiscardAll which discards everything on the device,
    and makes BlockDeviceDiscard take offset and length arguments.
    
    Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
    alexlarsson committed Jun 9, 2014
    Configuration menu
    Copy the full SHA
    52301e7 View commit details
    Browse the repository at this point in the history
  6. devicemapper: Add dm:trim-pool command

    This command suspends the pool, extracts all metadata from the
    metadata pool and then manually discards all regions not in use on the
    data device. This will re-sparsify the underlying loopback file and
    regain space on the host operating system.
    
    This is required in some cases because the discards we do when
    deleting images and containers isn't enought to fully free all space
    unless you have a very new kernel.  See:
    moby#3182 (comment)
    
    Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
    
    Conflicts:
    	daemon/graphdriver/devmapper/driver.go
    alexlarsson committed Jun 9, 2014
    Configuration menu
    Copy the full SHA
    5138264 View commit details
    Browse the repository at this point in the history