Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1685138

Summary: adcli info should send netlogin pings to all domain controllers, not only a subset
Product: Red Hat Enterprise Linux 7 Reporter: afox <afox>
Component: adcliAssignee: Sumit Bose <sbose>
Status: CLOSED ERRATA QA Contact: sssd-qe <sssd-qe>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.6CC: nsoman, pcech, sgadekar, sgoveas
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: adcli-0.8.1-12.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 19:45:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
sosreport from client system where adcli is executed none

Description afox@redhat.com 2019-03-04 13:07:31 UTC
Description of problem:
In customer environment, there is an AD domain which spans 5 datacenters, with two AD DCs in each datacenter for a total of 20 AD DCs.

There are firewalls limiting connectivity between the datacenters, which means that AD clients in datacenterA cannot contact the AD DCs in datacenterB and vice versa. However, the AD DCs are able to communicate with each other.

When the command 'adcli --verbose info -D our.ad.domain' is executed in automation to identify the computer-site and subsequently join to the site local AD DC, adcli only sends the netlogin pings to 5 of the 20 AD DCs. As a result,  when none of the local AD DCs is pinged, the computer-site cannot be identified, and the automation fails.

Version-Release number of selected component (if applicable):
adcli-0.8.1-4.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Setup an AD domain that contains more than 5 AD DCs. 
2. Run adcli command as above. 

Actual results:
Only 5 AD DCs are pinged

Expected results:
All AD DCs should be pinged


Additional info:

Comment 4 afox@redhat.com 2019-03-04 13:15:12 UTC
Created attachment 1540638 [details]
sosreport from client system where adcli is executed

Comment 5 Sumit Bose 2019-03-04 13:55:36 UTC
This issue was tracked upstream by https://gitlab.freedesktop.org/realmd/adcli/issues/13 and is fixed with commit 0a0d0f66409eb83e06b7dc50543c2f6c15a36bc4.

Comment 9 shridhar 2019-11-20 14:06:23 UTC
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   adcli info send netlogon pings to all domains controllers
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 07:46:24 ] :: [  BEGIN   ] :: Running 'adcli --verbose info -D ad3.baseos.qe > /tmp/tmp_1 2>&1'
:: [ 07:46:43 ] :: [   PASS   ] :: Command 'adcli --verbose info -D ad3.baseos.qe > /tmp/tmp_1 2>&1' (Expected 0, got 0)
:: [ 07:46:43 ] :: [  BEGIN   ] :: Running 'cat /tmp/tmp_1'
 * Discovering domain controllers: _ldap._tcp.ad3.baseos.qe
 * Sending NetLogon ping to domain controller: sec6.ad3.baseos.qe
 * Sending NetLogon ping to domain controller: sec5.ad3.baseos.qe
 * Sending NetLogon ping to domain controller: sec4.ad3.baseos.qe
 * Sending NetLogon ping to domain controller: sec3.ad3.baseos.qe
 * Sending NetLogon ping to domain controller: sec2.ad3.baseos.qe
 * Sending NetLogon ping to domain controller: sec1.ad3.baseos.qe
[domain]
domain-name = ad3.baseos.qe
domain-controller = sec6.ad3.baseos.qe
domain-controller-usable = maybe
domain-controllers = sec6.ad3.baseos.qe sec5.ad3.baseos.qe sec4.ad3.baseos.qe sec3.ad3.baseos.qe sec2.ad3.baseos.qe sec1.ad3.baseos.qe
[computer]
:: [ 07:46:43 ] :: [   PASS   ] :: Command 'cat /tmp/tmp_1' (Expected 0, got 0)
:: [ 07:46:43 ] :: [  BEGIN   ] :: Running 'dig srv _ldap._tcp.ad3.baseos.qe'

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-13.P2.el7 <<>> srv _ldap._tcp.ad3.baseos.qe
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 472
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 7

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;_ldap._tcp.ad3.baseos.qe.	IN	SRV

;; ANSWER SECTION:
_ldap._tcp.ad3.baseos.qe. 3600	IN	SRV	20 10 389 sec4.ad3.baseos.qe.
_ldap._tcp.ad3.baseos.qe. 3600	IN	SRV	10 40 389 sec3.ad3.baseos.qe.
_ldap._tcp.ad3.baseos.qe. 3600	IN	SRV	10 30 389 sec2.ad3.baseos.qe.
_ldap._tcp.ad3.baseos.qe. 3600	IN	SRV	10 20 389 sec1.ad3.baseos.qe.
_ldap._tcp.ad3.baseos.qe. 3600	IN	SRV	20 30 389 sec6.ad3.baseos.qe.
_ldap._tcp.ad3.baseos.qe. 3600	IN	SRV	20 20 389 sec5.ad3.baseos.qe.

;; ADDITIONAL SECTION:
sec4.ad3.baseos.qe.	3600	IN	A	10.20.30.41
sec3.ad3.baseos.qe.	3600	IN	A	10.20.30.41
sec2.ad3.baseos.qe.	3600	IN	A	10.20.30.41
sec1.ad3.baseos.qe.	3600	IN	A	10.20.30.41
sec6.ad3.baseos.qe.	3600	IN	A	10.20.30.41
sec5.ad3.baseos.qe.	3600	IN	A	10.20.30.41

;; Query time: 116 msec
;; SERVER: 10.37.152.15#53(10.37.152.15)
;; WHEN: Wed Nov 20 07:46:43 EST 2019
;; MSG SIZE  rcvd: 377

:: [ 07:46:43 ] :: [   PASS   ] :: Command 'dig srv _ldap._tcp.ad3.baseos.qe' (Expected 0, got 0)
:: [ 07:46:43 ] :: [   PASS   ] :: The number of Domain controllers found with dig are matching with the number of netlogon pings sent by adcli 
:: [ 07:46:43 ] :: [   LOG    ] :: Clean up
:: [ 07:46:43 ] :: [   LOG    ] :: File [/etc/krb5.keytab] doesn't exist, so computer isn't connected to the AD domain
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 19s
::   Assertions: 4 good, 0 bad
::   RESULT: PASS (adcli info send netlogon pings to all domains controllers)

Comment 11 errata-xmlrpc 2020-03-31 19:45:16 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, 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/RHBA-2020:1055