Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1263990

Summary: Mail error fails repo sync task and also error is unclear
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: EmailAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.2CC: bbuckingham, sreber
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-16 00:08:46 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: 1122832    
Attachments:
Description Flags
export of failing task none

Description Peter Vreman 2015-09-17 09:27:22 UTC
Description of problem:
When Notifications are configured for a user, then errata mails are trying to be send out after a RedHat repository sync.
Somehow the mail server configuration is not correct. Then the task fails with with the very generic "getaddrinfo: Name or service not known". At first glance you think of the Pulp repo sync that could not resolve find the url upstream server. Only after a closer in Backtrace in the 3rd Action you see that the Actions::Katello::Repository::ErrataMail triggered the error and did a Pulp Cancel.

For the User it would be more helpful to be informed that the real error was that the Errata Mail could not be send.

Additionally From a User i see Errata Mail as a independent Action that is executed after the original Action (e.g. Repository Sync) succeeded. Because i my case the Repository Sync was in fact successful finished.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Make sure the Mail server is not set or to a not existing domain name
2. Enable All notifications for a User
3. Sync RedHat Repositories
3.

Actual results:
Repo Sync Fails

Expected results:
Repo Sync Fails
Errata Mail Action Fails with clear error message that the Mail server could not be found


Additional info:

Comment 1 Peter Vreman 2015-09-17 11:02:24 UTC
Created attachment 1074398 [details]
export of failing task

Comment 2 Peter Vreman 2015-09-17 12:09:38 UTC
Rewording of Expected Results:
- Reposync Task Succeeds
- Indepedent ErrataMail Task Fails

Comment 3 Peter Vreman 2015-09-17 12:43:26 UTC
The behavior can be triggered when the out-of-the-box email.yaml is used that has a dummy smtp server value:

$ cat /etc/foreman/email.yaml
# Outgoing email settings

production:
  delivery_method: :smtp
  smtp_settings:
    address: smtp.example.com
    port: 25
    domain: example.com
    authentication: :none

Comment 4 Peter Vreman 2015-09-17 13:36:38 UTC
Being referenced from other BZs I have found https://access.redhat.com/solutions/1579953 that mentions this issue also and also the fix how to configure it.

But I did not find any BZ that asked for solving the real issue behind it, that an failing ErrataMail shall not make a Successful repositories Syncs failing.

Comment 5 Brad Buckingham 2015-10-16 00:08:46 UTC

*** This bug has been marked as a duplicate of bug 1261068 ***