Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conn_sock: fix path opening #228

Merged
merged 1 commit into from
Jan 14, 2021
Merged

Conversation

haircommander
Copy link
Collaborator

I must admit I didn't test correctly, and there were two regressions with the previous commit on conn_sock.
1: sock_fullpath doesn't exist at the time that we need to copy its location into sun_path. As such, we need to use the proc entry of the parent dir, and use that as the parent path.
2: we do need the symlink to the bundle_path, as that's where the attach file actually lives.

Signed-off-by: Peter Hunt pehunt@redhat.com

src/conn_sock.c Outdated Show resolved Hide resolved
I must admit I didn't test correctly, and there were two regressions with the previous commit on conn_sock.
1: sock_fullpath doesn't exist at the time that we need to copy its location into sun_path. As such, we need to use the proc entry of the parent dir, and use that as the parent path.
2: we do need the symlink to the bundle_path, as that's where the attach file actually lives.

In addition, this commit makes specifying `--full-attach` ignore users specifying `--socket-path-dir`.
Instead of conmon creating a symlink between `socket_path/$container_id` and `bundle_path`, it now uses `bundle_path` directly.

This means callers to conmon must not rely on attach sockets being in their previously specified `socket_path` but rather in the container's `bundle_path`

Signed-off-by: Peter Hunt <pehunt@redhat.com>
Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@haircommander
Copy link
Collaborator Author

@rhatdan @mheon @saschagrunert PTAL (I packaged a totally broken conmon and it's on it's way to fedora now 🙃 this PR fixes it)

@rhatdan
Copy link
Member

rhatdan commented Jan 14, 2021

LGTM

@rhatdan rhatdan merged commit c71b7fe into containers:master Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants