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 1208834

Summary: Negative DNS caching causes troubles for go binaries
Product: Red Hat Enterprise Linux 7 Reporter: Michal Minar <miminar>
Component: golangAssignee: Jakub Čajka <jcajka>
Status: CLOSED NOTABUG QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.1CC: jcajka, mnewsome
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-14 09:15:24 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:
Bug Depends On:    
Bug Blocks: 1189840    
Attachments:
Description Flags
go reproducer none

Description Michal Minar 2015-04-03 11:08:49 UTC
Created attachment 1010599 [details]
go reproducer

Description of problem:
  Golang binaries remember failed attempts of domain name resolutions and fail again after the connection is restored.

Version-Release number of selected component (if applicable):
  golang-1.3.3-3.el7

How reproducible:
  In one of two cases.

Steps to Reproduce:
1. Make sure networking is deconfigured - no IPv4 address on the primary $NIC
2. docker pull fedora
3. nmcli d connect $NIC
4. docker pull fedora

Actual results:
  'docker pull' doesn't resolve index.docker.io even if the internet connection is restored. ping index.docker.io works well

Expected results:
  'docker pull' works as soon as the internet connectivity is restored after failing first

Additional info:
  Fedora rawhide does not suffer from this issue. I've tried to compile rawhide's golang (1.4.2) on RHEL7 only to find out that it behaves a little bit better (fails in 1 case out of 4) which it's still quite bad.
  Attached is a simple go reproducer that tries to ping url, brings interface down, pings again, brings interface up and pings once again. The 3rd attempt should never fail.
  The same reproducer written in python doesn't fail (will be attached later). Therefore I believe this is somehow related to golang.

Comment 1 Michal Minar 2015-04-03 11:10:09 UTC
Python reproducer is attached to parent bug: https://bugzilla.redhat.com/attachment.cgi?id=1010593

Comment 5 Jakub Čajka 2016-06-14 09:15:24 UTC
I have been unable to reproduce this issue using the attached reproducer on RHEL-7.2 with golang-1.4.2-9.el7. Feel free to reopen this bug with more information, if your issue still persists.