1
0
Fork 0
tuned/tests/unit
Jaroslav Škarvada 6def0e44cf
plugin_net: added support for hotplug and rename
This will not completely resolve RHEL-60906, because there will be
always race condition if the rename event happens before the instance
is fully initialized, but it should significantly improve the situation.

Drawback is that it can report in the logs device names that shouldn't
be matched by the plugin_net instance, i.e. it matches devices according
to their original names but accesses them with their new names. This
can be confusing. Also in the runtime API (e.g. for removal of the
device from the instance), the original device names have to be used.
For insertion of the device to the instance, new names have to be used.
This can be even more confusing.

Unfortunately, there probably isn't better alternative now, because
for correct operation we would have to handle rename by removal and
addition events. This would require rollback and retune steps which would
lead to very negative performance consequences. Also we would have to
cope with partially tuned devices if the rename event happens during
profile application. It's doable, but it would require big
architectural changes.

The PR also extends internal API, now the plugin instances receive
'instance' as a method parameter.

Also fixed some existing CodeQL warnings.

Resolves: RHEL-60906

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2025-01-16 18:40:41 +01:00
..
exports Fixed building on RHEL-7/CentOS 7 2020-06-19 11:15:12 +02:00
hardware Fixed building on RHEL-7/CentOS 7 2020-06-19 11:15:12 +02:00
monitors Fixed building on RHEL-7/CentOS 7 2020-06-19 11:15:12 +02:00
plugins plugin_net: added support for hotplug and rename 2025-01-16 18:40:41 +01:00
profiles Removing dependency on python-configobj. 2021-08-18 10:28:27 +02:00
storage Fixed building on RHEL-7/CentOS 7 2020-06-19 11:15:12 +02:00
utils Merge pull request #417 from CZerta/rhbz1891036_striping_quotes_when_unpacking_cpu_list 2022-08-09 16:11:40 +02:00
__init__.py tests: moved tests under directory 'tests' 2019-11-18 16:34:11 +01:00
func_basic.sh tests: moved tests under directory 'tests' 2019-11-18 16:34:11 +01:00
globals.py Replace python flexmock module with builtin mock 2019-11-28 07:54:15 +01:00