• 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
..
admission Loading commit data...
api Loading commit data...
apimachinery Loading commit data...
apis Loading commit data...
apiserver Loading commit data...
auth Loading commit data...
capabilities Loading commit data...
client Loading commit data...
cloudprovider Loading commit data...
controller Loading commit data...
conversion Loading commit data...
credentialprovider Loading commit data...
dns Loading commit data...
fieldpath Loading commit data...
fields Loading commit data...
genericapiserver Loading commit data...
healthz Loading commit data...
httplog Loading commit data...
hyperkube Loading commit data...
kubectl Loading commit data...
kubelet Loading commit data...
kubemark Loading commit data...
labels Loading commit data...
master Loading commit data...
metrics Loading commit data...
probe Loading commit data...
proxy Loading commit data...
quota Loading commit data...
registry Loading commit data...
runtime Loading commit data...
security Loading commit data...
securitycontext Loading commit data...
serviceaccount Loading commit data...
ssh Loading commit data...
storage Loading commit data...
types Loading commit data...
ui Loading commit data...
util Loading commit data...
version Loading commit data...
volume Loading commit data...
watch Loading commit data...
OWNERS Loading commit data...