7e87bec996
Merge pull request #266 from aderumier/rxvlanfilter2
...
addons: ethtool: add rx-vlan-filter
2023-06-23 13:53:15 +02:00
d09833f93b
addons: ethtool: add rx-vlan-filter
...
some nic like mellanox connectx don't work well with
vlan aware bridge && rx-vlan-filter.
(They are limited in number of vlans in hardware filtering,
and break with big number of vlans like bridge-vids 2-4096)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2023-06-23 09:23:08 +02:00
bc8dfef493
Merge pull request #263 from sohorx/fixes/process-interfaces
...
fix networkinterfaces processes
2023-06-20 22:48:23 +02:00
f6295df6a3
addons: ethtool: reset link-speed on downed swps
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-06-20 18:08:21 +02:00
cdb28715b0
set lanes in ethtool
2023-06-20 18:01:49 +02:00
cb8c67bc66
networkinterfaces: fix bad allow keyword
...
This commit fix the following by making an understandable error msg:
* the 'allow eth0' would make a IndexError shown to the user.
* the 'allow-' would be valid and use an empty classname.
2023-06-12 15:55:26 +02:00
a2d18a9d78
networkinterfaces: clean process_iface/vlan code
...
The only real change is the creation of a ifaceobj before testing it's
name. (The ifaceobj will still not be added if deemed invalid)
2023-06-12 15:31:34 +02:00
65b3f523f9
networkinterfaces: make allow/auto behave the same
...
This change goal is to make auto behave like allow-auto.
This commit will also provide the interfaces range capability to any
other allow-class names.
2023-06-12 15:31:34 +02:00
eb92c38042
networkinterfaces: make auto alias of allow-auto
...
The commit make the auto_ifaces container pointing to the
allow_classes['auto'] list. (since it's a mutable object, we get
the same instance)
2023-06-12 15:31:34 +02:00
7cebbec155
ifupdown.utils: fix itf range in argument
...
ifquery excluded the last digit of interfaces range given.
ex: eth[1-2] would give only eth1 instead of eth1 + eth2.
This commit fix this behavior by increasing the range in
expand_iface_range.
2023-06-12 15:31:34 +02:00
d5f0e51d22
ifupdown.utils: simplify expand_iface_range
...
Replace indexing by variables named start/end and prefix/suffix.
2023-06-12 15:31:34 +02:00
e71f2e6360
Merge pull request #262 from sohorx/arg/lockfile
...
replace lockfile global by a common argument
2023-06-12 15:18:57 +02:00
55cba57de6
ifupdown.argv: replace lockfile global by an arg
2023-06-06 18:49:35 +02:00
a0522546b8
addons: address: fix merge-indentation issue
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-10 17:30:27 +02:00
909ff39554
debian: changelog: new entry: 3.2.0
...
* Fix: Sonarqube issues
* Fix: ifquery hangs indefinitely on ^C
* Fix: Skipping admin down on deleted vlans
* Fix: Merge existing MTU into new netlink object
* Fix: scheduler: env variable not properly set for user commands (fixes #218 )
* Fix: ifquery-check: vlan-protocol for dotted interfaces
* Fix: Down ops on vrf-slave should set the slave admin down
* New: Allow bond creation without slaves
* New: Add `--set-ring` option to ethtool
* New: Openvswitch : add support for fakebridge
* New: add support for systemd logging (--systemd)
* New: Process hwaddress before processing ip addresses
* New: Set protodown off on bond slave before bond is deleted
* New: Make sure bond speed and slaves (swps) speed are matching
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
c8bda7739d
nlcache: remove special SIGINT handling
...
capturing sigint was causing ifquery to hang indefinitely on ctrl-c
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
928186191c
nlcache: merge existing MTU into new netlink object (vlan/vxlan) before caching
...
This patch fixes the gap in the vlan and vxlan code
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
a5db158bc1
ifupdownmain: skipping admin down on deleted vlans
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
2a53e1383d
ifupdownmain: down ops on vrf-slave should set the slave admin down
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
86bd267c63
addons: address: process hwaddress before processing ip addresses
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
aa656ad315
lib: nlcache: merge existing MTU into new netlink object before caching
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
e5e64b25fe
SONAR: mstpctl: Merge if statement with the enclosing one
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
a0ff28e527
sonarlink: remove unused variable
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
75dea8b906
addons: bond: set protodown off on bond slave before bond is deleted
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
530e3a0b79
SONAR: addons: bond: Merge if statements with the enclosing ones
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
81348c3266
addons: bond: ignore exception raised during bond-slave speed check
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
921757c390
addons: bond: make sure bond speed and slaves (swps) speed are matching
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
421e9573b5
SONAR: fix iface.py: Import only needed names or import the module and then use its members.
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
4afb9b238f
addons: bond: allow bond creation without slaves
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
17485c78a4
SONAR: addressvirtual: print exception message in exception handler
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
4a973d4066
SONAR: addressvirtual: Merge if statement with the enclosing one
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
2b8aedc960
SONAR: addressvirtual: Rename method "addr_metric_support"
...
Rename method "addr_metric_support" to prevent any misunderstanding/clash
with field "ADDR_METRIC_SUPPORT" defined on line 80
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
e8b9d3ab5d
sonarlink: use opposite operator != instead of 'not'
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
c30ed567a8
SONAR: addons: address: Merge if statement with the enclosing one
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
a51aad8d60
add support for systemd logging
...
New CLI option: --systemd
will enabled journalctl logging when ifupdown2 is run in a systemd context
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
7c8627f876
SONAR: Specify an exception class to catch or reraise the exception
...
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-05-04 13:21:55 +02:00
9796acc7f3
Merge pull request #256 from tomvil/feat/ethtool_set_ring_max_value
...
addons: Allow to set `max` value in `--set-ring` option
2023-05-03 20:25:58 +02:00
080fc71a2f
Merge pull request #258 from aderumier/vlanprotocol-query-check
...
vlan: query_check: check vlan-protocol for not dotted interface
2023-04-20 14:01:39 +02:00
3fee068a67
vlan: query_check: check vlan-protocol for not dotted interface
...
/etc/network/interfaces
-----------------------
auto eth0.100
iface eth0.100
vlan-protocol 802.1ad
current
-------
ifquery -a -c
auto eth0.100
iface eth0.100 [pass]
new
---
ifquery -a -c
auto eth0.100
iface eth0.100 [pass]
vlan-protocol 802.1ad [pass]
2023-04-20 11:57:19 +02:00
70bd0e86e7
addons: Allow to set max
value in --set-ring
option
...
This makes some automation cases much easier
```
auto eth0
iface eth0 inet dhcp
ring-rx max
ring-tx max
Ring parameters for eth0:
Pre-set maximums:
RX: 4096
RX Mini: n/a
RX Jumbo: n/a
TX: 4096
Current hardware settings:
RX: 4096
RX Mini: n/a
RX Jumbo: n/a
TX: 4096
```
Signed-off-by: tomvil <tomas.vilemaitis@gmail.com>
2023-04-11 15:07:41 +03:00
5876ad8a0e
Merge pull request #255 from tomvil/master
...
addons: Add `--set-ring` option to ethtool
2023-03-30 18:45:02 +02:00
7b80e01ff0
remove extra line from ethtool.py
2023-03-27 19:25:31 +03:00
8c35c09ddd
addons: Add --set-ring
option to ethtool
...
example:
```
auto eth0
iface eth0 inet dhcp
ring-tx 1024
ring-rx 1024
```
Signed-off-by: Tomas Vilemaitis
2023-03-27 18:46:58 +03:00
a49b5d2682
scheduler: env variable not properly set for user commands
...
Fixes #218
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2023-01-25 15:37:07 +01:00
a1bf8ffe5a
Merge pull request #246 from aderumier/ovsfakebridge2
...
addons: openvswitch : add support for fakebridge.
2022-09-02 12:44:05 +02:00
39b395b1fd
addons: openvswitch : add support for fakebridge.
...
Fake bridge are are ovsbridge child of a parent bridge with a specific vlan tag.
```
auto br-parent
iface br-parent inet manual
ovs_type OVSBridge
auto br-fakev10
iface br-fakev10 inet manual
ovs_type OVSBridge
ovs_bridge br-parent
ovs_options br-parent 10
```
2022-09-01 23:44:14 +02:00
1d6a726e5a
Merge pull request #242 from talber-nvidia/fix-empty-output-from-subprocess
...
Fix the return value of utils._execute_subprocess
2022-07-06 19:20:37 +02:00
eee38e73c3
Fix the return value of utils._execute_subprocess
...
If the output of the subprocess is empty, then an empty <bytes> object
is returned (b''), and not decoded into an empty <string> object.
This may result in errors such as:
info[109734]: executing /bin/ip -6 addr show eth0
networking[109734]: error: eth0: cannot use a string pattern on a
bytes-like object
error[109734]: eth0: cannot use a string pattern on a bytes-like object
2022-07-06 18:36:38 +03:00
605d6e0962
Merge pull request #239 from sohorx/fix/distutils_dependency
...
distutils: fix dependency and lib replacement
2022-05-31 15:30:39 +02:00
95e4669536
Merge branch 'master' into fix/distutils_dependency
2022-05-31 15:30:16 +02:00