network icon indicating copy to clipboard operation
network copied to clipboard

error setting mtu for vlan interface despite success (eventually)

Open tyll opened this issue 6 years ago • 3 comments

Playbook:

---
- hosts: all
  vars:
    network_connections:
      - name: eth1
        type: ethernet
        autoconnect: no
        state: up
        mtu: 1492
        ip:
          dhcp4: no
          auto6: no

      - name: eth1.90
        parent: eth1
        type: vlan
        vlan_id: 90
        mtu: 1280
        state: up
        ip:
          dhcp4: no
          auto6: no

  tasks:
    - name: Run network role
      import_role:
        name: linux-system-roles.network

ansible-playbook output:

ansible-playbook -i rhel76-cloud, vlan-mtu.yml 

PLAY [all] ***********************************************************************************************************************************************************************************************

TASK [Gathering Facts] ***********************************************************************************************************************************************************************************
ok: [rhel76-cloud]

TASK [linux-system-roles.network : Check which services are running] *************************************************************************************************************************************
ok: [rhel76-cloud]

TASK [linux-system-roles.network : Check which packages are installed] ***********************************************************************************************************************************
ok: [rhel76-cloud]

TASK [linux-system-roles.network : Print network provider] ***********************************************************************************************************************************************
ok: [rhel76-cloud] => {
    "msg": "Using network provider: nm"
}

TASK [linux-system-roles.network : Install packages] *****************************************************************************************************************************************************
skipping: [rhel76-cloud]

TASK [linux-system-roles.network : Enable network service] ***********************************************************************************************************************************************
ok: [rhel76-cloud]

TASK [linux-system-roles.network : Configure networking connection profiles] *****************************************************************************************************************************
 [WARNING]: [005] <info>  #0, state:up persistent_state:present, 'eth1': add connection eth1, dc5eb498-f5b1-4124-b393-a7cfaec4e51d

 [WARNING]: [006] <info>  #0, state:up persistent_state:present, 'eth1': up connection eth1, dc5eb498-f5b1-4124-b393-a7cfaec4e51d (not-active)

 [WARNING]: [007] <info>  #1, state:up persistent_state:present, 'eth1.90': add connection eth1.90, 226409d1-c1a5-456c-8f67-e4494cf540ac

 [WARNING]: [008] <info>  #1, state:up persistent_state:present, 'eth1.90': up connection eth1.90, 226409d1-c1a5-456c-8f67-e4494cf540ac (not-active)

 [WARNING]: [009] <error> #1, state:up persistent_state:present, 'eth1.90': up connection failed: failure to activate connection: nm-manager-error-quark: Failed to find a compatible device for this
connection (3)

fatal: [rhel76-cloud]: FAILED! => {"changed": true, "msg": "error: up connection failed: failure to activate connection: nm-manager-error-quark: Failed to find a compatible device for this connection (3)"}

PLAY RECAP ***********************************************************************************************************************************************************************************************
rhel76-cloud               : ok=5    changed=0    unreachable=0    failed=1   

