[lxc-devel] [lxc/lxc] a7242d: fill missing netdev fields for unprivileged contai...

GitHub noreply at github.com
Mon Feb 17 16:25:56 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: a7242d9a58ac7efef9fb97aaaadcdf760bd13230
      https://github.com/lxc/lxc/commit/a7242d9a58ac7efef9fb97aaaadcdf760bd13230
  Author: S.Çağlar Onur <caglar at 10ur.org>
  Date:   2014-02-17 (Mon, 17 Feb 2014)

  Changed paths:
    M src/lxc/conf.c
    M src/lxc/lxc_user_nic.c

  Log Message:
  -----------
  fill missing netdev fields for unprivileged containers

lxc-user-nic now returns the names of the interfaces and
unpriv_assign_nic function parses that information to fill
missing netdev->veth_attr.pair and netdev->name.

With this patch get_running_config_item started to provide
correct information;

>>> import lxc; c = lxc.Container("rubik"); c.get_running_config_item("lxc.network.0.name"); c.get_running_config_item("lxc.network.0.veth.pair");
'eth0'
'veth9MT2L4'
>>>

and lxc-info started to show network stats;

lxc-info -n rubik
Name:           rubik
State:          RUNNING
PID:            23061
IP:             10.0.3.233
CPU use:        3.86 seconds
BlkIO use:      88.00 KiB
Memory use:     6.53 MiB
KMem use:       0 bytes
Link:           veth9MT2L4
 TX bytes:      3.45 KiB
 RX bytes:      8.83 KiB
 Total bytes:   12.29 KiB

Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>




More information about the lxc-devel mailing list