-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix for setting mtu on ipip and gre interfaces in nmcli.py #9604
base: main
Are you sure you want to change the base?
Conversation
Thanks for your contribution! Please note that you need to add a changelog fragment, and that the unit tests are currently failing. |
hello, @felixfontein just added fragments file, could you please explain what to do with failing unit tests ? |
Hi @edvinaskairys you have to take a look at the test in tests/unit/plugins/modules/test_nmcli.py, function |
And |
Co-authored-by: Felix Fontein <[email protected]>
can someone help me with failing CI tests ? i'm starting to feel limitations of my programming abilities:) |
It's not your limitations, it's a module with almost 3000 lines, and a test module with almost 5000 lines. Its maintainability is... poor, to be extremely kind. It seems that your change in line makes the |
strange that this one: #8118 succesfully went through. |
Different tests scenarios for those two connections. Focusing on the
That is defined in Please note the parametrization there uses TESTCASE_IPIP = [
{
'type': 'ipip',
'conn_name': 'non_existent_nw_device',
'ifname': 'ipip-existent_nw_device',
'ip_tunnel_dev': 'non_existent_ipip_device',
'ip_tunnel_local': '192.168.225.5',
'ip_tunnel_remote': '192.168.225.6',
'state': 'present',
'_ansible_check_mode': False,
}
] So, that test calls the module using those parameters - it seems to try and create ( I will assume that, in the context of those tests, the connection did not exist before. And, given that the module did not fail (in the test code, the assertion for Finally, the if rc is None:
result['changed'] = False
else:
result['changed'] = True So, basically, the test expected That being said, if we search for Which clearly states it tries to That explains the difference you see. To run tests locally, you will need a dockerd (or equivalent, like containerd) running, and I suggest using https://pypi.org/project/andebox/ You can run this unit test easily in your local machine by simply running (for example):
(I used this exact line to replicate the error locally) |
SUMMARY
When trying to edit the mtu parameter on a gre and ipip interface, nmcli always reports that nothing needs to be done, even though the specified mtu value is different than the current mtu for the gre/ipip Interface.
Fixes #9315
ISSUE TYPE
COMPONENT NAME
nmcli.py