Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-106778

inconsistent behavior running `nmcli dev set veth managed yes` manually vs automation

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.7
    • NetworkManager
    • None
    • No
    • Low
    • rhel-net-mgmt
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Hide

      Definition of Done:

      Please mark each item below with ( / ) if completed or ( x ) if incomplete:

      ( ) The acceptance criteria defined below are met.

      Given a RHEL 9 system with NetworkManager and a veth pair created via ip link add type veth, 

      When nmcli device set vethX managed yes is issued immediately, 

      Then NM may set the device UP if autoconnect/default-profile policy allows and with no-auto-default=* or nmcli device set vethX autoconnect no, devices remain down unless a profile is explicitly activated.


      ( ) Integration test case is available upstream.


      ( ) Code is reviewed and merged upstream.


      ( ) Preliminary testing is done.


      ( ) Upstream documentation is written in the upstream MR.


      ( ) Release notes text is written in the RHEL issue.


      ( ) A demo is recorded

      Show
      Definition of Done: Please mark each item below with ( / ) if completed or ( x ) if incomplete: ( ) The acceptance criteria defined below are met. Given a RHEL 9 system with NetworkManager and a veth pair created via ip link add type veth,  When nmcli device set vethX managed yes is issued immediately,  Then NM may set the device UP if autoconnect/default-profile policy allows and with no-auto-default=* or nmcli device set vethX autoconnect no, devices remain down unless a profile is explicitly activated. ( ) Integration test case is available upstream. ( ) Code is reviewed and merged upstream. ( ) Preliminary testing is done. ( ) Upstream documentation is written in the upstream MR. ( ) Release notes text is written in the RHEL issue. ( ) A demo is recorded
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      When creating them with link down + `nmcli dev set managed yes` without pause (generally in a script), the link will be automatically brought up.

      The workaround is to add a `sleep 1` between `ip link` creation and `nmcli dev set managed yes`

      What is the impact of this issue to you?

      The results are inconsistent when executing these commands manually (with pauses) versus executing them via a script (without pauses).

      Please provide the package NVR for which the bug is seen:

      NetworkManager-1.53.92-1.el9.x86_64

      How reproducible is this bug?:

      100%

      Steps to reproduce

      ip link add type veth
      sleep 1 # <--- key step
      nmcli dev set veth0 managed yes
      nmcli dev set veth1 managed yes
      sleep 1
      ip link show # both veth are DOWN since there is a sleep
      
      
      ip link del veth0
      ip link add type veth
      # <--- no sleep here
      nmcli dev set veth0 managed yes
      nmcli dev set veth1 managed yes
      sleep 1
      ip link show # both veth are UP unexpectedly
      

      Expected results

      veth pair links stay DOWN

      Actual results

      if no pause between `ip link` creation and `nmcli dev set managed yes`, the veth links are UP

              nm-team Network Management Team
              rh-ee-mshi1 Mingyu Shi
              Network Management Team Network Management Team
              Vladimir Benes Vladimir Benes
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: