Skip to content

cidata: Metric not respected with fedora template #3124

Open
@nirs

Description

@nirs

Description

We specify route-metric: N in network-config, but the settings is not respected in Fedora.

Test yaml:

vmType: vz
images:
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2"
  arch: "x86_64"
  digest: "sha256:6205ae0c524b4d1816dbd3573ce29b5c44ed26c9fbc874fbe48c41c89dd0bac2"
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/aarch64/images/Fedora-Cloud-Base-Generic-41-1.4.aarch64.qcow2"
  arch: "aarch64"
  digest: "sha256:085883b42c7e3b980e366a1fe006cd0ff15877f7e6e984426f3c6c67c7cc2faa"
cpus: 2
memory: 2g
plain: true
networks:
- socket: /var/run/socket_vmnet

network-config generated by lima:

# cat /mnt/lima-cidata/network-config 
version: 2
ethernets:
  eth0:
    match:
      macaddress: '52:55:55:b9:4a:44'
    dhcp4: true
    set-name: eth0
    dhcp4-overrides:
      route-metric: 200
    dhcp-identifier: mac
    nameservers:
      addresses:
      - 192.168.5.2
  lima0:
    match:
      macaddress: '52:55:55:2c:25:d8'
    dhcp4: true
    set-name: lima0
    dhcp4-overrides:
      route-metric: 100
    dhcp-identifier: mac

Actual routes:

# ip r
default via 192.168.5.2 dev eth0 proto dhcp src 192.168.5.15 metric 100 
default via 192.168.105.1 dev lima0 proto dhcp src 192.168.105.3 metric 101 
...

Expected routes:

default via 192.168.105.1 dev lima0 proto dhcp src 192.168.105.3 metric 100 
default via 192.168.5.2 dev eth0 proto dhcp src 192.168.5.15 metric 200 
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingguest/fedoraGuest: Fedora

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions