LXC: Cannot create a container with the specific alias "tasks"

Bug #1591124 reported by Simos Xenitellis 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

When trying to launch a container with the specific alias "tasks", it fails to launch.

$ lxc launch d23ee1f4fd28 tasks
Creating tasks
Starting tasks
error: Error calling 'lxd forkstart tasks /var/lib/lxd/containers /var/log/lxd/tasks/lxc.conf': err='exit status 1'
Try `lxc info --show-log tasks` for more info
Exit 1

The reason is that in /sys/fs/cgroup/systemd/lxc/ there is already a file called "tasks". In that directory, any new containers is created as a new directory that has as a name the alias that we have given.
Since "tasks" is reserved", lxc fails to continue.

Here are the contents of the directory
$ ls -l /sys/fs/cgroup/systemd/lxc/
total 0
drwxrwxr-x 5 root 165536 0 Ιούν 10 12:32 c1
-rw-r--r-- 1 root root 0 Ιούν 10 12:53 cgroup.clone_children
-rw-r--r-- 1 root root 0 Ιούν 10 12:53 cgroup.procs
-rw-r--r-- 1 root root 0 Ιούν 10 12:53 notify_on_release
-rw-r--r-- 1 root root 0 Ιούν 10 12:53 tasks

Currently, there is potential conflict with "tasks" only as the other filenames are invalid hostnames (contain dots or underscores).
Presumably in the future there might be more such files.

Among the solutions,
1. the container directories in /sys/fs/cgroup/systemd/lxc/ should have something like ".lxd" appended to them so that there is no future conflict.

description: updated
description: updated
affects: open-iscsi (Ubuntu) → lxd (Ubuntu)
Revision history for this message
Stéphane Graber (stgraber) wrote :

Moving this one over to the lxc package.

https://github.com/lxc/lxc/issues/1046 upstream.

affects: lxd (Ubuntu) → lxc (Ubuntu)
Changed in lxc (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in lxc (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.