Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool/lint
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ for d in $(find . -type d -not -iwholename '*.git*' -a -not -iname '.tool' -a -n
--cyclo-over=60 \
--dupl-threshold=100 \
--tests \
--deadline=30s "${d}"
--deadline=60s "${d}"
done
1 change: 1 addition & 0 deletions server/sandbox_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest
return nil, err
}
g.SetProcessSelinuxLabel(processLabel)
g.SetLinuxMountLabel(mountLabel)
}

// create shm mount for the pod containers.
Expand Down
6 changes: 2 additions & 4 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,8 @@ func RunUnderSystemdScope(pid int, slice string, unitName string) error {
properties = append(properties, newProp("PIDs", []uint32{uint32(pid)}))
properties = append(properties, newProp("Delegate", true))
properties = append(properties, newProp("DefaultDependencies", false))
if _, err := conn.StartTransientUnit(unitName, "replace", properties, nil); err != nil {
return err
}
return nil
_, err = conn.StartTransientUnit(unitName, "replace", properties, nil)
return err
}

func newProp(name string, units interface{}) systemdDbus.Property {
Expand Down