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

Relative volume path in Kube yaml is not resolved #3029

Closed
Fodoj opened this issue Apr 27, 2019 · 9 comments
Closed

Relative volume path in Kube yaml is not resolved #3029

Fodoj opened this issue Apr 27, 2019 · 9 comments
Assignees
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@Fodoj
Copy link
Contributor

Fodoj commented Apr 27, 2019

For example:

  volumes:
    - name: app
      hostPath:
        path: ./
        type: Directory

Will result in volume simply ignored. Podman 1.3.0-dev, Fedora Workstation 29.

@haircommander haircommander self-assigned this Apr 29, 2019
@haircommander
Copy link
Collaborator

@Fodoj just to make sure, are you expecting the path to be based on the kube yaml location?

@Fodoj
Copy link
Contributor Author

Fodoj commented May 6, 2019

Good question... I think that would make more sense than relative to where podman runs from, but no idea what's the way to go, really

@haircommander
Copy link
Collaborator

podman --mount type=bind,src=./,target=/tmp -ti alpine ls /tmp
actually mounts based on the rundir. I'd likely want to line up functionality with that, as that's the equivalent from the podman CLI. WDYT @Fodoj
(cc: @mheon because you just did some mount reworking and may have something to say here)

@mheon
Copy link
Member

mheon commented May 6, 2019

Relative mounts working right now are honestly more of an accident than anything. I don't think we consider them supported, so if we want to change where they're relative to (such that they make more sense), I'd be fine with that. Directory Podman is being run from would seem to make the most sense to me.

(We'll probably have to resolve the relative paths before we pass them into Libpod to do this, but that's not a particularly big deal now that we have a common path for all mounts code)

@baude
Copy link
Member

baude commented Aug 2, 2019

where do we stand

@haircommander
Copy link
Collaborator

@QiWang19 I seem to remember you doing work with resolving relative paths, is that the case?

@QiWang19
Copy link
Contributor

QiWang19 commented Aug 2, 2019

I have this PR #3537 to convert the src path to absolute path

@haircommander
Copy link
Collaborator

I can confirm #3537 fixed this! thanks @QiWang19

@majidaldo
Copy link

majidaldo commented May 13, 2023

this doesn't work on windows (from the outside). it does work if i use podman inside podman-machine-default inside wsl (which by default mounts the current dir).

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Aug 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

6 participants