Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lxc-console broken for systemd containers under hosts without systemd #1704

Closed
itoffshore opened this issue Jul 14, 2017 · 34 comments
Closed

Comments

@itoffshore
Copy link
Contributor

  • Distributions: Alpine Linux (OpenRC) / Manjaro (OpenRC) / Antix Linux (Sysvinit)

  • Distribution versions: Alpine 3.6 / Manjaro 17.0.2 / Antix 17-b1

    • lxc-start --version = 2.0.8

Issue description

lxc containers under non systemd hosts were working until about 4 weeks ago. At the moment lxc-console connects to a tty but does not give a login prompt. Containers are started ok with lxc-start but cannot be stopped with lxc-stop. Using lxc-attach to connect to a container shows an error of:

groups: cannot find name for group ID 19 (this is the log group on the lxc host).

Inside the container $PATH does not seem to work (calling binaries stopped working) & openssh-server has stopped working in the containers. (I have been using ubuntu / centos containers created with lxc-create -t download).

Steps to reproduce

  1. lxc-create -t download -n <container>
  2. lxc-start -n <container>
  3. lxc-console -n <container>

Information to attach

lxc-start -n <c> -l <log> -o DEBUG - this gives a 337meg core dump

lxc-start -n ubuntu2 -l trace -o ubuntu.lxc.log :

      lxc-start 20170714144322.403 INFO     lxc_start_ui - tools/lxc_start.c:main:275 - using rcfile /srv/lxc/ubuntu2/config
      lxc-start 20170714144322.403 WARN     lxc_confile - confile.c:config_pivotdir:1916 - lxc.pivotdir is ignored.  It will soon become an error.
      lxc-start 20170714144322.403 DEBUG    lxc_commands - commands.c:lxc_cmd_rsp_recv:203 - command get_init_pid response data length is 0
      lxc-start 20170714144322.404 DEBUG    lxc_commands - commands.c:lxc_cmd_rsp_recv:203 - command get_state response data length is 0
      lxc-start 20170714144322.404 DEBUG    lxc_commands - commands.c:lxc_cmd_get_state:586 - Container "ubuntu2" is in "RUNNING" state.
@brauner
Copy link
Member

brauner commented Jul 14, 2017

Did you recently upgrade your lxc version?

@itoffshore
Copy link
Contributor Author

I think it was the latest update that broke things. Centos / Ubuntu containers were working on May 1st - 3rd while I was using them to test some scripts

  • Alpine always uses the latest lxc
  • Manjaro OpenRC is a rolling release so always uses the latest lxc
  • Antix uses lxc 2.0.7 in Debian Stretch (I only tested in Antix after the problem happened to see if this was an OpenRC issue)

@itoffshore
Copy link
Contributor Author

looking at the PR's the containers were working on 7th June too

@brauner
Copy link
Member

brauner commented Jul 14, 2017

Can you show me the containers config file, please?

@itoffshore
Copy link
Contributor Author

itoffshore commented Jul 14, 2017

[manjaro stuart]# cat /srv/lxc/ubuntu/config

# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template: --no-validate
# Template script checksum (SHA-1): 740c51206e35463362b735e68b867876048a8baf
# For additional config options, please look at lxc.container.conf(5)

# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)


# Distribution configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.arch = x86_64

# Container specific configuration
lxc.rootfs = /srv/lxc/ubuntu/rootfs
lxc.rootfs.backend = dir
lxc.utsname = ubuntu

# Network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.name = eth0
lxc.network.veth.pair = veth.ubuntu
lxc.network.link = virbr0
lxc.network.ipv4 = xxxxxx
lxc.network.ipv4.gateway = xxxxxx

lxc.start.auto = 1

__________________________________________________-

[manjaro stuart]# cat /srv/lxc/centos/config

# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# Template script checksum (SHA-1): 740c51206e35463362b735e68b867876048a8baf
# For additional config options, please look at lxc.container.conf(5)

# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)

lxc.network.type = veth
lxc.network.flags = up
lxc.network.name = eth0
lxc.network.veth.pair = veth.centos
lxc.network.link = virbr0
lxc.network.ipv4 = xxxxxx
lxc.network.ipv4.gateway = xxxxxx

# Distribution configuration
lxc.include = /usr/share/lxc/config/centos.common.conf
lxc.arch = x86_64

# Container specific configuration
lxc.rootfs = /srv/lxc/centos/rootfs
lxc.rootfs.backend = dir
lxc.utsname = centos

lxc.start.auto = 1

Alpine Linux containers on the same lxc host have continued working without issue.

I use a libvirt nat bridge locally as shown above & have the same issue with lxc-console not givng a login prompt for containers with systemd on remote hosts with openvswitch bridges (again Alpine Linux containers work without issue).

@brauner brauner added Bug Confirmed to be a bug and removed Bug Confirmed to be a bug labels Jul 14, 2017
@brauner
Copy link
Member

brauner commented Jul 15, 2017

Can you show what happens in the terminal when you do lxc-console to such a container. It works fine for me here. I may need to press enter and then the prompt appears.

@itoffshore
Copy link
Contributor Author

itoffshore commented Jul 15, 2017

What os did you test in ?

this is in Alpine Linux after hitting enter 5-6 times:

lxc-login

& this is Manjaro OpenRC after hitting enter 5-6 times:

lxc-login2

@itoffshore
Copy link
Contributor Author

& this is an Alpine Linux container starting as expected under Manjaro OpenRC:

lxc-login3

@brauner
Copy link
Member

brauner commented Jul 16, 2017

Ok, can you ease start a container that has this problem with lxc-start -n <container-name> -l trace -o <container-name-start>.log try to attach a console with lxc-console -n <container-name> -l trace -o <container-name-console>.log and attach both files here, please?

@itoffshore
Copy link
Contributor Author

lxc-start -n ubuntu2 -l trace -o ubuntu-start.log

      lxc-start 20170716154158.414 INFO     lxc_start_ui - tools/lxc_start.c:main:275 - using rcfile /srv/lxc/ubuntu2/config
      lxc-start 20170716154158.438 WARN     lxc_confile - confile.c:config_pivotdir:1916 - lxc.pivotdir is ignored.  It will soon become an error.
      lxc-start 20170716154158.439 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:330 - Going to wait for pid 11115.
      lxc-start 20170716154158.439 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:349 - Trying to sync with child process.
      lxc-start 20170716154158.440 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 4.
      lxc-start 20170716154158.440 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:387 - Using pipe file descriptor 5 for monitord.
      lxc-start 20170716154158.454 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:364 - Successfully synced with child process.
      lxc-start 20170716154158.455 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:333 - Finished waiting on pid 11115.
      lxc-start 20170716154158.455 INFO     lxc_container - lxccontainer.c:do_lxcapi_start:802 - Attempting to set proc title to [lxc monitor] /srv/lxc ubuntu2
      lxc-start 20170716154158.455 INFO     lxc_utils - utils.c:setproctitle:1506 - setting cmdline failed - Invalid argument
      lxc-start 20170716154158.455 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:330 - Going to wait for pid 11119.
      lxc-start 20170716154158.456 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:349 - Trying to sync with child process.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:418 - processing: .reject_force_umount  # comment this to allow umount -f;  not recommended.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:590 - Adding native rule for reject_force_umount action 0.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:do_resolve_add_rule:259 - Setting Seccomp rule to reject force umounts.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:593 - Adding compat rule for reject_force_umount action 0.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:do_resolve_add_rule:259 - Setting Seccomp rule to reject force umounts.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:do_resolve_add_rule:259 - Setting Seccomp rule to reject force umounts.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:418 - processing: .[all].
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:418 - processing: .kexec_load errno 1.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:590 - Adding native rule for kexec_load action 327681.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:593 - Adding compat rule for kexec_load action 327681.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:418 - processing: .open_by_handle_at errno 1.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:590 - Adding native rule for open_by_handle_at action 327681.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:593 - Adding compat rule for open_by_handle_at action 327681.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:418 - processing: .init_module errno 1.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:590 - Adding native rule for init_module action 327681.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:593 - Adding compat rule for init_module action 327681.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:418 - processing: .finit_module errno 1.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:590 - Adding native rule for finit_module action 327681.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:593 - Adding compat rule for finit_module action 327681.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:418 - processing: .delete_module errno 1.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:590 - Adding native rule for delete_module action 327681.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:593 - Adding compat rule for delete_module action 327681.
      lxc-start 20170716154158.456 INFO     lxc_seccomp - seccomp.c:parse_config_v2:603 - Merging in the compat Seccomp ctx into the main one.
      lxc-start 20170716154158.456 DEBUG    lxc_start - start.c:setup_signal_fd:273 - Set SIGCHLD handler with file descriptor: 5.
      lxc-start 20170716154158.457 DEBUG    console - console.c:lxc_console_peer_default:438 - process does not have a controlling terminal
      lxc-start 20170716154158.457 INFO     lxc_start - start.c:lxc_init:475 - Container "ubuntu2" is initialized.
      lxc-start 20170716154158.458 DEBUG    lxc_start - start.c:__lxc_start:1325 - Not dropping CAP_SYS_BOOT or watching utmp.
      lxc-start 20170716154158.466 INFO     lxc_conf - conf.c:instantiate_veth:2706 - Retrieved mtu 1500 from vmnet
      lxc-start 20170716154158.466 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 4.
      lxc-start 20170716154158.466 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:387 - Using pipe file descriptor 5 for monitord.
      lxc-start 20170716154158.473 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:364 - Successfully synced with child process.
      lxc-start 20170716154158.474 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:333 - Finished waiting on pid 11119.
      lxc-start 20170716154158.474 INFO     lxc_monitor - monitor.c:lxc_monitor_sock_name:201 - using monitor socket name "lxc/9573eab49c9c9dc9//srv/lxc" (length of socket name 29 must be <= 105)
      lxc-start 20170716154158.474 DEBUG    lxc_monitor - monitor.c:lxc_monitor_open:225 - opening monitor socket lxc/9573eab49c9c9dc9//srv/lxc with len 29
      lxc-start 20170716154158.546 INFO     lxc_conf - conf.c:instantiate_veth:2731 - Attached 'veth5B2UO6': to the bridge 'vmnet': 
      lxc-start 20170716154158.547 INFO     lxc_conf - conf.c:run_script:478 - Executing script "/etc/lxc/ovsup" for container "ubuntu2", config section "net".
      lxc-start 20170716154158.548 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 4.
      lxc-start 20170716154158.548 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 5.
      lxc-start 20170716154158.548 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 6.
      lxc-start 20170716154158.548 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 7.
      lxc-start 20170716154158.548 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 8.
      lxc-start 20170716154158.548 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 9.
      lxc-start 20170716154158.548 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 10.
      lxc-start 20170716154158.548 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 11.
      lxc-start 20170716154158.548 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:330 - Going to wait for pid 11133.
      lxc-start 20170716154158.549 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:349 - Trying to sync with child process.
      lxc-start 20170716154158.549 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 4.
      lxc-start 20170716154158.549 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:387 - Using pipe file descriptor 5 for monitord.
      lxc-start 20170716154158.552 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:364 - Successfully synced with child process.
      lxc-start 20170716154158.552 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:333 - Finished waiting on pid 11133.
      lxc-start 20170716154158.552 INFO     lxc_monitor - monitor.c:lxc_monitor_sock_name:201 - using monitor socket name "lxc/9573eab49c9c9dc9//srv/lxc" (length of socket name 29 must be <= 105)
      lxc-start 20170716154158.552 DEBUG    lxc_monitor - monitor.c:lxc_monitor_open:225 - opening monitor socket lxc/9573eab49c9c9dc9//srv/lxc with len 29
      lxc-start 20170716154158.574 DEBUG    lxc_conf - conf.c:instantiate_veth:2748 - instantiated veth 'veth5B2UO6/vethVGJWSD', index is '143'
      lxc-start 20170716154158.574 INFO     lxc_cgroup - cgroups/cgroup.c:cgroup_init:68 - cgroup driver cgroupfs initing for ubuntu2
      lxc-start 20170716154158.578 INFO     lxc_start - start.c:lxc_spawn:1165 - Cloned CLONE_NEWNS.
      lxc-start 20170716154158.578 INFO     lxc_start - start.c:lxc_spawn:1165 - Cloned CLONE_NEWPID.
      lxc-start 20170716154158.579 INFO     lxc_start - start.c:lxc_spawn:1165 - Cloned CLONE_NEWUTS.
      lxc-start 20170716154158.579 INFO     lxc_start - start.c:lxc_spawn:1165 - Cloned CLONE_NEWIPC.
      lxc-start 20170716154158.579 INFO     lxc_start - start.c:lxc_spawn:1165 - Cloned CLONE_NEWNET.
      lxc-start 20170716154158.579 DEBUG    lxc_conf - conf.c:idmaptool_on_path_and_privileged:3307 - The binary "/usr/bin/newuidmap" does have the setuid bit set.
      lxc-start 20170716154158.579 DEBUG    lxc_conf - conf.c:idmaptool_on_path_and_privileged:3307 - The binary "/usr/bin/newgidmap" does have the setuid bit set.
      lxc-start 20170716154158.579 DEBUG    lxc_conf - conf.c:lxc_map_ids:3368 - Functional newuidmap and newgidmap binary found.
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.deny' set to 'a'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c *:* m'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'b *:* m'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 1:3 rwm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 1:5 rwm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 1:7 rwm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 5:0 rwm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 5:1 rwm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 5:2 rwm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 1:8 rwm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 1:9 rwm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 136:* rwm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 10:229 rwm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 254:0 rm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 10:200 rwm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 10:228 rwm'
      lxc-start 20170716154158.579 DEBUG    lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2042 - cgroup 'devices.allow' set to 'c 10:232 rwm'
      lxc-start 20170716154158.579 INFO     lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2046 - cgroup has been setup
      lxc-start 20170716154158.597 DEBUG    lxc_conf - conf.c:lxc_assign_network:3255 - move 'vethVGJWSD'/'(null)' to '11136': .
      lxc-start 20170716154158.598 DEBUG    lxc_conf - conf.c:setup_rootfs:1204 - Mounted rootfs "/srv/lxc/ubuntu2/rootfs" onto "/usr/lib/lxc/rootfs" with options "(null)".
      lxc-start 20170716154158.598 INFO     lxc_conf - conf.c:setup_utsname:825 - 'ubuntu2' hostname has been setup
      lxc-start 20170716154158.598 DEBUG    lxc_conf - conf.c:setup_netdev:2511 - 'eth0' has been setup
      lxc-start 20170716154158.598 INFO     lxc_conf - conf.c:setup_network:2532 - network has been setup
      lxc-start 20170716154158.598 INFO     lxc_conf - conf.c:mount_autodev:1054 - Mounting container /dev
      lxc-start 20170716154158.598 INFO     lxc_conf - conf.c:mount_autodev:1077 - Mounted tmpfs onto /usr/lib/lxc/rootfs/dev
      lxc-start 20170716154158.598 INFO     lxc_conf - conf.c:mount_autodev:1095 - Mounted container /dev
      lxc-start 20170716154158.599 INFO     lxc_conf - conf.c:mount_entry:1763 - failed to mount '/sys/fs/fuse/connections' on '/usr/lib/lxc/rootfs/sys/fs/fuse/connections' (optional): No such file or directory
      lxc-start 20170716154158.599 INFO     lxc_conf - conf.c:mount_entry:1763 - failed to mount '/sys/kernel/debug' on '/usr/lib/lxc/rootfs/sys/kernel/debug' (optional): No such file or directory
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:mount_entry:1774 - remounting /sys/kernel/security on /usr/lib/lxc/rootfs/sys/kernel/security to respect bind or remount options
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:mount_entry:1789 - (at remount) flags for /sys/kernel/security was 4142, required extra flags are 14
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:mount_entry:1824 - mounted '/sys/kernel/security' on '/usr/lib/lxc/rootfs/sys/kernel/security', type 'none'
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:mount_entry:1774 - remounting /sys/fs/pstore on /usr/lib/lxc/rootfs/sys/fs/pstore to respect bind or remount options
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:mount_entry:1789 - (at remount) flags for /sys/fs/pstore was 4142, required extra flags are 14
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:mount_entry:1824 - mounted '/sys/fs/pstore' on '/usr/lib/lxc/rootfs/sys/fs/pstore', type 'none'
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:mount_entry:1824 - mounted 'mqueue' on '/usr/lib/lxc/rootfs/dev/mqueue', type 'mqueue'
      lxc-start 20170716154158.599 INFO     lxc_conf - conf.c:mount_file_entries:2044 - mount points have been setup
      lxc-start 20170716154158.599 INFO     lxc_conf - conf.c:lxc_fill_autodev:1132 - populating container /dev
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:lxc_fill_autodev:1169 - created device node "/usr/lib/lxc/rootfs/dev/null"
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:lxc_fill_autodev:1169 - created device node "/usr/lib/lxc/rootfs/dev/zero"
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:lxc_fill_autodev:1169 - created device node "/usr/lib/lxc/rootfs/dev/full"
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:lxc_fill_autodev:1169 - created device node "/usr/lib/lxc/rootfs/dev/urandom"
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:lxc_fill_autodev:1169 - created device node "/usr/lib/lxc/rootfs/dev/random"
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:lxc_fill_autodev:1169 - created device node "/usr/lib/lxc/rootfs/dev/tty"
      lxc-start 20170716154158.599 INFO     lxc_conf - conf.c:lxc_fill_autodev:1174 - populated container /dev
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:lxc_setup_ttydir_console:1514 - created directory for console and tty devices at /usr/lib/lxc/rootfs/dev/lxc"
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:lxc_setup_ttydir_console:1600 - mounted "/dev/pts/12" onto "/usr/lib/lxc/rootfs/dev/lxc/console"
      lxc-start 20170716154158.599 DEBUG    lxc_conf - conf.c:lxc_setup_ttydir_console:1620 - console has been setup under "lxc/console" and symlinked to "/usr/lib/lxc/rootfs/dev/console"
      lxc-start 20170716154158.599 INFO     lxc_utils - utils.c:lxc_mount_proc_if_needed:1773 - I am 1, /proc/self points to "1"
      lxc-start 20170716154158.600 DEBUG    lxc_conf - conf.c:setup_rootfs_pivot_root:1032 - pivot_root syscall to '/usr/lib/lxc/rootfs' successful
      lxc-start 20170716154158.600 DEBUG    lxc_conf - conf.c:setup_pivot_root:1334 - finished pivot root
      lxc-start 20170716154158.600 DEBUG    lxc_conf - conf.c:lxc_setup_devpts:1392 - created dummy "/dev/ptmx" file as bind mount target
      lxc-start 20170716154158.600 DEBUG    lxc_conf - conf.c:lxc_setup_devpts:1397 - bind mounted "/dev/pts/ptmx" to "/dev/ptmx"
      lxc-start 20170716154158.601 DEBUG    lxc_conf - conf.c:lxc_create_tty:3569 - allocated pty '/dev/pts/0' (9/12)
      lxc-start 20170716154158.601 DEBUG    lxc_conf - conf.c:lxc_create_tty:3569 - allocated pty '/dev/pts/1' (13/14)
      lxc-start 20170716154158.601 DEBUG    lxc_conf - conf.c:lxc_create_tty:3569 - allocated pty '/dev/pts/2' (15/16)
      lxc-start 20170716154158.601 DEBUG    lxc_conf - conf.c:lxc_create_tty:3569 - allocated pty '/dev/pts/3' (17/18)
      lxc-start 20170716154158.601 INFO     lxc_conf - conf.c:lxc_create_tty:3580 - tty's configured
      lxc-start 20170716154158.601 INFO     lxc_conf - conf.c:setup_tty:977 - 4 tty(s) has been setup
      lxc-start 20170716154158.601 INFO     lxc_conf - conf.c:setup_personality:1433 - set personality to '0x0'
      lxc-start 20170716154158.601 DEBUG    lxc_conf - conf.c:setup_caps:2194 - drop capability 'mac_admin' (33)
      lxc-start 20170716154158.601 DEBUG    lxc_conf - conf.c:setup_caps:2194 - drop capability 'mac_override' (32)
      lxc-start 20170716154158.601 DEBUG    lxc_conf - conf.c:setup_caps:2194 - drop capability 'sys_time' (25)
      lxc-start 20170716154158.601 DEBUG    lxc_conf - conf.c:setup_caps:2194 - drop capability 'sys_module' (16)
      lxc-start 20170716154158.601 DEBUG    lxc_conf - conf.c:setup_caps:2194 - drop capability 'sys_rawio' (17)
      lxc-start 20170716154158.601 DEBUG    lxc_conf - conf.c:setup_caps:2203 - capabilities have been setup
      lxc-start 20170716154158.601 NOTICE   lxc_conf - conf.c:lxc_setup:4116 - 'ubuntu2' is setup.
      lxc-start 20170716154158.601 INFO     lxc_cgfs - cgroups/cgfs.c:do_setup_cgroup_limits:2046 - cgroup has been setup
      lxc-start 20170716154158.603 INFO     lxc_start - start.c:do_start:836 - Unshared CLONE_NEWCGROUP.
      lxc-start 20170716154158.603 NOTICE   lxc_start - start.c:start:1436 - Exec'ing "/sbin/init".
      lxc-start 20170716154158.668 NOTICE   lxc_start - start.c:post_start:1447 - Started "/sbin/init" with pid "11136".
      lxc-start 20170716154158.669 NOTICE   lxc_start - start.c:signal_handler:322 - Received SIGCHLD from pid 11121 instead of container init 11136.
      lxc-start 20170716154158.669 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.669 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.669 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.669 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.669 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.669 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.669 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.669 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.669 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.669 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.669 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_rsp_recv:203 - command get_state response data length is 0
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_get_state:586 - Container "ubuntu2" is in "RUNNING" state.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.670 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.671 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.
      lxc-start 20170716154158.671 DEBUG    lxc_commands - commands.c:lxc_cmd_rsp_recv:203 - command get_state response data length is 0
      lxc-start 20170716154158.671 DEBUG    lxc_commands - commands.c:lxc_cmd_get_state:586 - Container "ubuntu2" is in "RUNNING" state.
      lxc-start 20170716154158.671 DEBUG    lxc_commands - commands.c:lxc_cmd_handler:901 - Peer has disconnected.

