Andrey Smirnov f18b5737d8 fix: ignore EINVAL on unmounting when mount point isn't mounted
This fixes reboot errors like:

```
[    8.963544] [talos] [phase]: unmount system disk submounts error running task: unmount: 1 error(s) occurred:
[    8.964428] 	invalid argument
[    8.964711] [talos] [phase]: unmount system disk submounts done, 1.836089ms
[    8.965354] [talos] error running phase "unmount system disk submounts": 1 error occurred:
[    8.966077] 	* unmount: 1 error(s) occurred:
[    8.966469] 	invalid argument
[    8.966765]
[    8.966919]
[    8.967102] [talos] recovered from: shutdown failed: error running phase "unmount system disk submounts": 1 error occurred:
[    8.968119] 	* unmount: 1 error(s) occurred:
[    8.968530] 	invalid argument
[    8.968815]
[    8.968966]
[    8.969177] [talos] rebooting in 10 seconds
```

Fixing this on the safe side: unmount is always performed, and `EINVAL`
is ignored only if mountpoint is not in `/proc/mounts`/

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-03-27 15:41:06 -07:00
..