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

WIP: network_manager: Assign routes to ip section by ip version #4534

Closed
wants to merge 1 commit into from

Conversation

holmanb
Copy link
Member

@holmanb holmanb commented Oct 19, 2023

Fixes GH-4518

Proposed Commit Message

summary: no more than 70 characters

A description of what the change being made is and why it is being
made, if the summary line is insufficient.  The blank line above is
required. This should be wrapped at 72 characters, but otherwise has
no particular length requirements.

If you need to write multiple paragraphs, feel free.

Fixes GH-NNNNN (GitHub Issue number. Remove line if irrelevant)
LP: #NNNNNN (Launchpad bug number. Remove line if irrelevant)

Additional Context

Test Steps

Checklist

@holmanb holmanb added the wip Work in progress, do not land label Oct 19, 2023
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running this against the original yaml file, I get:

[connection]
id=cloud-init eth0
uuid=1dd9a779-d327-56e1-8454-c65e2556c12c
autoconnect-priority=120
type=ethernet
interface-name=eth0

[user]
org.freedesktop.NetworkManager.origin=cloud-init

[ethernet]

[ipv4]
method=auto
may-fail=false
route1=169.254.42.42/32,62.210.0.1

[ipv6]
method=manual
may-fail=false
address1=2001:bc8:1210:232:dc00:ff:fe20:185/64

Rather than move to the ipv6 section, the v6 route has disappeared.

While we're here, we should ensure the other fields are working too, and dns-search is also incorrect. With an updated yaml:

version: 2
ethernets:
  eth0:
    dhcp4: true
    nameservers:
      search: [lab, home]
      addresses: [8.8.8.8, FEDC::1]
    routes:
      - to: 169.254.42.42/32
        via: 62.210.0.1
      - via: fe80::dc00:ff:fe20:186
        to: ::/0
    addresses:
      - 192.168.1.20
      - 2001:bc8:1210:232:dc00:ff:fe20:185/64

the resulting [ipv6] section has no dns-search.

Also, unit test please.

@holmanb
Copy link
Member Author

holmanb commented Oct 20, 2023

Closing in favor of @TheRealFalcon's solution.

@holmanb holmanb closed this Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Work in progress, do not land
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENI and Network-Manager renderers create wrong IPv6 routes
2 participants