lxc-console -n ubuntu2 -l trace -o ubuntu-console.log

    lxc-console 20170716154431.322 WARN     lxc_confile - confile.c:config_pivotdir:1916 - lxc.pivotdir is ignored.  It will soon become an error.
    lxc-console 20170716154431.322 DEBUG    lxc_commands - commands.c:lxc_cmd_rsp_recv:203 - command get_init_pid response data length is 0
    lxc-console 20170716154431.323 DEBUG    lxc_commands - commands.c:lxc_cmd_rsp_recv:203 - command get_state response data length is 0
    lxc-console 20170716154431.323 DEBUG    lxc_commands - commands.c:lxc_cmd_get_state:586 - Container "ubuntu2" is in "RUNNING" state.
    lxc-console 20170716154431.323 DEBUG    lxc_commands - commands.c:lxc_cmd_rsp_recv:203 - command console response data length is 0
    lxc-console 20170716154431.323 INFO     lxc_commands - commands.c:lxc_cmd_console:736 - tty 1 allocated fd 5 sock 4.
    lxc-console 20170716154431.324 INFO     console - console.c:lxc_console:690 - already group leader
    lxc-console 20170716154431.324 DEBUG    console - console.c:lxc_console_sigwinch_init:144 - 11388 got SIGWINCH fd 6
    lxc-console 20170716154431.324 DEBUG    console - console.c:lxc_console_winsz:71 - set winsz dstfd:5 cols:160 rows:41
    lxc-console 20170716154431.324 DEBUG    lxc_commands - commands.c:lxc_cmd_rsp_recv:203 - command (null) response data length is 0

