Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloud-init not rendering GatewayOnLink for networkd #4995

Closed
bin456789 opened this issue Mar 2, 2024 · 1 comment
Closed

cloud-init not rendering GatewayOnLink for networkd #4995

bin456789 opened this issue Mar 2, 2024 · 1 comment
Labels
bug Something isn't working correctly

Comments

@bin456789
Copy link
Contributor

Bug report

cloud-init not rendering GatewayOnLink for networkd

(https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#GatewayOnLink=)

Steps to reproduce the problem

root@ubuntu:~# cat a.cfg
#cloud-config
network:
  version: 1
  config:
    - type: physical
      name: eth0
      mac_address: 11:22:33:44:55:66
      subnets:
        - type: static
          address: 192.168.1.1/24
          gateway: 1.2.3.4
          dns_nameservers:
            - 1.1.1.1
            - 8.8.8.8
        - type: static6
          address: 2602:0:0:10::100/128
          gateway: 2602:0:0:10::1
          dns_nameservers:
            - 2606:4700:4700::1111
            - 2001:4860:4860::8888
    - type: nameserver
      address:
        - 1.1.1.1
        - 8.8.8.8
        - 2606:4700:4700::1111
        - 2001:4860:4860::8888

root@ubuntu:~# cloud-init devel net-convert -p a.cfg -k yaml -d out -O networkd -D debian
root@ubuntu:~# cat out/etc/systemd/network/10-cloud-init-eth0.network
[Address]
Address=192.168.1.1/24

[Address]
Address=2602:0:0:10::100/128

[Match]
MACAddress=11:22:33:44:55:66
Name=eth0

[Network]
DHCP=no
DNS=1.1.1.1 8.8.8.8
DNS=1.1.1.1 8.8.8.8 2606:4700:4700::1111 2001:4860:4860::8888
DNS=2606:4700:4700::1111 2001:4860:4860::8888

[Route]
Gateway=1.2.3.4

[Route]
Gateway=2602:0:0:10::1

expect:

...
[Route]
Gateway=1.2.3.4
GatewayOnLink=yes

[Route]
Gateway=2602:0:0:10::1
GatewayOnLink=yes

Environment details

  • Cloud-init version: 23.4.daily-202403020432-4a0534f89~ubuntu22.04.1
  • Operating System Distribution:
  • Cloud provider, platform or installer type:

cloud-init logs

@bin456789 bin456789 added bug Something isn't working correctly new An issue that still needs triage labels Mar 2, 2024
@holmanb holmanb removed the new An issue that still needs triage label Mar 9, 2024
@bin456789
Copy link
Contributor Author

Solved by #4996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants