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

Nmstate service Fails When missing dhcp/autoconf in nmstate yaml

    • Yes
    • Moderate
    • 1
    • rhel-sst-network-management
    • ssg_networking
    • 5
    • False
    • Hide

      None

      Show
      None
    • None
    • NMT - RHEL-9.6/RHEL 10 DTM 16
    • Hide

      Given a system administrator is using nmstatectl to apply a network configuration YAML file that does not explicitly contain dhcp or autoconf values, 

      When the YAML is applied using the nmstate service, 

      Then, the network configuration should successfully apply with dhcp and autoconf defaulting to false unless explicitly specified otherwise. 

      Definition of Done:

      • The implementation meets the acceptance criteria
      • Integration tests are written and pass
      • The code is part of a downstream build attached to an errata
      Show
      Given a system administrator is using nmstatectl to apply a network configuration YAML file that does not explicitly contain dhcp or autoconf values,  When the YAML is applied using the nmstate service,  Then, the network configuration should successfully apply with dhcp and autoconf defaulting to false unless explicitly specified otherwise.  Definition of Done: The implementation meets the acceptance criteria Integration tests are written and pass The code is part of a downstream build attached to an errata
    • None
    • None
    • None

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

      Assisted now uses the nmstate service to create nmconnection files, currently for versions >= 4.14 + x86 arch.

      In old flow, we use GC, which set `autoconf` and `dhcp` to false by default if not specified in the YAML. Now, with nmstate service it uses the current state, which the value may be true,  causing the issues.

      What is the impact of this issue to you?

      regression

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

      How reproducible is this bug?:

      always

      Steps to reproduce

      Steps to reproduce:

      Use the nmstatectl service with a YAML configuration that does not include `dhcp: false` or `autoconf: false` or both. 

      Expected results

      The configuration should apply successfully without any issues.

      Actual results

      [root@localhost ~]# nmstatectl apply /etc/nmstate/ymlFile0.yml                                                                                                                                                     
      [2024-09-24T08:13:55Z INFO  nmstatectl] Nmstate version: 2.2.27                                                                                                                                                    
      [2024-09-24T08:13:55Z INFO  nmstate::ip] Static addresses 3001:db9::1e/120 defined when dynamic IP is enabled                                                                                                      
      [2024-09-24T08:13:55Z INFO  nmstate::ip] Static addresses 1001:db9::1e/120 defined when dynamic IP is enabled                                                                                                      
      [2024-09-24T08:13:55Z INFO  nmstate::ip] Static addresses 3001:db9::1e/120 defined when dynamic IP is enabled                                                                                                      
      [2024-09-24T08:13:55Z INFO  nmstate::ip] Static addresses 1001:db9::1e/120 defined when dynamic IP is enabled                                                                                                      
      [2024-09-24T08:13:55Z INFO  nmstate::query_apply::net_state] Created checkpoint /org/freedesktop/NetworkManager/Checkpoint/3                                                                                       
      [2024-09-24T08:13:55Z INFO  nmstate::query_apply::net_state] Rollbacked to checkpoint /org/freedesktop/NetworkManager/Checkpoint/3                                                                                 
      NmstateError: NotImplementedError: Autoconf without DHCP is not supported yet 

              fge@redhat.com Gris Ge
              rh-ee-lhadad Linoy Hadad
              Network Management Team Network Management Team
              Mingyu Shi Mingyu Shi
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: