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

Allow passing sub-directories of custom volumes #993

Closed
stgraber opened this issue Jul 13, 2024 · 0 comments · Fixed by #1092
Closed

Allow passing sub-directories of custom volumes #993

stgraber opened this issue Jul 13, 2024 · 0 comments · Fixed by #1092
Assignees
Labels
Feature New feature, not a bug
Milestone

Comments

@stgraber
Copy link
Member

Something that'd be particularly useful now that we support application containers is to be able to pass in a specific directory from within a custom volume as a disk for a container.

This would then allow creating a single custom volume that holds the configuration/data of multiple application containers. The whole volume can then be passed to a system container so that configuration/backups/whatever can be performed from there.

@stgraber stgraber added the Feature New feature, not a bug label Jul 13, 2024
@stgraber stgraber added this to the incus-6.4 milestone Jul 13, 2024
@stgraber stgraber self-assigned this Jul 13, 2024
stgraber added a commit to stgraber/incus that referenced this issue Aug 8, 2024
stgraber added a commit to stgraber/incus that referenced this issue Aug 8, 2024
The general logic is pretty straightforward, we allow the `source`
property to include both the volume name and then a relative path to
that volume.

The tricky part is to do this safely as the user will be in control of
the volume and so can create dangerous symlinks in there, trying to
trick us into reading data from the host.

Carefuly use of Openat2 allows us to restrict resolution in a race-free way.

Closes lxc#993

Signed-off-by: Stéphane Graber <[email protected]>
@hallyn hallyn closed this as completed in a6303d7 Aug 8, 2024
stgraber added a commit that referenced this issue Aug 8, 2024
The general logic is pretty straightforward, we allow the `source`
property to include both the volume name and then a relative path to
that volume.

The tricky part is to do this safely as the user will be in control of
the volume and so can create dangerous symlinks in there, trying to
trick us into reading data from the host.

Carefuly use of Openat2 allows us to restrict resolution in a race-free way.

Closes #993

Signed-off-by: Stéphane Graber <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature, not a bug
Development

Successfully merging a pull request may close this issue.

1 participant