Bug 32391 - lxc-create -t altlinux не отрабатывает
Summary: lxc-create -t altlinux не отрабатывает
Status: CLOSED FIXED
Alias: None
Product: Branch p8
Classification: Distributions
Component: lxc (show other bugs)
Version: не указана
Hardware: all Linux
: P3 normal
Assignee: Andrey Cherepanov
QA Contact: qa-p8@altlinux.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-18 14:45 MSK by Michael Shigorin
Modified: 2016-08-26 13:58 MSK (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Shigorin 2016-08-18 14:45:34 MSK
Пишут, что...

[root@localhost ~]# lxc-create -t altlinux -n test
Checking cache download in /var/cache/lxc/altlinux/x86_64/7.0.5/default/rootfs ...
Downloading altlinux minimal ...
Чтение списков пакетов... Завершено
Построение дерева зависимостей... Завершено
Последняя версия dev-minimal уже установлена.
0 будет обновлено, 0 новых установлено, 0 пакетов будет удалено и 0 не будет обновлено.
Чтение списков пакетов... Завершено
Построение дерева зависимостей... Завершено
Пакет apt-conf-sisyphus присутствует в базе данных, но не имеет доступной версии.
Как правило это означает, что хотя пакет упоминается в списке зависимостей,
он отсутствует в репозитории, был вытеснен, либо в sources.list нет адреса
E: Для пакета apt-conf-sisyphus не найдено подходящего кандидата для установки
Failed to download the rootfs, aborting.
Failed to download 'altlinux base'
failed to install altlinux
lxc-create: lxccontainer.c: create_run_template: 1290 container creation template for test failed
lxc-create: lxc_create.c: main: 316 Error creating container test
Comment 1 Michael Shigorin 2016-08-18 15:26:19 MSK
Пишут, что аналогично и на p8 с поправкой на путь:
-/var/cache/lxc/altlinux/x86_64/7.0.5/default/rootfs
+/var/cache/lxc/altlinux/x86_64/Server/default/rootfs
Comment 2 Denis Pynkin 2016-08-18 22:46:37 MSK
Попробую пофиксить /usr/share/lxc/templates/lxc-altlinux, чтобы он был более универсальным.
Правильно ли я понимаю, что достаточно изменить apt-conf-sisyphus на apt-conf?

В качестве полумеры, которая работает всегда:
mkdir /etc/lxc/profiles
cat <<EOF > /etc/lxc/profiles/p8
interactivesystem
apt apt-conf
etcnet-full
openssh-server 
systemd-sysvinit systemd-units systemd NetworkManager-daemon
EOF
lxc-create -n testalt -t altlinux -- -P p8
Comment 3 Michael Shigorin 2016-08-19 11:24:42 MSK
(В ответ на комментарий №2)
> Правильно ли я понимаю, что достаточно изменить apt-conf-sisyphus на apt-conf?
По идее, да; по крайней мере в m-p вижу так:

pkg.in/lists/tagged/basesystem:apt-conf

> В качестве полумеры, которая работает всегда:
Спасибо, передал.  В коде видел, но не разобрался сходу, куда именно лезет и что там ждёт.
Comment 4 Юрий Лепихин 2016-08-19 13:01:09 MSK
Заменил на apt-conf и сделал apt-get update
После этого контейнер создался, но не запускается:

root@comp-core-i5-4200u-b809f7 templates]# lxc-create -t altlinux -n test
Checking cache download in /var/cache/lxc/altlinux/x86_64/Server/default/rootfs ... 
Cache found. Updating...
Reading Package Lists...
Building Dependency Tree...
Reading Package Lists...
Building Dependency Tree...
0 upgraded, 0 newly installed, 0 removed and 0 not upgraded.
Update finished
Copy /var/cache/lxc/altlinux/x86_64/Server/default/rootfs to /var/lib/lxc/test/rootfs ... 
Copying rootfs to /var/lib/lxc/test/rootfs ...setting root passwd to rooter
container rootfs and config created
network configured as veth in the virbr0
[root@comp-core-i5-4200u-b809f7 templates]# lxc-start -n test 
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 346 To get more details, run the container in foreground mode.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.
[root@comp-core-i5-4200u-b809f7 templates]# 

Что не так?
Comment 5 Юрий Лепихин 2016-08-19 15:18:48 MSK
В логе вот такое сообщение

lxc-start 20160819110425.856 ERROR    lxc_conf - conf.c:instantiate_veth:2594 - failed to attach 'vethKLNC9Y' to the bridge 'lxcbr0': Operation not permitted

Что делать?
Comment 6 Denis Pynkin 2016-08-22 09:20:53 MSK
> lxc-start 20160819110425.856 ERROR    lxc_conf - conf.c:instantiate_veth:2594 -
> failed to attach 'vethKLNC9Y' to the bridge 'lxcbr0': Operation not permitted
> 
> Что делать?

подозреваю, что запустить от рута.
Если не поможет, то данных недостаточно.
Comment 7 Denis Pynkin 2016-08-22 12:18:06 MSK
[#168754] DONE lxc.git=2.0.4-alt1
в сизиф отправлено.

Просьба забрать для p8.
Comment 8 Andrey Cherepanov 2016-08-22 13:19:05 MSK
#168759 AWAITING #1 p8 copy=lxc
Comment 9 Юрий Лепихин 2016-08-23 10:27:26 MSK
Запускал от рута. Какие ещё данные нужны?
Comment 10 Юрий Лепихин 2016-08-23 11:29:03 MSK
Обновил до 2.0.4
Сервер стал "Школьным" сервером.
результат запуска контейнера тот же:

[root@comp-core-i5-4200u-b809f7 lxc]# 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.
[root@comp-core-i5-4200u-b809f7 lxc]# 

содержимое лога:

[root@comp-core-i5-4200u-b809f7 lxc]# cat test.log
      lxc-start 20160823112515.049 ERROR    lxc_conf - conf.c:instantiate_veth:2596 - failed to attach 'vethD2HM24' to the bridge 'lxcbr0': Operation not permitted
      lxc-start 20160823112515.056 ERROR    lxc_conf - conf.c:lxc_create_network:2882 - failed to create netdev
      lxc-start 20160823112515.056 ERROR    lxc_start - start.c:lxc_spawn:1081 - failed to create the network
      lxc-start 20160823112515.056 ERROR    lxc_start - start.c:__lxc_start:1354 - failed to spawn 'test'
      lxc-start 20160823112520.061 ERROR    lxc_start_ui - tools/lxc_start.c:main:344 - The container failed to start.
      lxc-start 20160823112520.061 ERROR    lxc_start_ui - tools/lxc_start.c:main:346 - To get more details, run the container in foreground mode.
      lxc-start 20160823112520.062 ERROR    lxc_start_ui - tools/lxc_start.c:main:348 - Additional information can be obtained by setting the --logfile and --logpriority options.
[root@comp-core-i5-4200u-b809f7 lxc]# 


Что делать?
Comment 11 Denis Pynkin 2016-08-23 17:41:42 MSK
(В ответ на комментарий №10)
> Обновил до 2.0.4
Судя по логу ошибка, заявленная в текущем баге ушла.
Я вас попрошу создать новый баг, поскольку это другая проблема.

> [root@comp-core-i5-4200u-b809f7 lxc]# cat test.log
>       lxc-start 20160823112515.049 ERROR    lxc_conf -
> conf.c:instantiate_veth:2596 - failed to attach 'vethD2HM24' to the bridge
> 'lxcbr0': Operation not permitted

а приведите, для начала, вывод команд:
ip a
systemctl status lxc-net

возможно пригодятся файлы:
/etc/lxc/default.conf
/etc/sysconfig/lxc-net
Comment 12 Andrey Cherepanov 2016-08-26 13:58:28 MSK
(В ответ на комментарий №11)
> (В ответ на комментарий №10)
> > Обновил до 2.0.4
> Судя по логу ошибка, заявленная в текущем баге ушла.
> Я вас попрошу создать новый баг, поскольку это другая проблема.
> 
> > [root@comp-core-i5-4200u-b809f7 lxc]# cat test.log
> >       lxc-start 20160823112515.049 ERROR    lxc_conf -
> > conf.c:instantiate_veth:2596 - failed to attach 'vethD2HM24' to the bridge
> > 'lxcbr0': Operation not permitted
> 
> а приведите, для начала, вывод команд:
> ip a
> systemctl status lxc-net
> 
> возможно пригодятся файлы:
> /etc/lxc/default.conf
> /etc/sysconfig/lxc-net
Создан новый баг с подробностями: https://bugzilla.altlinux.org/show_bug.cgi?id=32423