2013-10-04 20:52, Kir Kolyshkin skrev:
On 10/04/2013 01:50 AM, Johan Wilfer wrote:
Right now I testing a Debian 7, with a RHEL-kernel:
2.6.32-openvz-042stab081.3-amd64 with vzctl version 4.5.1
I've noticed that when I create a VE with DEVNODES-statement, like this:
DEVNODES="dahdi/channel:rw dahdi/ctl:rw dahdi/pseudo:rw dahdi/timer:rw"
The devices end up in the containers /dev directly, like this (I
removed the other devices for clarity):
root@test:/dev# ls -la
crw-r----T 1 root root 196, 254 Oct 3 23:34 channel
crw-r----T 1 root root 196, 0 Oct 3 23:34 ctl
crw-r----T 1 root root 196, 255 Oct 3 23:34 pseudo
crw-r----T 1 root root 196, 253 Oct 3 23:34 timer
This is how it looks like on the HN
root@microhn01:/dev# ls -la /dev/dahdi/
drwxr-xr-x 2 root root 120 okt 3 22:08 .
drwxr-xr-x 19 root root 6600 okt 3 22:08 ..
crw-rw---T 1 root root 196, 254 okt 3 22:08 channel
crw-rw---T 1 root root 196, 0 okt 3 22:08 ctl
crw-rw---T 1 root root 196, 255 okt 3 22:08 pseudo
crw-rw---T 1 root root 196, 253 okt 3 22:08 timer
In OpenVZ on Debian 6 the parent dir "dahdi" was created in the VE,
now with this more recent kernel and vzctl all end up in /dev without
the dahdi-directory.
Most probably it has to do something with what distro you have inside a
container
rather than the kernel and vzctl.
I tried to reproduce your issue using vzctl-4.5.1 and kernel
2.6.32-042stab082.3,
with a container running centos-6-x86 template, and it works as it should
(well, almost -- see below):
[HOST] # ls -l /dev/cpu/microcode
crw-rw---- 1 root root 10, 184 Oct 3 03:10 /dev/cpu/microcode
[HOST] # vzctl set 1018 --devnodes cpu/microcode:r --save
Setting devices
CT configuration saved to /etc/vz/conf/1018.conf
[HOST] # vzctl enter 1018
entered into CT 1018
[CT] # ls -l /dev/cpu/microcode
crw------- 1 root root 10, 184 Oct 4 14:42 /dev/cpu/microcode
[CT] # logout
[HOST] # vzctl restart 1018
....
[root@dhcp-10-30-21-127 ~]# vzctl exec 1018 ls -l /dev/microcode
crw-r----- 1 root root 10, 184 Oct 4 14:43 /dev/microcode
[root@dhcp-10-30-21-127 ~]# vzctl exec 1018 ls -l /dev/cpu/microcode
crw-rw---- 1 root root 10, 184 Oct 4 14:43 /dev/cpu/microcode
I am not sure why that happens, but it doesn't look like a big issue to me.
I re-did the same test with the debian-7-x86_64 template, with the
same results.
Generally, such requests better to be filed as bugs to bugzilla (but for
this one,
so far, WORKSFORME).
I did test with Centos x86_64 as a HN, and with the contrib templates:
debian-6.0-amd64-minimal.tar.gz
debian-7.0-amd64-minimal.tar.gz
I get the same results as with the Debian 7 HN above.
If I try with "centos-6-x86_64"-template I notice this:
[root@test /]# ls -la /dev/dahdi/
total 0
drwxr-xr-x 2 root root 120 Oct 6 09:37 .
drwxr-xr-x 9 root root 2220 Oct 6 09:37 ..
crw-rw---- 1 root root 196, 254 Oct 6 09:37 channel
crw-rw---- 1 root root 196, 0 Oct 6 09:37 ctl
crw-rw---- 1 root root 196, 255 Oct 6 09:37 pseudo
crw-rw---- 1 root root 196, 253 Oct 6 09:37 timer
and:
[root@test /]# ls -la /dev/channel
crw-r----- 1 root root 196, 254 Oct 6 09:37 /dev/channel
[root@test /]# ls -la /dev/ctl
crw-r----- 1 root root 196, 0 Oct 6 09:37 /dev/ctl
[root@test /]# ls -la /dev/pseudo
crw-r----- 1 root root 196, 255 Oct 6 09:37 /dev/pseudo
[root@test /]# ls -la /dev/timer
crw-r----- 1 root root 196, 253 Oct 6 09:37 /dev/timer
So in this template the devices are created BOTH in the sub-dir and in
the /dev-dir.
In my Debian 6 HN this works as it should, for the
debian-6.0-amd64-minimal-template.
Should I report this on the bugzilla?
--
Johan Wilfer
_______________________________________________
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users