Public bug reported:

## Summary

On Ubuntu 24.04 / 26.04, the secondary Netplan configuration file
99-ens6.yaml is not being applied. The system ignores the configuration
defined in /etc/netplan/99-ens6.yaml, which is expected to override or
supplement the 50-cloud-init.yaml configuration for the ens6 interface.

---

## Environment

- OS: Ubuntu 24.04 LTS / Ubuntu 26.04
- Kernel: 7.0.0-1014-aws
- /usr/bin/cloud-init 26.1-0ubuntu1~24.04.1
- Instance Type: AWS EC2
- Primary Interface: ens5 
- Secondary Interface: ens6

---

## Configuration Files

### File 1: /etc/netplan/50-cloud-init.yaml. This being autogenerated by
cloud-init.

```yaml
network:
  version: 2
  ethernets:
    ens5:
      match:
        macaddress: "---------------"
      dhcp4: true
      dhcp4-overrides:
        route-metric: 100
      dhcp6: false
      set-name: "ens5"
    ens6:
      match:
        macaddress: "---------------"
      addresses:
      - "172.31.17.170/20"
      - "172.31.23.243/20"
      - "172.31.25.113/20"
      - "172.31.25.141/20"
      - "172.31.28.197/20"
      - "172.31.30.130/20"
      dhcp4: true
      dhcp4-overrides:
        use-routes: true
        route-metric: 200
      dhcp6: false
      set-name: "ens6"
      routes:
      ...
```

### File 2: /etc/netplan/99-ens6.yaml. This is a custom created file

```yaml
network:
  version: 2
  ethernets:
    ens6:
      match:
        macaddress: "---------------"
      addresses:
      - "172.31.18.190/20"
      - "172.31.17.170/20"
      - "172.31.23.243/20"
      - "172.31.25.113/20"
      - "172.31.25.141/20"
      - "172.31.28.197/20"
      - "172.31.30.130/20"
      dhcp4: false
      set-name: "ens6"
      routes:
      
```

---

## Expected Behavior

The 99-ens6.yaml file (higher lexicographic order) should override the
ens6 configuration in 50-cloud-init.yaml. Specifically:

1. Address "172.31.18.190/20 should be assigned to ens6 as primary IP(present 
in 99-ens6.yaml but missing from 50-cloud-init.yaml addresses list)
2. dhcp4: false from 99-ens6.yaml should override dhcp4: true in 
50-cloud-init.yaml
3. Netplan should merge/override configurations with the higher-numbered file 
taking precedence

---

## Actual Behavior

The system does not apply the 99-ens6.yaml configuration. The ens6
interface retains the settings from 50-cloud-init.yaml:

- Address "172.31.18.190/20 is not assigned to the interface as primary IP 
instead 172.31.17.170/20 is. 
- DHCP4 remains enabled instead of being disabled
- The override file is effectively ignored

---

## Steps to Reproduce

1. Launch an Ubuntu EC2 instance with two ENIs.
2. Review /etc/netplan/50-cloud-init.yaml with ens6 having dhcp4: true and 6 
secondary IPs
3. Create /etc/netplan/99-ens6.yaml with ens6 having dhcp4: false and 7 IPs
4. Run sudo netplan generate — check for errors
5. Run sudo netplan apply
6. Verify with "ip a"

** Affects: netplan.io (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2171403

Title:
  Netplan 99-ens6.yaml Configuration Not Applied/Overriding on Ubuntu
  24/26

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2171403/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to