Merge pull request #2771 from fengwang666/debug-pid

runtime: update sandbox root dir cleanup behavior in rootless hypervisor
This commit is contained in:
James O. D. Hunt
2021-10-18 17:47:47 +01:00
committed by GitHub
3 changed files with 19 additions and 21 deletions

View File

@@ -1016,12 +1016,6 @@ func (q *qemu) cleanupVM() error {
}
if rootless.IsRootless() {
rootlessDir := os.Getenv("XDG_RUNTIME_DIR")
if err := os.RemoveAll(rootlessDir); err != nil {
q.Logger().WithError(err).WithField("root-path", rootlessDir).
Warnf("failed to remove vm run-as-user root path")
}
u, err := user.LookupId(strconv.Itoa(int(q.config.Uid)))
if err != nil {
q.Logger().WithError(err).WithField("uid", q.config.Uid).Warn("failed to find the user")