Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lxc-execute: Input/output error - failed to read [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
OPelerin
Guru
Guru


Joined: 17 Jul 2004
Posts: 354
Location: Belgium

PostPosted: Mon Mar 11, 2013 12:04 pm    Post subject: lxc-execute: Input/output error - failed to read [SOLVED] Reply with quote

I just want use LXC to massively start hundred of openconnect sessions to a SSL gateway [ for scaling test purpose].

All guides I've found on the internet is to use the full blown container [ which I'm not interested]. I just want to see how I need to proceed in order to have only 1 application per container [ that should limit the system memory footprint]

so far I've

## network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = tap1
lxc.network.name = eth0
lxc.network.ipv4 = 192.168.1.11
lxc.network.ipv4.gateway = 192.168.1.1

I wonder how I should configure the mount part
_________________
Olivier PELERIN


Last edited by OPelerin on Mon Mar 11, 2013 9:32 pm; edited 3 times in total
Back to top
View user's profile Send private message
OPelerin
Guru
Guru


Joined: 17 Jul 2004
Posts: 354
Location: Belgium

PostPosted: Mon Mar 11, 2013 12:46 pm    Post subject: Reply with quote

Added

Quote:

lxs.rootfs = /etc/lxc/test1/rootfs
lxc.mount.entry=/lib /etc/lxc/test1/rootfs/lib none ro,bind 0 0
lxc.mount.entry=/usr/ /etc/lxc/test1/rootfs/usr none ro,bind 0 0
lxc.mount.entry=/lib64 /etc/lxc/test1/rootfs/lib64 none ro,bind 0 0


When starting it lxc-execute -l DEBUG -o /tmp/log -n test1 -f test1.conf /bin/bash

It fails with the below error

Quote:

lxc-execute 1363005746.200 DEBUG lxc_cgroup - checking '/boot' (ext2)
lxc-execute 1363005746.200 DEBUG lxc_cgroup - checking '/proc/sys/fs/binfmt_misc' (binfmt_misc)
lxc-execute 1363005746.204 DEBUG lxc_conf - move 'eth0' to '6268'
lxc-execute 1363005746.208 DEBUG lxc_conf - 'eth0' has been setup
lxc-execute 1363005746.208 INFO lxc_conf - network has been setup
lxc-execute 1363005746.209 DEBUG lxc_conf - remounting /lib on /etc/lxc/test1/rootfs/lib to respect bind or remount options
lxc-execute 1363005746.209 DEBUG lxc_conf - mounted '/lib' on '/etc/lxc/test1/rootfs/lib', type 'none'
lxc-execute 1363005746.209 DEBUG lxc_conf - remounting /usr/ on /etc/lxc/test1/rootfs/usr to respect bind or remount options
lxc-execute 1363005746.209 DEBUG lxc_conf - mounted '/usr/' on '/etc/lxc/test1/rootfs/usr', type 'none'
lxc-execute 1363005746.209 DEBUG lxc_conf - remounting /lib64 on /etc/lxc/test1/rootfs/lib64 to respect bind or remount options
lxc-execute 1363005746.209 DEBUG lxc_conf - mounted '/lib64' on '/etc/lxc/test1/rootfs/lib64', type 'none'
lxc-execute 1363005746.209 INFO lxc_conf - mount points have been setup
lxc-execute 1363005746.209 ERROR lxc_conf - No such file or directory - failed to create symlink for kmsg
lxc-execute 1363005746.209 ERROR lxc_conf - failed to setup kmsg for 'test1'
lxc-execute 1363005746.209 ERROR lxc_start - failed to setup the container
lxc-execute 1363005746.209 ERROR lxc_sync - invalid sequence number 1. expected 2
lxc-execute 1363005746.209 ERROR lxc_start - failed to spawn 'test1'
lxc-execute 1363005746.209 DEBUG lxc_cgroup - cgroup /sys/fs/cgroup/cpuset has flags 0x2
lxc-execute 1363005746.209 DEBUG lxc_cgroup - get_init_cgroup: found init cgroup for subsys (null) at /

_________________
Olivier PELERIN
Back to top
View user's profile Send private message
nox23
n00b
n00b


Joined: 15 Jul 2012
Posts: 30

PostPosted: Mon Mar 11, 2013 4:01 pm    Post subject: Reply with quote

Quote:
lxs.rootfs = /etc/lxc/test1/rootfs
lxc.mount.entry=/lib /etc/lxc/test1/rootfs/lib none ro,bind 0 0
lxc.mount.entry=/usr/ /etc/lxc/test1/rootfs/usr none ro,bind 0 0
lxc.mount.entry=/lib64 /etc/lxc/test1/rootfs/lib64 none ro,bind 0 0


Code:

lxc.rootfs = /etc/lxc/test1/rootfs
lxc.mount.entry=/lib /etc/lxc/test1/rootfs/lib none ro,bind 0 0
lxc.mount.entry=/usr/ /etc/lxc/test1/rootfs/usr none ro,bind 0 0
lxc.mount.entry=/lib64 /etc/lxc/test1/rootfs/lib64 none ro,bind 0 0


typo lxs -> lxc
don't know if it's that :lol:

i use http://globalcitizen.github.com/lxc-gentoo/
Back to top
View user's profile Send private message
OPelerin
Guru
Guru


Joined: 17 Jul 2004
Posts: 354
Location: Belgium

PostPosted: Mon Mar 11, 2013 9:13 pm    Post subject: lxc-execute: Input/output error - failed to read Reply with quote

bloody typo...


Quote:

gentoo-linux lxc # cat test1.conf
## network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br1
lxc.network.name = eth0
lxc.network.ipv4 = 192.168.1.11
lxc.network.ipv4.gateway = 192.168.1.1
lxc.utsname = test1
lxc.pts = 1024
lxc.rootfs = /etc/lxc/test1/rootfs
lxc.mount.entry=/lib /etc/lxc/test1/rootfs/lib none ro,bind 0 0
lxc.mount.entry=/usr/ /etc/lxc/test1/rootfs/usr none ro,bind 0 0
lxc.mount.entry=/lib64 /etc/lxc/test1/rootfs/lib64 none ro,bind 0 0
lxc.mount.entry=/etc/ /etc/lxc/test1/rootfs/etc none ro,bind 0 0
lxc.mount.entry=/var/ /etc/lxc/test1/rootfs/var none ro,bind 0 0
lxc.mount.entry=proc /etc/lxc/test1/rootfs/proc proc nodev,noexec,nosuid 0 0
lxc.mount.entry=/bin/ /etc/lxc/test1/rootfs/bin none ro,bind 0 0
lxc.mount.entry=/sbin/ /etc/lxc/test1/rootfs/sbin none ro,bind 0 0
lxc.mount = /etc/lxc/test1.fstab

gentoo-linux lxc # cat test1.fstab
none /etc/lxc/test1/rootfs/dev/pts devpts defaults 0 0
none /etc/lxc/test1/rootfs/sys sysfs defaults 0 0
none /etc/lxc/test1/rootfs/dev/shm tmpfs defaults 0 0
gentoo-linux lxc #


After fixing shm, I'm one step further

gentoo-linux lxc # lxc-execute -n test1 -f test1.conf /bin/bash
test1 / # lxc-execute: Input/output error - failed to read

googling a bit it seems we need to disable

gentoo-linux lxc # lxc-execute -n test1 -f test1.conf /bin/bash -s lxc.aa_profile=unconfined
lxc-execute: unknown key lxc.aa_profile

Seems not working... Any ideas?
_________________
Olivier PELERIN
Back to top
View user's profile Send private message
OPelerin
Guru
Guru


Joined: 17 Jul 2004
Posts: 354
Location: Belgium

PostPosted: Mon Mar 11, 2013 9:32 pm    Post subject: Reply with quote

A bit more googling

I've added

Quote:

lxc.tty = 1
lxc.console=/var/log/lxc/test1.console


Quote:

gentoo-linux lxc # lxc-start -n test1 -f test1.conf /bin/bash
test1 / # ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.11 netmask 255.0.0.0 broadcast 192.255.255.255
inet6 fe80::e423:40ff:fedb:3229 prefixlen 64 scopeid 0x20<link>
ether e6:23:40:db:32:29 txqueuelen 1000 (Ethernet)
RX packets 6 bytes 468 (468.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 468 (468.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

test1 / # ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.067 ms
^C
--- 192.168.1.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.067/0.081/0.096/0.017 ms
test1 / #

works!!!
_________________
Olivier PELERIN
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum