[lxc-users] Missing /proc/self after lxc-attach ?

2016-02-15 Thread Mateusz Korniak
Hi !
I am facing problem that 
/proc/self
is missing after I enter container via lxc-attach. [1]

When I log in to same container via lxc-start -F console, everything looks OK.
[2]

Is it bug or feature? 

It reduces usability of lxc-attach as many apps like top  [3]  and dynamic 
linking via RPATH [4] are not working :(

Confirmed Ubuntu 14.04. [5].

TIA, regards,


[1]: After lxc-attach entry to container:
# ls -la /proc/self
ls: cannot read symbolic link /proc/self: No such file or directory
lrwxrwxrwx 1 root root 0 Feb 15 12:05 /proc/self


[2]: After login via lxc-start console:
# ls -la /proc/self
lrwxrwxrwx 1 root root 0 Feb 15 12:05 /proc/self -> 1476


[3]:
# top
Error, do this: mount -t proc proc /proc

[4]:
LD_TRACE_LOADED_OBJECTS=1  ./java 
   linux-vdso.so.1 (0x7ffd40fd8000)
   libjli.so => not found
objdump -a -x  java | grep -i rpath 

   
 RPATH$ORIGIN/../lib/amd64/jli:/usr/jre/lib/amd64/jli:
$ORIGIN/../lib/amd64:/usr/lib/amd64:
$ORIGIN/../jre/lib/amd64:/usr/jre/lib/amd64

[5]:
lxc-create -t download -n ubuntu_tursty_test -- -d ubuntu -r trusty -a amd64


-- 
Mateusz Korniak
"(...) mam brata - poważny, domator, liczykrupa, hipokryta, pobożniś,
krótko mówiąc - podpora społeczeństwa."
Nikos Kazantzakis - "Grek Zorba"

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] Missing /proc/self after lxc-attach ?

2016-02-15 Thread Mateusz Korniak
On Monday 15 February 2016 15:04:31 Wolfgang Bumiller wrote:
> > On February 15, 2016 at 1:29 PM Mateusz Korniak
> >  wrote: [1]: After lxc-attach entry to
> > container:
> > # ls -la /proc/self
> > ls: cannot read symbolic link /proc/self: No such file or directory
> > lrwxrwxrwx 1 root root 0 Feb 15 12:05 /proc/self
> 
> What is the exact command you used to attach? 

Just:
# lxc-attach -n test-container

> Because eg. if you only
> enter the mount namespace but not the PID namespace, then you see the
> container's /proc with the *container*'s processes and thus your PID
> doesn't show up, making /proc/self a dead symlink.

Both /proc looks similar, except in /proc from lxc-start console login I can 
see extra process entry:

1479
self -> 1479

I am confused, why I do not see that process entry from lxc-attach view of 
/proc regardless of missing /proc/self ?


BTW, I have not mention it but its 
kernel 4.1.15 
lxc 1.1.5


TIA, regards,
-- 
Mateusz Korniak
"(...) mam brata - poważny, domator, liczykrupa, hipokryta, pobożniś,
krótko mówiąc - podpora społeczeństwa."
Nikos Kazantzakis - "Grek Zorba"

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

[lxc-users] systemd[1]: Starting of glusterfs.automount not supported (inside lxc 1.1.5 container)

2016-06-14 Thread Mateusz Korniak
Hi !
I am trying to have glusterfs automounted on demand inside lxc 1.1.5 
container.
/etc/fstab line which works on host machine:

10.30.3.31,10.30.3.32:/test_vol 
/mnt/glusterfs_biuro_test_vol   glusterfs   _netdev,x-
systemd.automount,x-systemd.device-timeout=3m 0 0

when used inside container refuses to work [1].
I can, though, mount manually inside same container via:

# mount /mnt/glusterfs_biuro_test_vol

What am I doing wrong?
TIA for any hints, 
regards,