NM logs:

Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <info>  [1550252720.1114] audit: op="connection-activate" uuid="226409d1-c1a5-456c-8f67-e4494cf540ac" name="eth1.90" result="fail" reason="Failed to find a compatible device for this connection"
Feb 15 18:45:20 rhel76-cloud ansible-network_connections[17596]: [WARNING] [005] <info>  #0, state:up persistent_state:present, 'eth1': add connection eth1, dc5eb498-f5b1-4124-b393-a7cfaec4e51d
Feb 15 18:45:20 rhel76-cloud ansible-network_connections[17596]: [WARNING] [006] <info>  #0, state:up persistent_state:present, 'eth1': up connection eth1, dc5eb498-f5b1-4124-b393-a7cfaec4e51d (not-active)
Feb 15 18:45:20 rhel76-cloud ansible-network_connections[17596]: [WARNING] [007] <info>  #1, state:up persistent_state:present, 'eth1.90': add connection eth1.90, 226409d1-c1a5-456c-8f67-e4494cf540ac
Feb 15 18:45:20 rhel76-cloud ansible-network_connections[17596]: [WARNING] [008] <info>  #1, state:up persistent_state:present, 'eth1.90': up connection eth1.90, 226409d1-c1a5-456c-8f67-e4494cf540ac (not-active)
Feb 15 18:45:20 rhel76-cloud ansible-network_connections[17596]: [WARNING] [009] <error> #1, state:up persistent_state:present, 'eth1.90': up connection failed: failure to activate connection: nm-manager-error-quark: Failed to find a compatible device for this connection (3)
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.2112] platform-linux: event-notification: RTM_NEWADDR, flags 0, seq 0: fe80::5054:ff:fedc:e5f1/64 lft forever pref forever lifetime 622492-0[4294967295,4294967295] dev 38 flags permanent src kernel
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.2112] platform: signal: address 6   added: fe80::5054:ff:fedc:e5f1/64 lft forever pref forever lifetime 622492-0[4294967295,4294967295] dev 38 flags permanent src kernel
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.2112] device[0x5608d2167890] (eth1.90): queued IP6 config change
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.2112] platform-linux: event-notification: RTM_NEWROUTE, flags 0, seq 0: ignore
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.2113] device[0x5608d2167890] (eth1.90): ip6-config: update (commit=0, new-config=0x5608d21d5000)
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.2114] device[0x5608d2167890] (eth1.90): ip6-config: update IP Config instance (/org/freedesktop/NetworkManager/IP6Config/25)
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.2114] dns-mgr: (device_ip_config_changed): queueing DNS updates (1)
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.2114] policy: set-hostname: updating hostname (ip6 conf)
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.2114] hostname: transient hostname retrieval failed
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.2114] policy: get-hostname: "rhel76-cloud"
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.2114] hostname: transient hostname retrieval failed
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.2114] policy: get-hostname: "rhel76-cloud"
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.2114] policy: set-hostname: hostname already set to 'rhel76-cloud' (from system configuration)
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.2114] dns-mgr: (device_ip_config_changed): DNS configuration did not change
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.2114] dns-mgr: (device_ip_config_changed): no DNS changes to commit (0)
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.8086] platform-linux: event-notification: RTM_NEWADDR, flags 0, seq 0: fe80::5054:ff:fedc:e5f1/64 lft forever pref forever lifetime 622492-0[4294967295,4294967295] dev 3 flags permanent src kernel
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.8087] platform: signal: address 6   added: fe80::5054:ff:fedc:e5f1/64 lft forever pref forever lifetime 622492-0[4294967295,4294967295] dev 3 flags permanent src kernel
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.8088] device[0x5608d2153250] (eth1): queued IP6 config change
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.8088] platform-linux: event-notification: RTM_NEWROUTE, flags 0, seq 0: ignore
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.8091] device[0x5608d2153250] (eth1): ip6-config: update (commit=0, new-config=0x5608d212f390)
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.8096] device[0x5608d2153250] (eth1): ip6-config: update IP Config instance (/org/freedesktop/NetworkManager/IP6Config/23)
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.8096] dns-mgr: (device_ip_config_changed): queueing DNS updates (1)
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.8097] policy: set-hostname: updating hostname (ip6 conf)
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.8097] hostname: transient hostname retrieval failed
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.8097] policy: get-hostname: "rhel76-cloud"
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.8097] hostname: transient hostname retrieval failed
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.8098] policy: get-hostname: "rhel76-cloud"
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <trace> [1550252720.8098] policy: set-hostname: hostname already set to 'rhel76-cloud' (from system configuration)
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.8098] dns-mgr: (device_ip_config_changed): DNS configuration did not change
Feb 15 18:45:20 rhel76-cloud NetworkManager[26901]: <debug> [1550252720.8098] dns-mgr: (device_ip_config_changed): no DNS changes to commit (0)
Feb 15 18:45:25 rhel76-cloud NetworkManager[26901]: <trace> [1550252725.0507] device[0x5608d2153250] (eth1): remove_pending_action (0): 'carrier-wait' not pending (expected)
Feb 15 18:45:25 rhel76-cloud NetworkManager[26901]: <trace> [1550252725.2010] device[0x5608d2167890] (eth1.90): remove_pending_action (0): 'carrier-wait' not pending (expected)

This is with NetworkManager-1.12.0-6.el7

@thom311 any ideas for the [WARNING]: [009] <error> #1, state:up persistent_state:present, 'eth1.90': up connection failed: failure to activate connection: nm-manager-error-quark: Failed to find a compatible device for this connection (3) error? Is the eth1 device not ready, yet, when the vlan is activated?

tyll avatar Feb 15 '19 17:02 tyll

This appears to be related to autoconnect being enabled.

tyll avatar May 30 '19 07:05 tyll

THis appears to be a bug in NM when using a UUID as a parent and explicitly activating a device that was already auto activated: https://bugzilla.redhat.com/show_bug.cgi?id=1716438

tyll avatar Jun 03 '19 15:06 tyll

The NM bug is fixed, next step: adjust tests/playbooks/tests_vlan_mtu.yml to also test with autoconnect enabled for the vlan interface.

tyll avatar Apr 20 '20 17:04 tyll