Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libct/cg/OpenFile: check cgroupFd on error
opencontainers/runc issue 3026 describes a scenario in which OpenFile failed to open a legitimate existing cgroupfs file. Added debug (similar to what this commit does) shown that cgroupFd is no longer opened to "/sys/fs/cgroup", but to "/" (it's not clear what caused it, and the source code is not available, but it might be caused by using the same process on the both sides of the container boundary). Consider such use incorrect, but give a helpful hint as two what is going on by enriching the Path component of the error with the fd information. NB: this can potentially be fixed by reopening the cgroupFd once we detected that it's screwed, and retrying openat2. Alas I do not have a test case for this, so left this as a TODO suggestion. Signed-off-by: Kir Kolyshkin <[email protected]>
- Loading branch information