Cannot create managed network

Hi All,

I have some issue when trying to create managed bridge.

LXD return

Error: Can't parse a version

I was not able to figure out version of what…

LXD is installed from git and run on Armbian Rockchip64 ARM64 device.

Here is the the full command return with --debug

lxc network create lxdbr0 ipv4.address=192.168.88.1/24
DBUG[11-13|23:10:07] Handling API request                     ip=@ username=bot protocol=unix method=GET url=/1.0
DBUG[11-13|23:10:07] WriteJSON
	{
		"type": "sync",
		"status": "Success",
		"status_code": 200,
		"operation": "",
		"error_code": 0,
		"error": "",
		"metadata": {
			"config": {},
			"api_extensions": [
				"storage_zfs_remove_snapshots",
				"container_host_shutdown_timeout",
				"container_stop_priority",
				"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",
				"storage_btrfs_mount_options",
				"entity_description",
				"image_force_refresh",
				"storage_lvm_lv_resizing",
				"id_map_base",
				"file_symlinks",
				"container_push_target",
				"network_vlan_physical",
				"storage_images_delete",
				"container_edit_metadata",
				"container_snapshot_stateful_migration",
				"storage_driver_ceph",
				"storage_ceph_user_name",
				"resource_limits",
				"storage_volatile_initial_source",
				"storage_ceph_force_osd_reuse",
				"storage_block_filesystem_btrfs",
				"resources",
				"kernel_limits",
				"storage_api_volume_rename",
				"macaroon_authentication",
				"network_sriov",
				"console",
				"restrict_devlxd",
				"migration_pre_copy",
				"infiniband",
				"maas_network",
				"devlxd_events",
				"proxy",
				"network_dhcp_gateway",
				"file_get_symlink",
				"network_leases",
				"unix_device_hotplug",
				"storage_api_local_volume_handling",
				"operation_description",
				"clustering",
				"event_lifecycle",
				"storage_api_remote_volume_handling",
				"nvidia_runtime",
				"container_mount_propagation",
				"container_backup",
				"devlxd_images",
				"container_local_cross_pool_handling",
				"proxy_unix",
				"proxy_udp",
				"clustering_join",
				"proxy_tcp_udp_multi_port_handling",
				"network_state",
				"proxy_unix_dac_properties",
				"container_protection_delete",
				"unix_priv_drop",
				"pprof_http",
				"proxy_haproxy_protocol",
				"network_hwaddr",
				"proxy_nat",
				"network_nat_order",
				"container_full",
				"candid_authentication",
				"backup_compression",
				"candid_config",
				"nvidia_runtime_config",
				"storage_api_volume_snapshots",
				"storage_unmapped",
				"projects",
				"candid_config_key",
				"network_vxlan_ttl",
				"container_incremental_copy",
				"usb_optional_vendorid",
				"snapshot_scheduling",
				"snapshot_schedule_aliases",
				"container_copy_project",
				"clustering_server_address",
				"clustering_image_replication",
				"container_protection_shift",
				"snapshot_expiry",
				"container_backup_override_pool",
				"snapshot_expiry_creation",
				"network_leases_location",
				"resources_cpu_socket",
				"resources_gpu",
				"resources_numa",
				"kernel_features",
				"id_map_current",
				"event_location",
				"storage_api_remote_volume_snapshots",
				"network_nat_address",
				"container_nic_routes",
				"rbac",
				"cluster_internal_copy",
				"seccomp_notify",
				"lxc_features",
				"container_nic_ipvlan",
				"network_vlan_sriov",
				"storage_cephfs",
				"container_nic_ipfilter",
				"resources_v2",
				"container_exec_user_group_cwd",
				"container_syscall_intercept",
				"container_disk_shift",
				"storage_shifted",
				"resources_infiniband",
				"daemon_storage",
				"instances",
				"image_types",
				"resources_disk_sata",
				"clustering_roles",
				"images_expiry",
				"resources_network_firmware",
				"backup_compression_algorithm",
				"ceph_data_pool_name",
				"container_syscall_intercept_mount",
				"compression_squashfs",
				"container_raw_mount",
				"container_nic_routed",
				"container_syscall_intercept_mount_fuse",
				"container_disk_ceph",
				"virtual-machines",
				"image_profiles",
				"clustering_architecture",
				"resources_disk_id",
				"storage_lvm_stripes",
				"vm_boot_priority",
				"unix_hotplug_devices",
				"api_filtering",
				"instance_nic_network",
				"clustering_sizing",
				"firewall_driver",
				"projects_limits",
				"container_syscall_intercept_hugetlbfs",
				"limits_hugepages",
				"container_nic_routed_gateway",
				"projects_restrictions",
				"custom_volume_snapshot_expiry",
				"volume_snapshot_scheduling",
				"trust_ca_certificates",
				"snapshot_disk_usage",
				"clustering_edit_roles",
				"container_nic_routed_host_address",
				"container_nic_ipvlan_gateway",
				"resources_usb_pci",
				"resources_cpu_threads_numa",
				"resources_cpu_core_die",
				"api_os",
				"container_nic_routed_host_table",
				"container_nic_ipvlan_host_table",
				"container_nic_ipvlan_mode",
				"resources_system",
				"images_push_relay",
				"network_dns_search",
				"container_nic_routed_limits",
				"instance_nic_bridged_vlan",
				"network_state_bond_bridge",
				"usedby_consistency",
				"custom_block_volumes",
				"clustering_failure_domains",
				"resources_gpu_mdev",
				"console_vga_type",
				"projects_limits_disk",
				"network_type_macvlan",
				"network_type_sriov",
				"container_syscall_intercept_bpf_devices",
				"network_type_ovn",
				"projects_networks",
				"projects_networks_restricted_uplinks",
				"custom_volume_backup",
				"backup_override_name",
				"storage_rsync_compression",
				"network_type_physical",
				"network_ovn_external_subnets",
				"network_ovn_nat",
				"network_ovn_external_routes_remove",
				"tpm_device_type",
				"storage_zfs_clone_copy_rebase",
				"gpu_mdev",
				"resources_pci_iommu",
				"resources_network_usb",
				"resources_disk_address",
				"network_physical_ovn_ingress_mode",
				"network_ovn_dhcp",
				"network_physical_routes_anycast",
				"projects_limits_instances",
				"network_state_vlan",
				"instance_nic_bridged_port_isolation",
				"instance_bulk_state_change",
				"network_gvrp",
				"instance_pool_move",
				"gpu_sriov",
				"pci_device_type",
				"storage_volume_state",
				"network_acl",
				"migration_stateful",
				"disk_state_quota",
				"storage_ceph_features",
				"projects_compression",
				"projects_images_remote_cache_expiry",
				"certificate_project",
				"network_ovn_acl",
				"projects_images_auto_update",
				"projects_restricted_cluster_target",
				"images_default_architecture",
				"network_ovn_acl_defaults",
				"gpu_mig",
				"project_usage",
				"network_bridge_acl",
				"warnings",
				"projects_restricted_backups_and_snapshots",
				"clustering_join_token",
				"clustering_description",
				"server_trusted_proxy",
				"clustering_update_cert",
				"storage_api_project",
				"server_instance_driver_operational",
				"server_supported_storage_drivers",
				"event_lifecycle_requestor_address",
				"resources_gpu_usb",
				"clustering_evacuation",
				"network_ovn_nat_address",
				"network_bgp",
				"network_forward",
				"custom_volume_refresh",
				"network_counters_errors_dropped",
				"metrics",
				"image_source_project",
				"clustering_config",
				"network_peer",
				"linux_sysctl",
				"network_dns",
				"ovn_nic_acceleration"
			],
			"api_status": "stable",
			"api_version": "1.0",
			"auth": "trusted",
			"public": false,
			"auth_methods": [
				"tls"
			],
			"environment": {
				"addresses": [],
				"architectures": [
					"aarch64",
					"armv7l"
				],
				"certificate": "-----BEGIN CERTIFICATE-----\nMIICADCCAYegAwIBAgIRAIj0Nk1S+1QNgfSdC9kj3XQwCgYIKoZIzj0EAwMwMzEc\nMBoGA1UEChMTbGludXhjb250YWluZXJzLm9yZzETMBEGA1UEAwwKcm9vdEBrb2Jv\nbDAeFw0yMTA1MjMwMjIxMzVaFw0zMTA1MjEwMjIxMzVaMDMxHDAaBgNVBAoTE2xp\nbnV4Y29udGFpbmVycy5vcmcxEzARBgNVBAMMCnJvb3RAa29ib2wwdjAQBgcqhkjO\nPQIBBgUrgQQAIgNiAASnP3/NR/WCCdJWZFZJKEWlC8HzRFelgxyGHuxiCMOsj2+q\nju0iacodCMxdUg2PhB/5a+ip83ECAVhm7dHaGFV6jHZV/H0lLMgnz/cR+f2md3hh\nCofQp5XfgA+AmN446w+jXzBdMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggr\nBgEFBQcDATAMBgNVHRMBAf8EAjAAMCgGA1UdEQQhMB+CBWtvYm9shwR/AAABhxAA\nAAAAAAAAAAAAAAAAAAABMAoGCCqGSM49BAMDA2cAMGQCMEOIJsPUTdTQ2nEyBo7w\nuhWj+Sjmh8dRq+SMpvn/+UU93PgzHWmDDqtjZKmmGgyVzAIwRGcyU3kbY0IvyQJ/\nv1/RAQa/pnNni09U9GAObGa04xnX+rMk4t+Pe80nruqxH4N2\n-----END CERTIFICATE-----\n",
				"certificate_fingerprint": "7486eef5fc3cac7ca1e9dd7cab2f81b1f1b4b81ad3b07aed529fbdcddb776210",
				"driver": "lxc",
				"driver_version": "3.0.3",
				"firewall": "nftables",
				"kernel": "Linux",
				"kernel_architecture": "aarch64",
				"kernel_features": {
					"netnsid_getifaddrs": "true",
					"seccomp_listener": "true",
					"seccomp_listener_continue": "true",
					"shiftfs": "false",
					"uevent_injection": "true",
					"unpriv_fscaps": "true"
				},
				"kernel_version": "5.10.63-rockchip64",
				"lxc_features": {
					"cgroup2": "false",
					"core_scheduling": "false",
					"devpts_fd": "false",
					"idmapped_mounts_v2": "false",
					"mount_injection_file": "false",
					"network_gateway_device_route": "false",
					"network_ipvlan": "false",
					"network_l2proxy": "false",
					"network_phys_macvlan_mtu": "false",
					"network_veth_router": "false",
					"pidfd": "false",
					"seccomp_allow_deny_syntax": "false",
					"seccomp_notify": "false",
					"seccomp_proxy_send_notify_fd": "false"
				},
				"os_name": "Debian GNU/Linux",
				"os_version": "10",
				"project": "default",
				"server": "lxd",
				"server_clustered": false,
				"server_name": "kobol",
				"server_pid": 22131,
				"server_version": "4.20",
				"storage": "btrfs",
				"storage_version": "4.20.1",
				"storage_supported_drivers": [
					{
						"Name": "btrfs",
						"Version": "4.20.1",
						"Remote": false
					},
					{
						"Name": "dir",
						"Version": "1",
						"Remote": false
					}
				]
			}
		}
	} http_code=200
DBUG[11-13|23:10:07] Handling API request                     method=POST url=/1.0/networks ip=@ username=bot protocol=unix
DBUG[11-13|23:10:07] API Request
	{
		"config": {
			"ipv4.address": "192.168.88.1/24"
		},
		"description": "",
		"name": "lxdbr0",
		"type": ""
	} ip=@ username=bot protocol=unix method=POST url=/1.0/networks
DBUG[11-13|23:10:07] Database error: api.StatusError{status:404, msg:"Network not found"} 
DBUG[11-13|23:10:07] Create                                   project=default driver=bridge network=lxdbr0 clientType=normal config="map[ipv4.address:192.168.88.1/24 ipv6.address:fd42:f7d5:1030:abaf::1/64 ipv6.nat:true]"
DBUG[11-13|23:10:07] Start                                    project=default driver=bridge network=lxdbr0
DBUG[11-13|23:10:07] Setting up network                       project=default driver=bridge network=lxdbr0
DBUG[11-13|23:10:07] Scheduler: network: lxdbr0 has been added: updating network priorities 
DBUG[11-13|23:10:07] Stable MAC generated                     project=default driver=bridge network=lxdbr0 seed=7486eef5fc3cac7ca1e9dd7cab2f81b1f1b4b81ad3b07aed529fbdcddb776210.0.83 hwAddr=00:16:3e:9c:89:77
DBUG[11-13|23:10:07] Clearing firewall                        project=default driver=bridge network=lxdbr0
DBUG[11-13|23:10:08] Delete                                   project=default driver=bridge network=lxdbr0 clientType=normal
DBUG[11-13|23:10:08] Error Response
	{
		"type": "error",
		"status": "",
		"status_code": 0,
		"operation": "",
		"error_code": 500,
		"error": "Can't parse a version",
		"metadata": null
	} http_code=500
Error: Can't parse a version

Any help would be appreciated. Thank you in advance.

I’d be guessing dnsmasq.
How was LXD installed? Is that with distro-specific packages or the snap or built by hand?

In the non-snap case, dnsmasq --version would be useful to see what may be confusing the parser.

Built by hand.

I first installed snap package but after experiencing some issues network related too, I decided to give a try building it from source.

$ dnsmasq --version
Version de Dnsmasq 2.80 Copyright (c) 2000-2018 Simon Kelley
Options à la compilation IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile

Ce logiciel est fourni sans AUCUNE GARANTIE.
Dnsmasq est un logiciel libre, il vous est permis de le redistribuer
sous les termes de la licence GPL (GNU General Public License), version 2 ou 3.

Thanks

Just realized my LANG was set to fr_BE on that machine…

I change it …

$ dnsmasq -v
Dnsmasq version 2.80  Copyright (c) 2000-2018 Simon Kelley
Compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile

and now it works !

} http_code=201
Network lxdbr1 created

Thank you for helping me figure this out.

Someone have some work to do with this parser. :smirk:

Ah yeah, it’s always quite annoying when something like --version returns a long-ish output like this one instead of just the version string… I suspect our parser at least expects the version to be at the correct place in the string and the addition of de here is what’s causing problems.

Can you log a bug over at https://github.com/lxc/lxd/issues with reproducer steps and we’ll see if we can make this more resilient. Thanks