Ability to merge values (ip addresses) from multiple YAML files

Bug #1882563 reported by Lukas Märdian
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Netplan
New
Undecided
Unassigned

Bug Description

We want to assign multiple IP addresses to a given network interface, while some of the IP addresses are assigned/generated via cloud-init and others should be statically assigned.

Some have been using IP labels/aliases to implement this scenario:
https://bugs.launchpad.net/ubuntu/+source/nplan/+bug/1743200

Right now it is not possible to assign multiple addresses from different sources.

50-cloud-init.yaml:
version: 2
network:
  ethernets:
    eth0:
      addresses: [192.168.1.10/24] # auto-generated via cloud-init

60-static.yaml
network:
  ethernets:
    eth0:
      addresses: [192.168.10.10/24] # my static IP

This would result to:
eth0 having ONLY 192.168.10.10/24, as 60-static.yaml > 50-cloud-init.yaml

What we want to have is eth0 having 192.168.10.10/24 AND 192.168.0.10/24. Thus netplan needs the ability to additively merge the IP address values.

tags: added: id-5ee0c8258a37ae4a8b8549b3
Revision history for this message
Mészáros Máté Róbert (mrmeszaros) wrote :

I have an issue, where my nameserver address gets eaten up by netplan merging the configs:

80-my-preferences.yaml:
network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      nameservers:
        addresses: [10.10.10.10]

99-netcgf-vmware.yaml:
network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      nameservers:
        search:
          - custom.intranet

And the second one fully overrides the nameservers section. I am not sure if it is intentional, or how could I override the automatic vmware config.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.