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

error: NetlinkListenerWithCache.addr_add_dry_run() got an unexpected keyword argument 'nodad' #307

Open
junepark678 opened this issue Jul 16, 2024 · 1 comment

Comments

@junepark678
Copy link

Dry run fails due to this error

specifically, I think the error is at https://github.com/CumulusNetworks/ifupdown2/blob/master/ifupdown2/lib/nlcache.py#L3146

Culprit config file:

auto sit0
iface sit0 inet6 tunnel
        mode sit
        address <IPv6 IP address> 
        endpoint <IPv4 address of SIT endpoint> 
        local <IPv4 address of local computer>
        ttl 255
        gateway <IPv6 Gateway>

this also happens with

iface vmbr0 inet6 static
        address fd00:6969::1/64

debug log:

info: reading '/proc/sys/net/ipv6/conf/vmbr0/disable_ipv6'
debug:   File "/sbin/ifup", line 135, in <module>
    sys.exit(main())
   File "/sbin/ifup", line 123, in main
    return stand_alone()
   File "/sbin/ifup", line 103, in stand_alone
    status = ifupdown2.main()
   File "/usr/share/ifupdown2/ifupdown/main.py", line 77, in main
    self.handlers.get(self.op)(self.args)
   File "/usr/share/ifupdown2/ifupdown/main.py", line 193, in run_up
    ifupdown_handle.up(['pre-up', 'up', 'post-up'],
   File "/usr/share/ifupdown2/ifupdown/ifupdownmain.py", line 1843, in up
    ret = self._sched_ifaces(filtered_ifacenames, ops,
   File "/usr/share/ifupdown2/ifupdown/ifupdownmain.py", line 1566, in _sched_ifaces
    ifaceScheduler.sched_ifaces(self, ifacenames, ops,
   File "/usr/share/ifupdown2/ifupdown/scheduler.py", line 595, in sched_ifaces
    cls.run_iface_list(ifupdownobj, run_queue, ops,
   File "/usr/share/ifupdown2/ifupdown/scheduler.py", line 325, in run_iface_list
    cls.run_iface_graph(ifupdownobj, ifacename, ops, parent,
   File "/usr/share/ifupdown2/ifupdown/scheduler.py", line 315, in run_iface_graph
    cls.run_iface_list_ops(ifupdownobj, ifaceobjs, ops)
   File "/usr/share/ifupdown2/ifupdown/scheduler.py", line 188, in run_iface_list_ops
    cls.run_iface_op(ifupdownobj, ifaceobj, op,
   File "/usr/share/ifupdown2/ifupdown/scheduler.py", line 106, in run_iface_op
    m.run(ifaceobj, op,
   File "/usr/share/ifupdown2/addons/address.py", line 1606, in run
    op_handler(self, ifaceobj,
   File "/usr/share/ifupdown2/addons/address.py", line 1163, in _pre_up
    self.process_addresses(ifaceobj, ifaceobj_getfunc, force_reapply)
   File "/usr/share/ifupdown2/addons/address.py", line 683, in process_addresses
    self.__add_ip_addresses_with_attributes(ifaceobj, ifname, user_config_ip_addrs_list)
   File "/usr/share/ifupdown2/addons/address.py", line 592, in __add_ip_addresses_with_attributes
    self.log_error(str(e), ifaceobj, raise_error=False)
   File "/usr/share/ifupdown2/ifupdownaddons/modulebase.py", line 121, in log_error
    stack = traceback.format_stack()
debug: Traceback (most recent call last):
  File "/usr/share/ifupdown2/addons/address.py", line 590, in __add_ip_addresses_with_attributes
    self.netlink.addr_add(ifname, ip, nodad=nodad)
  File "/usr/share/ifupdown2/lib/dry_run.py", line 53, in __call__
    self.f(*(self.c(),) + arg, **kwargs)
TypeError: NetlinkListenerWithCache.addr_add_dry_run() got an unexpected keyword argument 'nodad'
error: NetlinkListenerWithCache.addr_add_dry_run() got an unexpected keyword argument 'nodad'
@cyril23
Copy link

cyril23 commented Dec 14, 2024

I've got the same problem after changing my /etc/network/interfaces. In my case: ifup --no-act enp193s0f0np0 got the output:

error: NetlinkListenerWithCache.addr_add_dry_run() got an unexpected keyword argument 'nodad'
error: NetlinkListenerWithCache.addr_add_dry_run() got an unexpected keyword argument 'nodad'

Thanks to ChatGPT, I've tried the tool ifreload, and first did a ifreload --syntax-check --all which returned without error, and then did a ifreload --all which also returned without error. Finally I did a ifup --no-act enp193s0f0np0 again and this time, it returned without error.

According to ChatGPT a ifreload --all might have reloaded the cache or some internal state of ifupdown2 somehow, so that's why the error: NetlinkListenerWithCache.addr_add_dry_run() got an unexpected keyword argument 'nodad' messages went away.

My system is a freshly installed Proxmox 8.3, running on a Hetzner AX162-S:

:~# ifup --version
info: executing /usr/bin/dpkg -l ifupdown2
ifupdown2:3.2.0-1+pmx11
# uname -a
Linux myhostname 6.8.12-4-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-4 (2024-11-06T15:04Z) x86_64 GNU/Linux

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

No branches or pull requests

2 participants