Bug 35705 - неправильная настройка конфига бриджа LXD
Summary: неправильная настройка конфига бриджа LXD
Status: NEW
Alias: None
Product: Branch p8
Classification: Distributions
Component: lxd (show other bugs)
Version: не указана
Hardware: all Linux
: P3 normal
Assignee: Denis Pynkin
QA Contact: qa-p8@altlinux.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-03 14:49 MSK by manofring
Modified: 2018-12-03 15:54 MSK (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description manofring 2018-12-03 14:49:07 MSK
по указанному пути конфиг не лежит соответсвенно бридж не поднимается

[root@alt-lxd ~]# ls -1 /lib/systemd/system | grep lxd-bridge
lxd-bridge.service

[root@alt-lxd ~]# cat /lib/systemd/system/lxd-bridge.service | grep lxd-bridge
ExecStart=/usr/lib/lxd/lxd-bridge start
ExecStop=/usr/lib/lxd/lxd-bridge stop

[root@alt-lxd system]# head /usr/lib/lxd/lxd-bridge | grep config
config="/etc/sysconfig/lxd-bridge"
[root@alt-lxd system]# ls -1 /etc/sysconfig/ | grep lxd
lxd

[root@alt-lxd ~]# ls -1 /etc/sysconfig/lxd-bridge
ls: cannot access '/etc/sysconfig/lxd-bridge': No such file or directory

Workaround

cp /etc/sysconfig/lxd /etc/sysconfig/lxd-bridge
sed -i 's/#LXD_IPV4/LXD_IPV4/g' /etc/sysconfig/lxd-bridge
sed -i 's/192.168.2.0/192.168.2.0\/24/' /etc/sysconfig/lxd-bridge
systemctl enable lxd-bridge;systemct start lxd-bridge


[root@alt-lxd ~]# ip a s lxdbr0
4: lxdbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 46:2b:06:4f:c0:85 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.1/24 scope global lxdbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::442b:6ff:fe4f:c085/64 scope link
       valid_lft forever preferred_lft forever
    inet6 fe80::1/64 scope link
       valid_lft forever preferred_lft forever
[root@alt-lxd ~]# iptables -L -n -v
Chain INPUT (policy ACCEPT 142 packets, 17345 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     tcp  --  lxdbr0 *       0.0.0.0/0            0.0.0.0/0            tcp dpt:53
    0     0 ACCEPT     udp  --  lxdbr0 *       0.0.0.0/0            0.0.0.0/0            udp dpt:53
    0     0 ACCEPT     tcp  --  lxdbr0 *       0.0.0.0/0            0.0.0.0/0            tcp dpt:67
    0     0 ACCEPT     udp  --  lxdbr0 *       0.0.0.0/0            0.0.0.0/0            udp dpt:67

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  *      lxdbr0  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  lxdbr0 *       0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT 51 packets, 9856 bytes)
 pkts bytes target     prot opt in     out     source               destination
[root@alt-lxd ~]# iptables -L -n -v -t nat
Chain PREROUTING (policy ACCEPT 215 packets, 26282 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain INPUT (policy ACCEPT 67 packets, 5685 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 3 packets, 815 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 1 packets, 136 bytes)
 pkts bytes target     prot opt in     out     source               destination
    2   679 MASQUERADE  all  --  *      *       192.168.2.0/24      !192.168.2.0/24