• Kubernetes Submit Queue's avatar
    Merge pull request #36474 from bruceauyeung/branch-failure-check-on-umount-when-kubeadm-reset · 53b27ef1
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    add failure check on umount when kubeadm reset, and on service stop
    
    **What this PR does / why we need it**:
    before this PR, `umount` will exit with code `123` if `grep` does not match anything
    `xargs` has an option:
    
    >-r, --no-run-if-empty
                  If the standard input does not contain any nonblanks, do not run the command.  Normally, the command is run  once  even  if
                  there is no input.  This option is a GNU extension.
    
    
    1. this PR add `-r` option to `xargs` , so `umount` will not execute and exit with code `0` correctly while `grep` does not match anything.
    2. this PR add failure check on umount. for example, if the directory to be umount is busy, a error message will be printed:
    >failed to unmount directories in /var/lib/kubelet, umount: /var/lib/kubelet/foo/bar: target is busy
            (In some cases useful info about processes that
             use the device is found by lsof(8) or fuser(1).)
    
    3. add failure check on kubelet service stop.
    Signed-off-by: 's avatarbruceauyeung <ouyang.qinhua@zte.com.cn>
    53b27ef1
Name
Last commit
Last update
..
clicheck Loading commit data...
gendocs Loading commit data...
genkubedocs Loading commit data...
genman Loading commit data...
genswaggertypedocs Loading commit data...
genutils Loading commit data...
genyaml Loading commit data...
hyperkube Loading commit data...
kube-apiserver Loading commit data...
kube-controller-manager Loading commit data...
kube-discovery Loading commit data...
kube-dns Loading commit data...
kube-proxy Loading commit data...
kubeadm Loading commit data...
kubectl Loading commit data...
kubelet Loading commit data...
kubemark Loading commit data...
kubernetes-discovery Loading commit data...
libs/go2idl Loading commit data...
linkcheck Loading commit data...
mungedocs Loading commit data...
OWNERS Loading commit data...