@itoffshore
Copy link
Contributor Author

@itoffshore
Copy link
Contributor Author

for comparison these are similar logs from an Alpine Linux container that starts ok:

alpine-start.txt
alpine-console.txt

@brauner
Copy link
Member

brauner commented Jul 17, 2017

Cheers, not that I'm currently in the middle of a big chunk of work in LXD so this will have to sit for a bit. Sorry about that. I'll definitely come back to this!

@itoffshore
Copy link
Contributor Author

ok no problem

@Chetan21
Copy link

Chetan21 commented Sep 8, 2017

Facing the same issue

@brauner
Copy link
Member

brauner commented Sep 8, 2017

@itoffshore, @Chetan21, can you try and reproduce this behavior with LXC 2.1 and report back, please. If the problem persists please don't forget to append the logs with -l trace -o <container>.log for both lxc-start and lxc-console.

@Chetan21
Copy link

Chetan21 commented Sep 8, 2017

NVM.. I could not reproduce. But, in general, there seems to be a lot of problems with CentOS LXC containers. Switched to debian containers, works well!

@Chetan21
Copy link

Chetan21 commented Sep 8, 2017

Steps followed for that error, were exact as mentioned by @itoffshore in previous comments on updated LXC 2.1 version.

@brauner
Copy link
Member

brauner commented Sep 8, 2017

@Chetan21, but you were unable to reproduce?

@itoffshore
Copy link
Contributor Author

I still have the same errors with lxc 2.1 using ubuntu / centos containers under OpenRC:

centos-start.txt
centos-console.txt

ubuntu-start.txt
ubuntu-console.txt

@brauner
Copy link
Member

brauner commented Sep 20, 2017

Right, I think the explanation is rather simple. Can you show me the full process tree for one of those containers that don't allow for proper lxc-console as seen from inside the container?

@itoffshore
Copy link
Contributor Author

I'm able to lxc-attach but not much more than that:

                              groups: cannot find name for group ID 19
root@ubuntu:/# pstree
bash: pstree: command not found
root@ubuntu:/# ps auxf
bash: ps: command not found
root@ubuntu:/# which ps
root@ubuntu:/# ls /bin/ps
bash: ls: command not found
root@ubuntu:/# 

@brauner
Copy link
Member

brauner commented Sep 20, 2017

That looks like you're not using lxc-attach --clear-env -n <container-name> when attaching to the container. Please try again. If that doesn't work, try passing the full path directly /bin/ps auxf.

Can you please also show:

  • cat /proc/self/cgroup
  • cat /proc/1/mountinfo | grep cgroup

from the host.

