Bug 32423 - Не стартует контейнер
Summary: Не стартует контейнер
Status: CLOSED NOTABUG
Alias: None
Product: Branch p8
Classification: Distributions
Component: lxc (show other bugs)
Version: не указана
Hardware: all Linux
: P3 normal
Assignee: Denis Pynkin
QA Contact: qa-p8@altlinux.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-24 11:59 MSK by Юрий Лепихин
Modified: 2016-09-01 21:35 MSK (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Юрий Лепихин 2016-08-24 11:59:29 MSK
root@comp-core-i5-4200u-b809f7 ~]# lxc-start -n test 
lxc-start: tools/lxc_start.c: main: 344 The container failed to start.
lxc-start: tools/lxc_start.c: main: 346 To get more details, run the container in foreground mode.
lxc-start: tools/lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 14:58:d0:b8:09:f7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.102/24 brd 192.168.0.255 scope global dynamic enp0s25
       valid_lft 6829sec preferred_lft 6829sec
    inet6 fe80::6b10:8942:183:a756/64 scope link 
       valid_lft forever preferred_lft forever
3: wlo1: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DORMANT group default qlen 1000
    link/ether 18:cf:5e:fb:f1:0f brd ff:ff:ff:ff:ff:ff

[root@comp-core-i5-4200u-b809f7 ~]# systemctl status net
Failed to dump process list, ignoring: Unit net.service not found.
● net.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

[root@comp-core-i5-4200u-b809f7 ~]# cat /etc/lxc/default.conf
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:xx:xx:xx

[root@comp-core-i5-4200u-b809f7 ~]# cat /etc/sysconfig/lxc-net
# Leave USE_LXC_BRIDGE as "true" if you want to use lxcbr0 for your
# containers.  Set to "false" if you'll use virbr0 or another existing
# bridge, or mavlan to your host's NIC.
USE_LXC_BRIDGE="true"

# If you change the LXC_BRIDGE to something other than lxcbr0, then
# you will also need to update your /etc/lxc/default.conf as well as the
# configuration (/var/lib/lxc/<container>/config) for any containers
# already created using the default config to reflect the new bridge
# name.
# If you have the dnsmasq daemon installed, you'll also have to update
# /etc/dnsmasq.d/lxc and restart the system wide dnsmasq daemon.
LXC_BRIDGE="lxcbr0"
LXC_ADDR="10.101.101.1"
LXC_NETMASK="255.255.255.0"
LXC_NETWORK="10.101.101.0/24"
LXC_DHCP_RANGE="10.101.101.2,10.101.101.254"
LXC_DHCP_MAX="253"
# Uncomment the next line if you'd like to use a conf-file for the lxcbr0
# dnsmasq.  For instance, you can use 'dhcp-host=mail1,10.0.3.100' to have
# container 'mail1' always get ip address 10.0.3.100.
#LXC_DHCP_CONFILE=/etc/lxc/dnsmasq.conf

# Uncomment the next line if you want lxcbr0's dnsmasq to resolve the .lxc
# domain.  You can then add "server=/lxc/10.101.101.1' (or your actual )
# to /etc/dnsmasq.conf, after which 'container1.lxc' will resolve on your
# host.
#LXC_DOMAIN="lxc"
Comment 1 Юрий Лепихин 2016-08-26 13:05:29 MSK
Денис, зравствуйте.
Я всё, что Вы просили, выложил. Есть какие-то соображения?
Comment 2 Denis Pynkin 2016-09-01 01:36:09 MSK
(В ответ на комментарий №1)
> Денис, зравствуйте.
> Я всё, что Вы просили, выложил. Есть какие-то соображения?

Пожалуйста, вывод команды:
systemctl status lxc-net

у вас, похоже, либо не стартовал сервис(скрипт) lxc-net, который отвечает за создание моста lxcbr0, либо сломался.

В первом случае достаточно запустить:
systemctl enable lxc-net
systemctl start lxc-net

Во втором случае было бы интересно разобраться.

PS Прошу прощения за задержку. По LXC/LXD баги лучше на Sisyphus вешать, тогда нотификация сразу приходит ко мне.
Comment 3 Юрий Лепихин 2016-09-01 15:16:41 MSK
Денис, спасибо.
Запустил сервис и всё заработало.
Comment 4 Denis Pynkin 2016-09-01 21:35:55 MSK
Не за что, обращайтесь.