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

[RFE] Add support in nmcli to persistently enable/disable NetworkManager debug logging.

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

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • NetworkManager
    • None
    • rhel-net-mgmt
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      Background

      • Debug logs are essential for diagnosing issues with NetworkManager.
      • Currently:
        • Persistent method: edit /etc/NetworkManager/NetworkManager.conf manually and restart NM. This is error-prone and requires technical knowledge.
        • Runtime method: use nmcli general logging level <LEVEL> domains <DOMAINS>, which is lost on reboot or NM restart.

      Problem

      • Customers often forget to edit or revert the config file.
      • Debugging requires logs from early boot, which runtime-only logging cannot capture.
      • Manual steps lead to human errors and support delays.

      Proposed Solution

      Extend nmcli general logging with a persistent option.

      New Syntax

       

        1. Enable persistent debug logs*

      nmcli general logging level TRACE domains ALL persistent yes

       

        1. Enable temporary runtime logs (unchanged)*

      nmcli general logging level TRACE domains ALL

       

        1. Disable persistent logging (restore defaults)*

      nmcli general logging persistent no

      Behavior

      • With persistent yes:
        • Updates /etc/NetworkManager/NetworkManager.conf:

                                 [logging]
                                 level=TRACE
                                domains=ALL

        • Reloads NetworkManager (or schedules reload on reboot).
      • With persistent no:
        • Removes or comments the [logging] section from NetworkManager.conf.
        • Reloads NetworkManager.
      • With no persistent flag: current runtime-only behavior is preserved.

      Benefits

      • Ease of use: No manual config edits required.
      • Consistency: Behavior matches other nmcli commands that can modify configs.
      • Reliability: Debug logs are collected from boot when needed.
      • Backward compatible: Existing nmcli general logging works as-is.

              nm-team Network Management Team
              rhn-support-bas Balakrishnan S
              Network Management Team Network Management Team
              Vladimir Benes Vladimir Benes
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: