M HYPE SPLASH
// updates

Settings in netplan are not applied

By Emma Payne

Need some advice. I have two network interfaces, I configure separate IP and routes for each.

network: ethernets: enp4s0: dhcp4: no dhcp6: no addresses: - 192.168.0.222/24 enp2s5: dhcp4: no dhcp6: no addresses: - 192.168.1.5/24 version: 2 renderer: networkd

I press sudo netplan --debug apply and I see that the settings are not being applied to one of the interfaces, what am I doing wrong?

DEBUG:no netplan generated NM configuration exists
DEBUG:enp4s0 not found in {}
DEBUG:enp2s5 not found in {'enp4s0': {'dhcp4': False, 'dhcp6': False, 'addresses': ['192.168.0.222/24']}}
DEBUG:Merged config:
network: bonds: {} bridges: {} ethernets: enp2s5: addresses: - 192.168.1.5/24 dhcp4: false dhcp6: false enp4s0: addresses: - 192.168.0.222/24 dhcp4: false dhcp6: false ovs_ports: {} vlans: {} wifis: {}

Why to network adapter enp4s0 settings are not applied? Why do the settings for this adapter end up in a different one (enp2s5)?

6

1 Answer

I have the error DEBUG: enp3s0 not found in {}, but i decided to go ahead and leave it as it is. The states structure of the interfaces should determine the presence of a working configuration. And your might want to consider making these changes after a reboot. Workaround: create a running config view for reload and access the views. From the beginning you need to execute the commands to confirm the config and reboot. But before that you need to make sure that the configuration is suitable for this. While searching for this issue, i came across several hints that a similar DEBUG: could be due to a lack of interaction between interfaces. This is the absence of a bridge or tunnel between them. When events are eventually processed, you get a crash because the sender has to reference the dangling pointer of the existence of the bridge or tunnel itself in the netplan config. The sender does not need to know about any of the recipients. The recipient, of course, knows about the sender; at least he knows the type of message that is being sent to him, just like in your previous config, before the reboot, the listener knows about the event to which he should subscribe.

In this case, it should be referred to the fact that using a generator for binary data is a kind of stretch without taking into account. The mechanism for moving from one type to another must be somehow clear (it cannot contain non-printable parts). If your want to have a configuration that can be used to handle binary data or anything else that isn't pointer related, then sooner or later your will end up with a monster. The generator can do this and will do it readily if the developers did not use warning/error precautions.

sudo netplan --debug generate shows:

DEBUG: 18: 16: 37.189: We have some netdefs, pass them through a final round of validation
DEBUG: 18: 16: 37.189: enp3s0: setting default backend to 1
DEBUG: 18: 16: 37.189: Configuration is valid
DEBUG: 18: 16: 37.189: lo: setting default backend to 1
DEBUG: 18: 16: 37.189: Configuration is valid
DEBUG: 18: 16: 37.190: Generating output files ..
DEBUG: 18: 16: 37.190: NetworkManager: definition enp3s0 is not for us (backend 1)
DEBUG: 18: 16: 37.190: NetworkManager: definition lo is not for us (backend 1)

The above source code is a simplified partial implementation of my netplan, i am providing it to show more clearly which part is wrong and i want to simplify the answer to solving the problem. I think the main problem is Configuration is valid and it works the way i want. This means that your generator has enabled netdefs truncation without notice. Reading, writing in the yaml config does not cause any problems. This is why i didn't find a mismatch issue for having no interfaces found in source -_-! The binding is part of a fixed pipeline, so if your want to use it, your need to inherit from another set created after the reload. I want to keep DEBUG: enp4s5 not found in {} as it is, i think it all depends on your definition of emptiness. Use these commands to declare that this code is stripped down but valid:

sudo netplan try
sudo netplan generate
sudo netplan apply
reboot

The conversion to integer is also "reasonably" in the sense that your get a truncated value. Then your look at the errors. If your are using systemd-networkd:

networkctl
journalctl -b -u systemd-networkd

============================================================================

There are hints due to which the error may occur DEBUG: enp3s0 not found in {}, this is due to with the setting Kind =. This means that the wrong assignment resulted in a generator error. Check for this internal error:

NetDev has no Kind configured in /etc/systemd/network/10-netplan-lo.netdev. Ignoring
NetDev has no Kind configured in /etc/systemd/network/10-netplan-enp3s0.netdev. Ignoring

A working theory based on the Kind = call stack of calling methods like gre, veth will invalidate the entire scope (including the interaction area) and thus prevent the traffic routing method from failing. At this point, the scene referenced by the element is not initialized (apparently), but mandatory based on:

 Name = - the name of the interface. This option is required. Kind = - kind of interface. For example, bridge, bond, vlan, veth, sit, etc. This option is required.

My workaround is to make the Kind = callable between interfaces and make the source found with the added entry, so depending on your needs this might be an option. To validate the concept design, after reboot, route between interfaces, but at your discretion and ultimatelyDEBUG: enp3s0 not found in {} will be in the total.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy