robur-coop / albatross

Albatross: orchestrate and manage MirageOS unikernels with Solo5
ISC License
141 stars 17 forks source link

specified bridge(s) does not match with the manifest #121

Closed nickbetteridge closed 1 year ago

nickbetteridge commented 1 year ago

Greetings!

So, I haven't used albatross and unikernels for a long time - from reading the various mirage tutorials, I have made a bridge in ubuntu, pulled down static_website_tls from mirage-skeleton and built it (the whole flow of building cross-compiled unikernels has become a dream - qudos to all), built the debian version of albatross.deb and installed it. Swimmingly good so far.

When I tried a sudo albatross-client-local create --net=br0 --arg='--ipv4=10.0.0.27/24' my-hello-unikernel https.spt I got albatross-client-local: specified bridge(s) does not match with the manifest.

I can see that I could add something to the manifest.json in the unikernel/mirage dir, but I couldn't find (and didn't know where to look) for any pointers on how to tweek this.

There might be an issue with my netplan in ubuntu 22.04 - my host interface is enp0s1 with an ip of 10.0.0.27 and mac of cb:5c:8f:86:b0:d2.

  version: 2
  renderer: networkd
  ethernets:
    enp0s1:
      dhcp4: no
      dhcp6: no
      addresses:
        - 10.0.0.27/24
      routes:
        - to : default
          via: 10.0.0.1
      nameservers:
        addresses:
          - 1.1.1.1
          - 1.0.0.1
  bridges:
    br0:
      interfaces: [enp0s1]
      addresses: [10.0.0.27/24]
      routes:
        - to : default
          via: 10.0.0.1
      nameservers:
        addresses: [ 1.1.1.1, 1.0.0.1 ]
      macaddress: cb:5c:8f:86:b0:d2
      parameters:
        stp: true
        forward-delay: 4
      dhcp4: no
      dhcp6: no

However, sudo brctl show gives

bridge name bridge id       STP enabled interfaces
br0     8000.9c5c8e86b0da   yes     enp0s1

which suggests that there isn't an issue.

So, I'm a bit stuck on what to do next - any suggestions?

hannesm commented 1 year ago

Hi @nickbetteridge, thanks for your report. So there's an easy solution, but it requires some more documentation (sorry for the lack thereof).

At some point (when introducing support for multiple network interfaces), solo5 introduced names for network devices -- i.e. --net:service=tapX and --net:management=tapY.

Now, albatross is keen on setting up tap devices, and indeed supports a mapping between host system bridge names and solo5 network device names. The --net parameter is either a single name (when bridge name and solo5 interface name are the same) or of the form name:bridge to map the solo5 name name to the bridge bridge. In your example, passing --net=service:br0 should do the trick.

nickbetteridge commented 1 year ago

Hi @hannesm - thanks for quick reply, and that did the trick! Just spent the last two days grinding through linux networking and getting up to speed - great fun (?!) - everything working. I'll make a PR for albatross, netplan and ubuntu 22.04. Thanks again.