k3s/cmd/kubeadm
Kubernetes Submit Queue 53b27ef14e Merge pull request #36474 from bruceauyeung/branch-failure-check-on-umount-when-kubeadm-reset
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: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-12-02 05:45:03 -08:00
..
app Merge pull request #36474 from bruceauyeung/branch-failure-check-on-umount-when-kubeadm-reset 2016-12-02 05:45:03 -08:00
test Adding CLI tests for kubeadm. 2016-10-31 11:12:51 -07:00
BUILD autogenerated 2016-10-21 17:32:32 -07:00
OWNERS kubeadm: add OWNERS file 2016-09-28 13:52:27 -07:00
kubeadm.go kubeadm implement preflight checks 2016-10-13 10:09:36 -03:00