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 bridge not idempotent #4683

Closed
1 task done
philfry opened this issue May 17, 2022 · 3 comments · Fixed by #6105
Closed
1 task done

nmcli bridge not idempotent #4683

philfry opened this issue May 17, 2022 · 3 comments · Fixed by #6105
Labels
bug This issue/PR relates to a bug module module net_tools plugins plugin (any type)

Comments

@philfry
Copy link

philfry commented May 17, 2022

Summary

When configuring a bridge with stp disabled, the bridge's stp priority changes from 32768 to 128 on every run (also the type conversion is broken, but that's more a cosmetic issue).

Issue Type

Bug Report

Component Name

nmcli

Ansible Version

$ ansible --version
ansible [core 2.12.5]
  config file = /home/phil/projects/ansible/ansible.cfg
  configured module search path = ['/home/phil/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.10/site-packages/ansible
  ansible collection location = /home/phil/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.4 (main, Mar 25 2022, 00:00:00) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)]
  jinja version = 3.0.1
  libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general
# /home/phil/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 4.8.1

Configuration

$ ansible-config dump --only-changed
(empty)

OS / Environment

OracleLinux 8.6

Steps to Reproduce

    - community.general.nmcli:
        conn_name: br0 
        ifname: br0 
        type: bridge
        stp: no                                                                                                        
        ip4: '10.0.200.1/24'
        state: present
    - community.general.nmcli:
        conn_name: eth1
        ifname: eth1
        type: bridge-slave
        master: br0 
        hairpin: false
        stp: no
        state: present

Expected Results

no changes on consecutive runs

Actual Results

TASK [community.general.nmcli] ****************************************************************************************
--- before
+++ after
@@ -1,9 +1,9 @@
 {
-    "bridge.ageing-time": "300",
-    "bridge.forward-delay": "15",
-    "bridge.hello-time": "2",
-    "bridge.max-age": "20",
-    "bridge.priority": "32768",
+    "bridge.ageing-time": 300,
+    "bridge.forward-delay": 15,
+    "bridge.hello-time": 2,
+    "bridge.max-age": 20,
+    "bridge.priority": 128,
     "bridge.stp": "no",
     "connection.autoconnect": "yes",
     "connection.interface-name": "br0",

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 net_tools plugins plugin (any type) labels May 17, 2022
@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

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 net_tools plugins plugin (any type)
Projects
None yet
2 participants