• k8s-merge-robot's avatar
    Merge pull request #29246 from Random-Liu/fix-image-remove-bug · e2a697db
    k8s-merge-robot authored
    Automatic merge from submit-queue
    
    Kubelet: Set PruneChildren when removing image.
    
    This is a bug introduced during switching to engine-api. https://github.com/kubernetes/kubernetes/issues/23563.
    
    When removing image, there is an option `noprune`:
    ```
    If prune is true, ancestor images will each attempt to be deleted quietly.
    ```
    
    In go-dockerclient, the default value of the option is ["noprune=false"](https://github.com/fsouza/go-dockerclient/blob/master/image.go#L171), which means that ancestor images should be also removed. This is the expected behaviour.
    
    However in engine-api, the option is changed to `PruneChildren`, and the default value is `PruneChildren=false`, which means that ancestor images won't be removed.
    This makes `ImageRemove` only remove the first layer of the image, which causes the image garbage collection not working as expected.
    
    This should be fixed in 1.3.
    And thanks to @ronnielai for finding the bug! :)
    
    /cc @kubernetes/sig-node 
    e2a697db
Name
Last commit
Last update
.github Loading commit data...
Godeps Loading commit data...
api/swagger-spec Loading commit data...
build Loading commit data...
cluster Loading commit data...
cmd Loading commit data...
contrib Loading commit data...
docs Loading commit data...
examples Loading commit data...
federation Loading commit data...
hack Loading commit data...
hooks Loading commit data...
logo Loading commit data...
pkg Loading commit data...
plugin Loading commit data...
release Loading commit data...
test Loading commit data...
third_party Loading commit data...
vendor Loading commit data...
www Loading commit data...
.generated_docs Loading commit data...
.gitignore Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIB.md Loading commit data...
CONTRIBUTING.md Loading commit data...
DESIGN.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
Makefile.generated_files Loading commit data...
README.md Loading commit data...
Vagrantfile Loading commit data...
code-of-conduct.md Loading commit data...