Skip to content

Multipass assigns the same IP address to multiple VMs when used by snapcraft #2366

@geekorous

Description

@geekorous

Describe the bug
Describe what your problem is.
When attempting to run multiple snapcraft builds concurrently, the spawned VMs are allocated the same IP address by the bridge, resulting in the crash of both VMs.

Expected behavior
What did you expect to happen?
Assign the last unassigned address to each VM in a reliable manner.

Logs
Please provide logs from the daemon, see accessing logs on where to find them on your platform.

I guess this portion of the log is more important:

Dec 05 21:18:23 lamborghini dnsmasq-dhcp[3981]: DHCPDISCOVER(mpqemubr0) 52:54:00:97:a4:f9
Dec 05 21:18:23 lamborghini dnsmasq-dhcp[3981]: DHCPOFFER(mpqemubr0) 10.30.202.107 52:54:00:97:a4:f9
Dec 05 21:18:23 lamborghini dnsmasq-dhcp[3981]: DHCPDISCOVER(mpqemubr0) 52:54:00:97:a4:f9
Dec 05 21:18:23 lamborghini dnsmasq-dhcp[3981]: DHCPOFFER(mpqemubr0) 10.30.202.107 52:54:00:97:a4:f9
Dec 05 21:18:23 lamborghini dnsmasq-dhcp[3981]: DHCPREQUEST(mpqemubr0) 10.30.202.107 52:54:00:97:a4:f9
Dec 05 21:18:23 lamborghini dnsmasq-dhcp[3981]: DHCPACK(mpqemubr0) 10.30.202.107 52:54:00:97:a4:f9 snapcraft-app-1
Dec 05 21:18:25 lamborghini multipassd[2303]: QMP: {"timestamp": {"seconds": 1638735505, "microseconds": 227385}, "event": "NIC_RX_FILTER_CHANGED", "data": {"path": "/machine/unattached/dev>
Dec 05 21:18:25 lamborghini dnsmasq-dhcp[3981]: DHCPDISCOVER(mpqemubr0) 52:54:00:9b:5f:12
Dec 05 21:18:25 lamborghini dnsmasq-dhcp[3981]: DHCPOFFER(mpqemubr0) 10.30.202.107 52:54:00:9b:5f:12
Dec 05 21:18:25 lamborghini dnsmasq-dhcp[3981]: DHCPREQUEST(mpqemubr0) 10.30.202.107 52:54:00:9b:5f:12
Dec 05 21:18:25 lamborghini dnsmasq-dhcp[3981]: DHCPACK(mpqemubr0) 10.30.202.107 52:54:00:9b:5f:12 snapcraft-app-2

Additional info

  • OS: [e.g. macOS 10.15]
  • multipass version: 1.8.0
  • multipass info --all
Name:           snapcraft-app-2
State:          Unknown
IPv4:           --
Release:        --
Image hash:     7c5c8f24046c (Ubuntu Snapcraft builder for Core 18)
Load:           --
Disk usage:     --
Memory usage:   --
Mounts:         --

Name:           snapcraft-app-1
State:          Running
IPv4:           10.30.202.140
Release:        Ubuntu 18.04.5 LTS
Image hash:     7c5c8f24046c (Ubuntu Snapcraft builder for Core 18)
Load:           0.08 0.06 0.02
Disk usage:     953.6M out of 19.2G
Memory usage:   48.7M out of 5.8G
Mounts:         --

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions