Skip to content
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

nmcli does not allow editing mtu on gre/ipip interfaces #9315

Closed
1 task done
edvinaskairys opened this issue Dec 22, 2024 · 5 comments · May be fixed by #9604
Closed
1 task done

nmcli does not allow editing mtu on gre/ipip interfaces #9315

edvinaskairys opened this issue Dec 22, 2024 · 5 comments · May be fixed by #9604
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)

Comments

@edvinaskairys
Copy link

edvinaskairys commented Dec 22, 2024

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
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Dec 22, 2024
@edvinaskairys edvinaskairys changed the title nmcli does not allow editing mtu on gre/ip-ip interfaces nmcli does not allow editing mtu on gre/ipip interfaces Dec 22, 2024
@edvinaskairys
Copy link
Author

Hey,

@alcamie101 maybe you can help to push this further ?

@edvinaskairys
Copy link
Author

bot_status

@ansibullbot
Copy link
Collaborator

Components

plugins/modules/nmcli.py
support: community
maintainers: alcamie101

Metadata

waiting_on: maintainer
needs_info: False

click here for bot help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)
Projects
None yet
2 participants