Attribute Error if link is missing #139

Closed
opened 2025-11-24 14:11:11 +01:00 by m4rc3l · 1 comment
Contributor
Traceback (most recent call last):
  File "/nix/store/j104p2bf7agk7l7h87nn7rlcgq8a11bp-ifstate-2.2.0/bin/.ifstatecli-wrapped", line 9, in <module>
    sys.exit(main())
             ~~~~^^
  File "/nix/store/j104p2bf7agk7l7h87nn7rlcgq8a11bp-ifstate-2.2.0/lib/python3.13/site-packages/ifstate/ifstate.py", line 234, in main
    ifs_config.ifs.apply()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/nix/store/j104p2bf7agk7l7h87nn7rlcgq8a11bp-ifstate-2.2.0/lib/python3.13/site-packages/libifstate/__init__.py", line 349, in apply
    self._apply(True, vrrp_type, vrrp_name, vrrp_state)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/j104p2bf7agk7l7h87nn7rlcgq8a11bp-ifstate-2.2.0/lib/python3.13/site-packages/libifstate/__init__.py", line 547, in _apply
    link_dep.netns.tc[link_dep.ifname].apply(do_apply)
    ^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'tc'
``` Traceback (most recent call last): File "/nix/store/j104p2bf7agk7l7h87nn7rlcgq8a11bp-ifstate-2.2.0/bin/.ifstatecli-wrapped", line 9, in <module> sys.exit(main()) ~~~~^^ File "/nix/store/j104p2bf7agk7l7h87nn7rlcgq8a11bp-ifstate-2.2.0/lib/python3.13/site-packages/ifstate/ifstate.py", line 234, in main ifs_config.ifs.apply() ~~~~~~~~~~~~~~~~~~~~^^ File "/nix/store/j104p2bf7agk7l7h87nn7rlcgq8a11bp-ifstate-2.2.0/lib/python3.13/site-packages/libifstate/__init__.py", line 349, in apply self._apply(True, vrrp_type, vrrp_name, vrrp_state) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/j104p2bf7agk7l7h87nn7rlcgq8a11bp-ifstate-2.2.0/lib/python3.13/site-packages/libifstate/__init__.py", line 547, in _apply link_dep.netns.tc[link_dep.ifname].apply(do_apply) ^^^^^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'tc' ```
liske added this to the 2.2.1 milestone 2025-11-24 18:25:34 +01:00
Owner

Fixed by 7de8cf498d, thanks!

This regression since ifstate 2.1 was triggered when applying tc settings inside a netns.

Fixed by 7de8cf498dc7ff764ffc3f902c7b7190f33c7058, thanks! This regression since ifstate 2.1 was triggered when applying `tc` settings inside a netns.
liske closed this issue 2025-11-24 18:37:47 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
liske/ifstate#139
No description provided.