RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1852317 - [RFE] Ability to report DNS_SEARCH field via nmcli
Summary: [RFE] Ability to report DNS_SEARCH field via nmcli
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Ana Cabral
QA Contact: Matej Berezny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-30 06:33 UTC by jnikolak
Modified: 2023-10-06 20:55 UTC (History)
14 users (show)

Fixed In Version: NetworkManager-1.32.4-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:28:55 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4361 0 None None None 2021-11-09 19:29:34 UTC
freedesktop.org Gitlab NetworkManager NetworkManager merge_requests 919 0 None merged nmcli: include 'searches' field for nmcli device show 2021-07-09 19:58:30 UTC

Description jnikolak 2020-06-30 06:33:41 UTC
Description of problem:

There isn't any known command to be able to get the dns_search field directly, unless using a grep on an interface

sudo nmcli con show ens224 | grep ipv4.dns-search
ipv4.dns-search:                        good-domain.tld


Version-Release number of selected component (if applicable):
Rhel 7 and Rhel 8



Expected results:

nmcli -p -f ip4.dns_search device show
good-domain.tld

or 
nmcli -p -f DEVICE.DNS_SEARCH  connection show
good-domain.tld

Additional info:

Justification:
##################

This will be a great enhancement for future versions of NMCLI since most enterprises have their servers joined to some sort of realm/domain.

Comment 2 Thomas Haller 2020-06-30 13:57:15 UTC
First of all, there is a fundamental difference between a connection profile (short "connection") and an actual interface (a "device").

A profile is "what you want to configure". It's only settings and descriptive. Nothing "happens".

A device is something that currently exists on the system, that has configuration (IP addresses) and things happen (DHCP runs, a profile activates).

In NetworkManager, you activate a profile, to make things on a device happen.



To get the contents of the profile do:

    nmcli -g ipv4.dns-search connection show "$PROFILE"



Indeed, you cannot get the DNS search domains for a device. This works:

    nmcli -g IP4.DOMAIN device show "$DEVICE"

but 

    nmcli -g IP4.SEARCHES device show "$DEVICE"

does not.


Likewise, if a profile is currently active, then you can get the same (upper case) runtime information of the device via

    nmcli -g IP4.DOMAIN connection show "$PROFILE"

(again, the field IP4.SEARCHES is not available, like it isn't available for `device show`).


Yes, that should be added.

Comment 3 jnikolak 2020-06-30 16:51:33 UTC
Thanks for the explanation on the difference between profile and devices. 
I will surely add that to the redhat solution.

Comment 18 errata-xmlrpc 2021-11-09 19:28:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: NetworkManager security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4361

Comment 19 Red Hat Bugzilla 2023-09-15 00:33:44 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


Note You need to log in before you can comment on or make changes to this bug.