virt: the pidns controller does not exist anymore
This commit is contained in:
parent
67aa455172
commit
fb0864e7b9
8
TODO
8
TODO
|
@ -18,6 +18,14 @@ Bugfixes:
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
||||||
|
* Add ConditionReadWriteFileSystem= so that systemd-sysctl doesn't get executed when /proc/sys is read-only
|
||||||
|
|
||||||
|
* unset container= and container_uuid= for child processes
|
||||||
|
|
||||||
|
* when bind mounting /etc/machine-id, do so from /run/machine-id
|
||||||
|
|
||||||
|
* introduce mix of BindTo and Requisite
|
||||||
|
|
||||||
* journalctl: show multiline log messages sanely, expand tabs, and show all valid utf8 messages
|
* journalctl: show multiline log messages sanely, expand tabs, and show all valid utf8 messages
|
||||||
|
|
||||||
* introduce NeedsMounts= or so to create .mount dependencies automatically for a specific path
|
* introduce NeedsMounts= or so to create .mount dependencies automatically for a specific path
|
||||||
|
|
|
@ -780,8 +780,7 @@
|
||||||
<varname>openvz</varname>,
|
<varname>openvz</varname>,
|
||||||
<varname>lxc</varname>,
|
<varname>lxc</varname>,
|
||||||
<varname>lxc-libvirt</varname>,
|
<varname>lxc-libvirt</varname>,
|
||||||
<varname>systemd-nspawn</varname>,
|
<varname>systemd-nspawn</varname> to test
|
||||||
<varname>pidns</varname> to test
|
|
||||||
against a specific implementation. If
|
against a specific implementation. If
|
||||||
multiple virtualization technologies
|
multiple virtualization technologies
|
||||||
are nested only the innermost is
|
are nested only the innermost is
|
||||||
|
|
29
src/virt.c
29
src/virt.c
|
@ -236,35 +236,6 @@ int detect_container(const char **id) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
f = fopen("/proc/self/cgroup", "re");
|
|
||||||
if (f) {
|
|
||||||
|
|
||||||
for (;;) {
|
|
||||||
char line[LINE_MAX], *p;
|
|
||||||
|
|
||||||
if (!fgets(line, sizeof(line), f))
|
|
||||||
break;
|
|
||||||
|
|
||||||
p = strchr(strstrip(line), ':');
|
|
||||||
if (!p)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (strncmp(p, ":ns:", 4))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!streq(p, ":ns:/")) {
|
|
||||||
fclose(f);
|
|
||||||
|
|
||||||
if (id)
|
|
||||||
*id = "pidns";
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose(f);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue