Wind River Support Network

HomeDefectsLIN9-9979
Fixed

LIN9-9979 : lxc - Error: container name is not defined

Created: Jun 2, 2020    Updated: Sep 2, 2020
Resolved Date: Jul 30, 2020
Found In Version: 9.0.0.24
Fix Version: 9.0.0.26
Severity: Standard
Applicable for: Wind River Linux 9
Component/s: Userspace

Description

The attach does not work on 4.8.28-rt10-WR9.0.0.24_ovp

root@local-node:~# lxc-attach --version

2.0.8

root@local-node:~# lxc-attach -n dcpfe0 – ls /tmp

*Error: container dcpfe0 is not defined*

This seems to be a known issue in lxc-containers and there is a fix already. Please provide us the patch for the same.

Upstream fix : 

[https://github.com/geaaru/lxc/commit/ded345d0e8e2c3b156687f4d7735673359c220e0]

Workaround

NA

Steps to Reproduce

Issue reproducible in customer setup when lxc container config is used to start container. Basic sequence is as below,

For example the following sequence is expected to work:

lxc-start -n containerName -f /path/to/conf \
 -s 'lxc.id_map = u 0 100000 65536' \
 -s 'lxc.id_map = g 0 100000 65536' \
 -s 'lxc.rootfs = /path/to/rootfs' \
 -s 'lxc.init_cmd = /path/to/initcmd'

lxc-attach -n containerName

The reproducible steps :
 1. build OVP9 and boot up 
 wrlinux-9/setup.sh --machines intel-x86-64 --distros wrlinux-ovp --dl-layers
 2. create a lxc conf 
 example:
 lxc.utsname = lxc0
 lxc.rootfs = /run/media/sdb1/jdm/rootfs

lxc.autodev = 1

lxc.cgroup.cpuset.cpus = 2,3
 lxc.tty = 6
 lxc.pts = 512

#prevent 100% cpu usage by systemd-journal the default is supposed to

#be zero anyway:
 lxc.kmsg = 0

3. start lxc-net service.
 systemctl start lxc-net

4.start lxc container 
 lxc-start -n lxc0 -f ./lxc_configure.cfg -F -o ./lxc.log

5.using lxc-attach to connect the lxc0 container .
 root@intel-x86-64:/run/media/sdb1/jdm# lxc-attach -n lxc0
 Error: container lxc0 is not defined
Live chat
Online