[1]:
# systemctl status mnt-glusterfs_biuro_test_vol.automount   


  
● mnt-glusterfs_biuro_test_vol.automount
   Loaded: loaded (/etc/fstab)
   Active: inactive (dead)
Where: /mnt/glusterfs_biuro_test_vol
 Docs: man:fstab(5)
   man:systemd-fstab-generator(8)

Jun 14 14:22:52 clients-www systemd[1]: Starting of mnt-
glusterfs_biuro_test_vol.automount not supported.

-- 
Mateusz Korniak
"(...) mam brata - poważny, domator, liczykrupa, hipokryta, pobożniś,
krótko mówiąc - podpora społeczeństwa."
Nikos Kazantzakis - "Grek Zorba"

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] Networking issue

2016-11-09 Thread Mateusz Korniak
On Wednesday 09 of November 2016 01:33:55 Saint Michael wrote:
> lxc.network.type=macvlan
> lxc.network.hwaddr = XX:XX:XX:XX:XX:XX
> 
> Now suppose I have a machine, not a container, in the same broadcast domain
> as the containers, same subnet.
> It cannot ping or ssh into a container, which is accessible from outside my
> network.
> However, from inside the container the packets come and go perfectly, when
> the connection is originated by the container.
> (...)
> Any idea?

Make sure you do not have lxc.network.hwaddr duplicates (many containers with 
same hwaddr).
Turn off container and make sure it stops being "accessible from outside my
network"

-- 
Mateusz Korniak
"(...) mam brata - poważny, domator, liczykrupa, hipokryta, pobożniś,
krótko mówiąc - podpora społeczeństwa."
Nikos Kazantzakis - "Grek Zorba"

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] Networking issue

2016-11-09 Thread Mateusz Korniak
On Wednesday 09 of November 2016 01:33:55 Saint Michael wrote:
> Now suppose I have a machine, not a container, in the same broadcast domain
> as the containers, same subnet.
> It cannot ping or ssh into a container, which is accessible from outside my
> network.
> However, from inside the container the packets come and go perfectly, when
> the connection is originated by the container.
> A container can ping that host I mentioned, but the host cannot ping back
> the container.

Assuming you have container on host and external machine,
if you can:
machine ~]$  ping container
but  not (if I understand correctly):
container ~]$  ping machine

compare (tcpdump  -e icmp  -n )  of both pings on machine and host to see if 
they are different?

check if they do not get filtered by rp_filter 
sysctl  -a | grep [.]rp_filter

-- 
Mateusz Korniak
"(...) mam brata - poważny, domator, liczykrupa, hipokryta, pobożniś,
krótko mówiąc - podpora społeczeństwa."
Nikos Kazantzakis - "Grek Zorba"

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

[lxc-users] How to set lxc.network.ipv4/hwaddr/ipv4.gateway=auto in LXD 2.6 managed container?

2016-12-02 Thread Mateusz Korniak
I am trying to move from LXC 1.1.x (macvlan) [1] containers to recent LXD [2].

I am stuck with problem:
- how can I set static ipv4/hwaddr and ipv4.gateway=auto?

I switched default profile to maclvan [3].
I created test container:

# lxc init ubuntu:16.04  ubuntu-1604-macvlan-test

Starting it confirms that macvlan iface works. Disbled DHCP configuration of 
eth0@if2, and now setting IP# fails:

# lxc config device set ubuntu-1604-macvlan-test virt ipv4.address 10.30.3.205 
error: The device doesn't exist

It's confusing as virt device is visible in lxc config show [4], but not in 
lxc config device list ubuntu-1604-macvlan-test [5]?

TIA, regards,


[1]: Old LXC network config
lxc.network.type = macvlan
lxc.network.macvlan.mode = bridge
lxc.network.hwaddr = 00:16:3e:00:31:12  


   
lxc.network.ipv4 = 10.30.3.112/23   


   
lxc.network.ipv4.gateway = auto 

[2]: versions:
lxc-2.0.6
lxd-2.6


[3]: 
# lxc profile show default  



name: default
config: {}
description: Default LXD profile
devices:
  virt:
nictype: macvlan
parent: eth0
type: nic
usedby:
- /1.0/containers/ubuntu-1604-macvlan-test


[4]:
# lxc config show --expanded  ubuntu-1604-macvlan-test  



name: ubuntu-1604-macvlan-test
profiles:
- default
config:
  image.architecture: amd64
  image.description: ubuntu 16.04 LTS amd64 (release) (20161130)
  image.label: release
  image.os: ubuntu
  image.release: xenial
  image.serial: "20161130"
  image.version: "16.04"
  volatile.base_image: 
fc6d723a6e662a5a4fe213eae6b7f4c79ee7dd566c99856d96a5ca677a99b15d
  volatile.idmap.base: "0"
  volatile.idmap.next: 
'[{"Isuid":true,"Isgid":false,"Hostid":100,"Nsid":0,"Maprange":10},
{"Isuid":false,"Isgid":true,"Hostid":100,"Nsid":0,"Maprange":10}]'
  volatile.last_state.idmap: 
'[{"Isuid":true,"Isgid":false,"Hostid":100,"Nsid":0,"Maprange":10},
{"Isuid":false,"Isgid":true,"Hostid":100,"Nsid":0,"Maprange":10}]'
  volatile.last_state.power: STOPPED
  volatile.root.hwaddr: 00:16:3e:be:9b:1b
  volatile.root.name: eth1
  volatile.virt.hwaddr: 00:16:3e:e3:22:75
  volatile.virt.name: eth0
devices:
  root:
path: /
type: disk
  virt:
nictype: macvlan
parent: eth0
type: nic
ephemeral: false


[5]:
# lxc config device list ubuntu-1604-macvlan-test   



root: disk


-- 
Mateusz Korniak
"(...) mam brata - poważny, domator, liczykrupa, hipokryta, pobożniś,
krótko mówiąc - podpora społeczeństwa."
Nikos Kazantzakis - "Grek Zorba"

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] no ping between host and lxc container

2016-12-20 Thread Mateusz Korniak
On Tuesday 20 of December 2016 17:04:08 Fajar A. Nugraha wrote:
> What I did in my host, is create a macvlan interface for the host, and move
> host's eth0 IP address there.
> 
> (...)
> ### from "lxc config show container_name"
> devices:
>   eth0:
> name: eth0
> nictype: macvlan
> parent: eth0
> type: nic
> 
> 
> So I use host eth0 (now without IP, as its ip is moved to v-0, which is a
> macvlan interface) as "parent" in lxd (this should be "lxc.network.link" in
> lxc). If you have problems with flockport's guide, try my setup.

Are you able to set MAC address for lxc container?
How do you setup IP# for container?

TIA, regards,

-- 
Mateusz Korniak
"(...) mam brata - poważny, domator, liczykrupa, hipokryta, pobożniś,
krótko mówiąc - podpora społeczeństwa."
Nikos Kazantzakis - "Grek Zorba"

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] no ping between host and lxc container

2016-12-20 Thread Mateusz Korniak
On Tuesday 20 of December 2016 18:06:38 Fajar A. Nugraha wrote:
> > How do you setup IP# for container?
> 
> (...) by default there's no way to
> set (and restrict) IP address from the host side.

It's a pity. [1].

Perhaps, any idea how one get LXC config
  lxc.network.ipv4.gateway = auto
equivalent in LXD?

BTW, what lxc/lxd versions you are using, as in my case network devices are 
visible only by:
  lxc config show --expanded 
not by simple:
  lxc config show
as looks in your case ...

[1]:
I am confused though, as many tutorials claim that:
  lxc config device set CONT DEV  ipv4.address  10.x.y.z 
should work :/



TIA, regards,

-- 
Mateusz Korniak
"(...) mam brata - poważny, domator, liczykrupa, hipokryta, pobożniś,
krótko mówiąc - podpora społeczeństwa."
Nikos Kazantzakis - "Grek Zorba"

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users