Skip to content

fix link resolution for mounted volume on macos#1291

Open
aholthagerty wants to merge 2 commits intocontainers:mainfrom
aholthagerty:fix/issue_1290
Open

fix link resolution for mounted volume on macos#1291
aholthagerty wants to merge 2 commits intocontainers:mainfrom
aholthagerty:fix/issue_1290

Conversation

@aholthagerty
Copy link
Copy Markdown

updated call to os.path.realpath inside assert_volumes to be os.path.abspath

Fixes #1290

Contributor Checklist:

If this PR adds a new feature that improves compatibility with docker-compose, please add a link
to the exact part of compose spec that the PR touches.

For any user-visible change please add a release note to newsfragments directory, e.g.
newsfragments/my_feature.feature. See newsfragments/README.md for more details.

All changes require additional unit tests.

updated call to os.path.realpath inside assert_volumes to be os.path.abspath

Fixes containers#1290

Signed-off-by: Alan Holt <aholt@hagerty.com>
@p12tic
Copy link
Copy Markdown
Collaborator

p12tic commented Aug 21, 2025

Looks good. Would it be possible to write an integration test for this?

Signed-off-by: Alan Holt <aholt@hagerty.com>
@aholthagerty
Copy link
Copy Markdown
Author

Looks good. Would it be possible to write an integration test for this?

Added!

@aholthagerty
Copy link
Copy Markdown
Author

Anything that needs to be done to get this merged?

I have other team mates that have been affected by this bug.

@uncoder
Copy link
Copy Markdown

uncoder commented Sep 26, 2025

I'm also affected, looking forward to this being merged.

@aholthagerty
Copy link
Copy Markdown
Author

Pinging again. This bug still affects us, and this PR would fix it.

@rpopovici
Copy link
Copy Markdown

Why is this not merged already?

@aholthagerty
Copy link
Copy Markdown
Author

This has been open for almost 3 months now. is there anything needed on this? Or, what is the reason for the hold-up on merging?

@aholthagerty
Copy link
Copy Markdown
Author

Going to just start commenting every week until I get some feedback or it gets merged.

@etluchs
Copy link
Copy Markdown

etluchs commented Dec 1, 2025

yep, I understand that it sucks being nagged. But we'd really appreciate that fix being applied ...

@aholthagerty
Copy link
Copy Markdown
Author

Ping.

@aholthagerty
Copy link
Copy Markdown
Author

Ping

@aholthagerty
Copy link
Copy Markdown
Author

ping

1 similar comment
@aholthagerty
Copy link
Copy Markdown
Author

ping

@aholthagerty
Copy link
Copy Markdown
Author

@p12tic is there anything I can do to help move this along and get it merged?

@aholthagerty
Copy link
Copy Markdown
Author

@mokibit maybe you'll know more about what is keeping this from being merged. I see you are a recent contributor.

Copy link
Copy Markdown
Collaborator

@p12tic p12tic left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request.

Sorry for the delay, it took so long because I did not have access to a mac. Now I do.

Best would be to setup macos unit tests, but this is separate.

Please add release note in newsfragments directory. Also I had several comments in the code.

services:
web:
image: nopush/podman-compose-test
command: ["dumb-init", "/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8000"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"echo", "hello" is enough. We don't actually end up testing httpd and it's fine if container shuts down after the test. Remove restart: always and other similar things that aren't really needed.

@@ -0,0 +1,4 @@
```
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove - not needed. Integration tests are to be run through pytest/unittest.


class TestPodmanCompose(unittest.TestCase, RunSubprocessMixin):
def test_with_docker_sock(self) -> None:
up_cmd = [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

inline into run_subprocess_assert_returncode command, same with down_cmd

self.run_subprocess_assert_returncode(up_cmd)

finally:
out, _, return_code = self.run_subprocess(down_cmd)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

run_subprocess_assert_returncode should be better in this case

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.

volume utilizing /var/run/docker.sock is improperly resolved using realpath, resulting in errors on MacOS

5 participants