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

templates: add lxc-local template #2190

Merged
merged 2 commits into from
Feb 26, 2018

Conversation

brauner
Copy link
Member

@brauner brauner commented Feb 26, 2018

Closes #2184.

Signed-off-by: Christian Brauner christian.brauner@ubuntu.com

[ "$arg" = "--" ] && break
if [ "$arg" = "--mapped-uid" ] || [ "$arg" = "--mapped-gid" ]; then
echo "This template can't be used for unprivileged containers." 1>&2
echo "You may want to try the \"download\" template instead." 1>&2
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, why? We're only unpacking tarballs, which should be fine unprivileged.

Copy link
Member Author

Choose a reason for hiding this comment

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

lxc-usernsexec currently unpacks in a new user namespace. Do we care about device nodes not being created?

Copy link
Member

Choose a reason for hiding this comment

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

Nope, we don't and we in fact have logic in the download template specifically for this. There's a file in the metadata tarball which lists all the device nodes, those can then be excluded when unpacking the tarball.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added relevant_file function.

[ -h | --help ]: Print this help message and exit.
[ -l | --list ]: List all available images and exit.
[ -c | --config ]: List all available images and exit.
[ -f | --fstree ]: List all available images and exit.
Copy link
Member

Choose a reason for hiding this comment

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

Wrong help for these two :)

Copy link
Member

Choose a reason for hiding this comment

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

Also maybe use metadata instead of config? since it's a tarball that includes more than just the config.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@brauner brauner force-pushed the 2018-02-16/lxc_local_template branch from 454b7c1 to 028df81 Compare February 26, 2018 15:42
Christian Brauner added 2 commits February 26, 2018 17:04
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Closes lxc#2184.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
@brauner brauner force-pushed the 2018-02-16/lxc_local_template branch from 028df81 to 35444f3 Compare February 26, 2018 16:22
@stgraber stgraber merged commit 378ad0a into lxc:master Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants