weixin_39860732
weixin_39860732
2021-01-07 08:57

lxd bridge is missing

Required information

  • Distribution: Linux <> 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  • LXC version: 2.13
  • The output of "lxc info" - put below
  • LXD version: 2.13
  • Storage backend in use: dir

Issue description

lxd-bridge is missing and can't be started. I'd like to start lxd/bridge on a single machine for OpenStack testing.

$ service lxd-bridge status ● lxd-bridge.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead) $ sudo service lxc-net status ● lxc-net.service - LXC network bridge setup Loaded: loaded (/lib/systemd/system/lxc-net.service; enabled; vendor preset: enabled) Active: active (exited) since Fri 2017-05-05 15:48:56 EDT; 21min ago Main PID: 1333 (code=exited, status=0/SUCCESS) Tasks: 1 Memory: 1.0M CPU: 31ms CGroup: /system.slice/lxc-net.service └─1416 dnsmasq -u lxc-dnsmasq --strict-order --bind-interfaces --pid-file=/run/lxc/dnsmasq.pid --listen-address 10.0.1.1 --dhcp-range 10.0.1.2,10.0.1.254 --dhcp-lease

May 05 15:48:56 systemd[1]: Starting LXC network bridge setup... May 05 15:48:56 dnsmasq[1416]: started, version 2.75 cachesize 150 May 05 15:48:56 dnsmasq[1416]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify May 05 15:48:56 dnsmasq-dhcp[1416]: DHCP, IP range 10.0.1.2 -- 10.0.1.254, lease time 1h May 05 15:48:56 dnsmasq-dhcp[1416]: DHCP, sockets bound exclusively to interface lxcbr0 May 05 15:48:56 dnsmasq[1416]: no servers found in /etc/resolv.conf, will retry May 05 15:48:56 dnsmasq[1416]: read /etc/hosts - 7 addresses May 05 15:48:56 systemd[1]: Started LXC network bridge setup. May 05 15:48:58 dnsmasq[1416]: reading /etc/resolv.conf May 05 15:48:58 dnsmasq[1416]: using nameserver 127.0.1.1#53

Steps to reproduce

Not sure. I think that the lxd-bridge service was either never created or was deleted and at this point I am not sure how to fix it.

Information to attach

$ lxc info config: core.https_address: '[::]:8443' api_extensions: - storage_zfs_remove_snapshots - container_host_shutdown_timeout - container_syscall_filtering - auth_pki - container_last_used_at - etag - patch - usb_devices - https_allowed_credentials - image_compression_algorithm - directory_manipulation - container_cpu_time - storage_zfs_use_refquota - storage_lvm_mount_options - network - profile_usedby - container_push - container_exec_recording - certificate_update - container_exec_signal_handling - gpu_devices - container_image_properties - migration_progress - id_map - network_firewall_filtering - network_routes - storage - file_delete - file_append - network_dhcp_expiry - storage_lvm_vg_rename - storage_lvm_thinpool_rename - network_vlan - image_create_aliases - container_stateless_copy - container_only_migration - storage_zfs_clone_copy - unix_device_rename - storage_lvm_use_thinpool - storage_rsync_bwlimit - network_vxlan_interface api_status: stable api_version: "1.0" auth: trusted public: false environment: addresses: - 10.0.0.43:8443 - '[2601:82:202:94b3::d6a2]:8443' - '[2601:82:202:94b3:4c62:94cb:5956:2acf]:8443' - '[2601:82:202:94b3:40e6:d438:5cd3:4b3e]:8443' - 10.99.0.1:8443 - 10.0.1.1:8443 - 192.168.122.1:8443 - 172.17.0.1:8443 - 10.122.77.1:8443 - '[fd42:968b:2345:3e93::1]:8443' - 10.109.125.1:8443 - '[fd42:759:a6dd:8929::1]:8443' architectures: - x86_64 - i686 certificate: | -----BEGIN CERTIFICATE----- removed -----END CERTIFICATE----- certificate_fingerprint: removed driver: lxc driver_version: 2.0.7 kernel: Linux kernel_architecture: x86_64 kernel_version: 4.4.0-53-generic server: lxd server_pid: 8271 server_version: "2.13" storage: dir storage_version: "1"

该提问来源于开源项目:lxc/lxd

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

11条回答

  • weixin_39860732 weixin_39860732 4月前

    When I try to run openstack/Nova-LXD, I get the 'There is no LXD Bridge found on your system which usually means this is your first time running LXD' error.

    If you drop out to start the service you get

    
    Warning: Stopping lxd-service, but it can still be activated by:
      ld.socket
    Failed to start lxd-bridge.service: Unit lxd-bridge.service not found
    

    and indeed if you try to start the service manually:

    
    systemctl start lxd-bridge
    ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
    Authentication is required to start 'lxd-bridge.service'.
    Authenticating as: ....
    Password:
    ==== AUTHENTICATION COMPLETE ===
    Failed to start lxd-bridge.service: Unit lxd-bridge.service not found.
    
    
    $ service lxd-bridge status
    ● lxd-bridge.service
       Loaded: not-found (Reason: No such file or directory)
       Active: inactive (dead)
    

    I have done some experiments with lxdbr0, lxcbr0 and testbr0 along the way.

    点赞 评论 复制链接分享
  • weixin_39688875 weixin_39688875 4月前

    ah, that's probably because juju or conjure-up or whatever you use for OpenStack is expecting Ubuntu 16.04 with LXD 2.0 and doesn't know what to do with newer LXD releases.

    The right course of action there would be to file a bug against those, as you clearly do have bridges that are created on your system :)

    点赞 评论 复制链接分享
  • weixin_39860732 weixin_39860732 4月前

    OK, I will look into bug reports at OpenStack, is the bridge service only created, config'd and started after a container is started? I.e. there isn't a general lxd-bridge service that should be running.

    Would you recommend for now that I downgrade to 2.0? Yes using conjure-up.

    点赞 评论 复制链接分享
  • weixin_39688875 weixin_39688875 4月前

    The "lxd-bridge" service was deprecated and removed with LXD 2.3 as can be seen on your system by its "not-found" status.

    LXD doesn't support downgrades due to its database. So your only option there would be to remove it and install LXD 2.0 (currently 2.0.9) which should then work fine with conjure-up.

    点赞 评论 复制链接分享
  • weixin_39688875 weixin_39688875 4月前
    点赞 评论 复制链接分享
  • weixin_39615499 weixin_39615499 4月前

    please file a bug at https://github.com/conjure-up/conjure-up. And close this issue out.

    点赞 评论 复制链接分享
  • weixin_39860732 weixin_39860732 4月前

    Just submitted the bug to: https://github.com/conjure-up/conjure-up/issues/866 and I will close this as its a conjure-up bug. Thanks All!

    点赞 评论 复制链接分享
  • weixin_39903176 weixin_39903176 4月前

    So newer LXD instances don't come with a systemd service file to setup a network bridge anymore. Instead, we have a network API which allows you to create and administer network devices with the lxc network command. Can you please show the output of lxc network list and ip addr?

    点赞 评论 复制链接分享
  • weixin_39860732 weixin_39860732 4月前

    Why of course! thanks.

    inet connection is wireless.

    $ lxc network list

    
    +------------+----------+---------+---------+
    |    NAME    |   TYPE   | MANAGED | USED BY |
    +------------+----------+---------+---------+
    | docker0    | bridge   | NO      | 0       |
    +------------+----------+---------+---------+
    | enp10s0    | physical | NO      | 0       |
    +------------+----------+---------+---------+
    | lxcbr0     | bridge   | NO      | 0       |
    +------------+----------+---------+---------+
    | lxdbr0     | bridge   | YES     | 0       |
    +------------+----------+---------+---------+
    | openstack0 | bridge   | NO      | 0       |
    +------------+----------+---------+---------+
    | testbr0    | bridge   | YES     | 1       |
    +------------+----------+---------+---------+
    | virbr0     | bridge   | NO      | 0       |
    +------------+----------+---------+---------+
    | wlp8s0     | physical | NO      | 0       |
    +------------+----------+---------+---------+
    

    $ ip addr

    
    1: lo: <loopback> 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 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: enp10s0: <no-carrier> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
        link/ether 70:85:c2:3a:18:df brd ff:ff:ff:ff:ff:ff
    3: wlp8s0: <broadcast> mtu 1500 qdisc mq state UP group default qlen 1000
        link/ether 68:1c:a2:07:58:74 brd ff:ff:ff:ff:ff:ff
        inet 10.0.0.43/24 brd 10.0.0.255 scope global dynamic wlp8s0
           valid_lft 601326sec preferred_lft 601326sec
        inet6 2601:82:202:94b3::d6a2/128 scope global dynamic
           valid_lft 601328sec preferred_lft 601328sec
        inet6 2601:82:202:94b3:4c62:94cb:5956:2acf/64 scope global temporary dynamic
           valid_lft 598sec preferred_lft 298sec
        inet6 2601:82:202:94b3:40e6:d438:5cd3:4b3e/64 scope global mngtmpaddr noprefixroute dynamic
           valid_lft 598sec preferred_lft 298sec
        inet6 fe80::7278:37e2:85a4:1a73/64 scope link
           valid_lft forever preferred_lft forever
    4: openstack0: <broadcast> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
        link/ether 92:4a:ac:bd:f5:b8 brd ff:ff:ff:ff:ff:ff
        inet 10.99.0.1/24 scope global openstack0
           valid_lft forever preferred_lft forever
        inet6 fe80::904a:acff:febd:f5b8/64 scope link
           valid_lft forever preferred_lft forever
    5: lxcbr0: <no-carrier> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
        link/ether 00:16:3e:00:00:00 brd ff:ff:ff:ff:ff:ff
        inet 10.0.1.1/24 scope global lxcbr0
           valid_lft forever preferred_lft forever
    6: virbr0: <no-carrier> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
        link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
        inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
           valid_lft forever preferred_lft forever
    7: virbr0-nic: <broadcast> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
        link/ether 52:54:00:1b:b4:28 brd ff:ff:ff:ff:ff:ff
    8: docker0: <no-carrier> mtu 1500 qdisc noqueue state DOWN group default
        link/ether 02:42:aa:97:ec:14 brd ff:ff:ff:ff:ff:ff
        inet 172.17.0.1/16 scope global docker0
           valid_lft forever preferred_lft forever
    9: lxdbr0: <broadcast> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
        link/ether 1a:1a:27:fe:43:6d brd ff:ff:ff:ff:ff:ff
        inet 10.122.77.1/24 scope global lxdbr0
           valid_lft forever preferred_lft forever
        inet6 fd42:968b:2345:3e93::1/64 scope global
           valid_lft forever preferred_lft forever
        inet6 fe80::181a:27ff:fefe:436d/64 scope link
           valid_lft forever preferred_lft forever
    10: testbr0: <broadcast> mtu 1500 qdisc noqueue state UP group default qlen 1000
        link/ether fe:ea:35:ed:c7:b4 brd ff:ff:ff:ff:ff:ff
        inet 10.109.125.1/24 scope global testbr0
           valid_lft forever preferred_lft forever
        inet6 fd42:759:a6dd:8929::1/64 scope global
           valid_lft forever preferred_lft forever
        inet6 fe80::24e8:9eff:fe04:cfc5/64 scope link
           valid_lft forever preferred_lft forever
    12: vethG9R8AE: <broadcast> mtu 1500 qdisc noqueue master testbr0 state UP group default qlen 1000
        link/ether fe:ea:35:ed:c7:b4 brd ff:ff:ff:ff:ff:ff link-netnsid 0
        inet6 fe80::fcea:35ff:feed:c7b4/64 scope link
           valid_lft forever preferred_lft forever
    
    </broadcast></broadcast></broadcast></no-carrier></broadcast></no-carrier></no-carrier></broadcast></broadcast></no-carrier></loopback>
    点赞 评论 复制链接分享
  • weixin_39903176 weixin_39903176 4月前

    As you can see from the lxc network list output you have lxdbr0 configured and set up. Is that all you wanted?

    点赞 评论 复制链接分享
  • weixin_39688875 weixin_39688875 4月前

    Right, lxc network list says you should have "lxdbr0" and "testbr0" as LXD-managed bridges, both of those show up in your "ip link show" so I'm confused as to what the problem is :)

    点赞 评论 复制链接分享

相关推荐