• Jing Xu's avatar
    This change supports robust kubelet volume cleanup · f19a1148
    Jing Xu authored
    Currently kubelet volume management works on the concept of desired
    and actual world of states. The volume manager periodically compares the
    two worlds and perform volume mount/unmount and/or attach/detach
    operations. When kubelet restarts, the cache of those two worlds are
    gone. Although desired world can be recovered through apiserver, actual
    world can not be recovered which may cause some volumes cannot be cleaned
    up if their information is deleted by apiserver. This change adds the
    reconstruction of the actual world by reading the pod directories from
    disk. The reconstructed volume information is added to both desired
    world and actual world if it cannot be found in either world. The rest
    logic would be as same as before, desired world populator may clean up
    the volume entry if it is no longer in apiserver, and then volume
    manager should invoke unmount to clean it up.
    f19a1148
fake.go 3.96 KB