Closed
Description
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.
This appears to be caused by the function:
def mtu_conn_type(self):
return self.type in (
'bond',
'bond-slave',
'dummy',
'ethernet',
'infiniband',
'team-slave',
'vlan',
)
in nmcli.py which fails to recognize the gre (and ipip) interface as a valid interface type on which you can set the MTU.
Issue Type
Bug Report
Component Name
nmcli
Ansible Version
ansible [core 2.13.13]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /etc/ansible-venv/venv/lib/python3.8/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /etc/ansible-venv/venv/bin/ansible
python version = 3.8.10 (default, May 26 2023, 14:05:08) [GCC 9.4.0]
jinja version = 3.1.4
libyaml = True
Community.general Version
(venv) root@PCEDVKAIL3:/etc/ansible-venv/ansible-control# ansible-galaxy collection list community.general
# /etc/ansible-venv/venv/lib/python3.8/site-packages/ansible_collections
Collection Version
----------------- -------
community.general 5.8.3
# /root/.ansible/collections/ansible_collections
Collection Version
----------------- -------
community.general 10.1.0
Configuration
DEFAULT_JINJA2_NATIVE(/etc/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
OS / Environment
(venv) root@PCEDVKAIL3:/etc/ansible-venv/ansible-control# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
Steps to Reproduce
common_networkmanager_interfaces:
gre_test1:
mtu: '1400'
type: gre
ip_tunnel_local: '10.254.65.23'
ip_tunnel_remote: '10.34.35.135'
ip4: '29.0.0.1/30'
state: present
method6: disabled
ipip_test1:
mtu: '1400'
type: ipip
ip_tunnel_local: '10.254.65.23'
ip_tunnel_remote: '10.33.35.135'
ip4: '30.0.0.1/30'
state: present
method6: disabled
Expected Results
nmcli connection show gre_test1
nmcli connection show ipip_test1
should report
ip-tunnel.mtu: 1400
Actual Results
but instead Ansible reports that nothing needs to be changed and the MTU remains at the default for the interface.
ip-tunnel.mtu: 0
Code of Conduct
- I agree to follow the Ansible Code of Conduct