@itoffshore
Copy link
Contributor Author

ssh should have started inside the container - I was able to start it manually & login.

root@ubuntu:/#  /bin/ps auxf
USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         20  0.0  0.0  18308  3452 ?        Ss   17:13   0:00 /bin/bash
root         32  0.0  0.0  34660  2936 ?        R+   17:14   0:00  \_ /bin/ps auxf
root          1  0.0  0.0  54048  2856 ?        Ss   16:35   0:00 /sbin/init

[stuart@manjaro ~]$ cat /proc/self/cgroup
10:pids:/
9:net_cls:/
8:freezer:/
7:devices:/
6:memory:/
5:blkio:/
4:cpuacct:/
3:cpu:/
2:cpuset:/
1:name=openrc:/c1

[stuart@manjaro ~]$ cat /proc/1/mountinfo | grep cgroup
29 18 0:24 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs cgroup_root rw,size=10240k,mode=755
30 29 0:25 / /sys/fs/cgroup/openrc rw,nosuid,nodev,noexec,relatime - cgroup openrc rw,release_agent=/usr/lib/openrc/sh/cgroup-release-agent.sh,name=openrc
31 29 0:26 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime - cgroup cpuset rw,cpuset,clone_children
32 29 0:27 / /sys/fs/cgroup/cpu rw,nosuid,nodev,noexec,relatime - cgroup cpu rw,cpu
33 29 0:28 / /sys/fs/cgroup/cpuacct rw,nosuid,nodev,noexec,relatime - cgroup cpuacct rw,cpuacct
34 29 0:29 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime - cgroup blkio rw,blkio
35 29 0:30 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime - cgroup memory rw,memory
36 29 0:31 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime - cgroup devices rw,devices
37 29 0:32 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime - cgroup freezer rw,freezer
38 29 0:33 / /sys/fs/cgroup/net_cls rw,nosuid,nodev,noexec,relatime - cgroup net_cls rw,net_cls
39 29 0:34 / /sys/fs/cgroup/pids rw,nosuid,nodev,noexec,relatime - cgroup pids rw,pids

@brauner
Copy link
Member

brauner commented Sep 20, 2017

For the systemd container the systemd cgroup is missing that's why it won't start:

sudo mkdir /sys/fs/cgroup/systemd
sudo mount -t cgroup -o rw,nosuid,nodev,noexec,relatime,none,name=systemd cgroup /sys/fs/cgroup/systemd

and start the systemd container again.

@itoffshore
Copy link
Contributor Author

Yes that fixed it - thanks ever so much for looking at this issue.

Should this functionality be part of lxc or do I need to raise a bug with OpenRC ?

@brauner
Copy link
Member

brauner commented Sep 20, 2017

liblxc doesn't care what runs inside the container at all so it won't know whether it needs to create the cgroup in question or not. openrc will likely not want to have a name=systemd cgroup controller. So your best bet is to have a little script or fstab entry that creates the cgroup hierarchy for the systemd controller. You could check how openrc sets up cgroups maybe you just need to tweak a script or something.

@brauner brauner closed this as completed Sep 20, 2017
algitbot pushed a commit to alpinelinux/aports that referenced this issue Nov 26, 2017
* systemd based containers require the /sys/fs/cgroup/systemd cgroup
  for lxc-console and services inside the containers to work

* systemd_ctr() based on recommendations from lxc:

lxc/lxc#1704 (comment)

Committer note: I did few minor modifications.
@2p4b
Copy link

2p4b commented Apr 9, 2018

Having the same issue with systemd cgroup present
same steps to reproduce as @itoffshore except the host system in the case is Arch linux

 madara@susanoo  ~  uname -r
4.15.15-1-ARCH

 madara@susanoo  ~  pacman -Q | grep lxc
lxc 1:3.0.0-1

 madara@susanoo  ~  cat /proc/self/cgroup
12:perf_event:/
11:pids:/user.slice/user-1000.slice/session-c2.scope
10:rdma:/
9:devices:/user.slice
8:hugetlb:/
7:cpuset:/
6:freezer:/
5:blkio:/
4:net_cls,net_prio:/
3:cpu,cpuacct:/
2:memory:/user.slice/user-1000.slice/session-c2.scope
1:name=systemd:/user.slice/user-1000.slice/session-c2.scope
0::/user.slice/user-1000.slice/session-c2.scope



 madara@susanoo  ~  cat /proc/1/mountinfo | grep cgroup
27 20 0:23 / /sys/fs/cgroup ro,nosuid,nodev,noexec shared:8 - tmpfs tmpfs ro,mode=755
28 27 0:24 / /sys/fs/cgroup/unified rw,nosuid,nodev,noexec,relatime shared:9 - cgroup2 cgroup2 rw,nsdelegate
29 27 0:25 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime shared:10 - cgroup cgroup rw,xattr,name=systemd
32 27 0:28 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime shared:14 - cgroup cgroup rw,memory
33 27 0:29 / /sys/fs/cgroup/cpu,cpuacct rw,nosuid,nodev,noexec,relatime shared:15 - cgroup cgroup rw,cpu,cpuacct
34 27 0:30 / /sys/fs/cgroup/net_cls,net_prio rw,nosuid,nodev,noexec,relatime shared:16 - cgroup cgroup rw,net_cls,net_prio
35 27 0:31 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime shared:17 - cgroup cgroup rw,blkio
36 27 0:32 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime shared:18 - cgroup cgroup rw,freezer
37 27 0:33 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime shared:19 - cgroup cgroup rw,cpuset
38 27 0:34 / /sys/fs/cgroup/hugetlb rw,nosuid,nodev,noexec,relatime shared:20 - cgroup cgroup rw,hugetlb
39 27 0:35 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime shared:21 - cgroup cgroup rw,devices
40 27 0:36 / /sys/fs/cgroup/rdma rw,nosuid,nodev,noexec,relatime shared:22 - cgroup cgroup rw,rdma
41 27 0:37 / /sys/fs/cgroup/pids rw,nosuid,nodev,noexec,relatime shared:23 - cgroup cgroup rw,pids
42 27 0:38 / /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime shared:24 - cgroup cgroup rw,perf_event


 madara@susanoo  ~  sudo lxc-attach -P /home/madara/containers -n ubuntu -l trace -o ubuntu-console.log


[sudo] password for madara: 
groups: cannot find name for group ID 19
root@ubuntu:/# ls
bash: ls: command not found
root@ubuntu:/# 

@2p4b
Copy link

2p4b commented Apr 9, 2018

ubuntu-console.log

@2p4b
Copy link

2p4b commented Apr 9, 2018

The $PATH seams okay from the lxc-console


Ubuntu 14.04.5 LTS ubuntu tty1

ubuntu login: root
Password: 
Last login: Mon Apr  9 04:06:38 UTC 2018 on lxc/tty1
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.15.15-1-ARCH i686)

 * Documentation:  https://help.ubuntu.com/
root@ubuntu:~# pstree
-bash: pstree: command not found
root@ubuntu:~# ps auxf
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.1  0.0   4072  3376 ?        Ss   04:12   0:00 /sbin/init
root       506  0.0  0.0   2884   156 ?        S    04:12   0:00 upstart-socket-bridge --daemon
root      1355  0.0  0.0   3028   132 ?        S    04:12   0:00 upstart-udev-bridge --daemon
root      1361  0.0  0.0   9912  2908 ?        Ss   04:12   0:00 /lib/systemd/systemd-udevd --daemon
syslog    1425  0.0  0.0  30488  2780 ?        Ssl  04:12   0:00 rsyslogd
root      1431  0.0  0.0   2896   152 ?        S    04:12   0:00 upstart-file-bridge --daemon
root      1472  0.0  0.0   2432  1760 lxc/tty4 Ss+  04:14   0:00 /sbin/getty -8 38400 tty4
root      1474  0.0  0.0   2432  1912 lxc/tty2 Ss+  04:14   0:00 /sbin/getty -8 38400 tty2
root      1475  0.0  0.0   2432  1908 lxc/tty3 Ss+  04:14   0:00 /sbin/getty -8 38400 tty3
root      1486  0.0  0.0   3064  2168 ?        Ss   04:14   0:00 cron
root      1524  0.0  0.0   2432  1912 console  Ss+  04:14   0:00 /sbin/getty -8 38400 console
root      1526  0.0  0.0   3660  2704 lxc/tty1 Ss   04:14   0:00 /bin/login --     
root      1549  0.0  0.0   5676  3464 lxc/tty1 S    04:14   0:00  \_ -bash
root      1561  0.0  0.0   5228  2364 lxc/tty1 R+   04:16   0:00      \_ ps auxf

root@ubuntu:~# ls

root@ubuntu:~# pwd
/root

root@ubuntu:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

@2p4b
Copy link

2p4b commented Apr 9, 2018

Same "group error" output with the prebuilt Ubuntu image using the download template.
No such errors with custom Debian buster containers.

Systemd started normally on the Ubuntu container and nothing seams broken but yet, interfacing with the containers from python seams fine. I cant figure out why the group ID 19 cannot be found or need

 madara@susanoo  ~  sudo lxc-attach -P /home/madara/containers -n ubuntu 
[sudo] password for madara: 
groups: cannot find name for group ID 19
root@ubuntu:/# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

@brauner
Copy link
Member

brauner commented Apr 9, 2018

What happens if you do

sudo lxc-attach --clear-env -P /home/madara/containers -n ubuntu

@2p4b
Copy link

2p4b commented Apr 9, 2018

@brauner same "group error"

 madara@susanoo  ~  sudo lxc-start -P /home/madara/containers -n ubuntu
[sudo] password for madara: 
 madara@susanoo  ~  sudo lxc-info -P /home/madara/containers -n ubuntu
Name:           ubuntu
State:          RUNNING
PID:            4946
CPU use:        1.48 seconds
BlkIO use:      104.00 KiB
Memory use:     6.95 MiB
KMem use:       4.44 MiB
 madara@susanoo  ~  sudo lxc-attach --clear-env -P /home/madara/containers -n ubuntu
groups: cannot find name for group ID 19
root@ubuntu:/# 

@brauner
Copy link
Member

brauner commented Apr 9, 2018

The warning about the gid is not really an issue. I might send a small fix though once I've convinced myself that this is the right thing to do. :)

brauner pushed a commit to brauner/lxc that referenced this issue Apr 9, 2018
Closes lxc#1704.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
brauner pushed a commit that referenced this issue Apr 20, 2018
Closes #1704.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Blub pushed a commit to Blub/lxc that referenced this issue Jul 2, 2018
Closes lxc#1704.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
geaaru pushed a commit to geaaru/lxc that referenced this issue Jul 4, 2018
Closes lxc#1704.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants