-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
templates/lxc-local.in
Outdated
[ "$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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added relevant_file
function.
templates/lxc-local.in
Outdated
[ -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. |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
454b7c1
to
028df81
Compare
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Closes lxc#2184. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
028df81
to
35444f3
Compare
Closes #2184.
Signed-off-by: Christian Brauner christian.brauner@ubuntu.com