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

Refs #35578 - Fix netplan interface template logic #9560

Closed
wants to merge 1 commit into from

Conversation

bastian-src
Copy link
Contributor

@bastian-src bastian-src commented Dec 15, 2022

The previous fix introduced an end at the wrong place which results in bad configuration for systems with dhcp enabled.

In the current version, the nameserver field is printed independent of a static or dhcp environment. AFAIK and in the prior behavior of this snippet, it should only be added in a static setup.

Current version:

 network:
    version: 2
    ethernets:
      <myidentifier>:
        dhcp4: true
        dhcp6: false
        nameservers:
          search: [ <someaddress> ]
          addresses:

New version:

  network:
    version: 2
    ethernets:
      <myidentifier>:
        dhcp4: true
        dhcp6: false

This PR adds indentation to the erb clauses which might explain the cause of this issue in the first place.

Fixes: e74661e

@anthonysomerset and @ekohl maybe you can verify this patch since the issue was introduced in #9515.

Fix netplan logic issue which caused static information to be written in
dhcp-capable environment.

Fixes: e74661e
@theforeman-bot
Copy link
Member

Issues: #35578

@bastian-src
Copy link
Contributor Author

IMHO test error seems unrelated.

@bastian-src
Copy link
Contributor Author

Just realized there is already exactly the same fix in #9527. Gonna close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants