Bug 1741806

Summary: No error message shown, when trying to start dnsmasq and port is already used by another process
Product: Red Hat Enterprise Linux 7 Reporter: Steffen Froemer <sfroemer>
Component: dnsmasqAssignee: Petr Menšík <pemensik>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: thozza
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1774028 (view as bug list) Environment:
Last Closed: 2019-11-19 13:15:13 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:

Description Steffen Froemer 2019-08-16 07:17:07 UTC
Description of problem:
Starting the dnsmasq.service, when port 53 is already used by another process, the command is returning exitvalue 0 and failing silently.

Version-Release number of selected component (if applicable):
dnsmasq-2.76-9.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. Install RHEL 7.6
2. yum install dnsmasq -y
3. python -m SimpleHTTPServer 53
4. systemctl start dnsmasq

Actual results:
Service fail to start silently. No output shown

Expected results:
# systemctl start dnsmasq
Job for dnsmasq.service failed because the control process exited with error code. See "systemctl status dnsmasq.service" and "journalctl -xe" for details.


Additional info:
[root@localhost ~]# systemctl start dnsmasq
[root@localhost ~]# echo $?
0
[root@localhost ~]# systemctl start httpd                                                                              
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@localhost ~]# echo $?                                                                                            
1

Comment 2 Petr Menšík 2019-08-23 15:06:15 UTC
It is visible in systemctl dnsmasq status. But I admit that is not great way to check it.

It would require change of systemd service unit from Type=simple to forking or notify. Both implement status check and report if daemon fails.

I think notify is better alternative for systemd services is Type=notify, but no support for it exists in upstream. It should change way it switches to unprivileged user if abrt catching of core dumps should not break.
dnsmasq forks already second process, but not in way that can be reused for checking status on startup. Might be a little easier, but I think it is already considered superseded by notify. This is also not supported in current code.
Either way requires new code for reporting failure before serving requests.

Comment 3 Tomáš Hozza 2019-11-19 13:15:06 UTC
Hello.

RHEL-7 is in Maintenance Phase 1 in which qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available [1]. This bugs is not critical and has no business justification or customer case attached. Since the functionality is still not implemented in upstream, it has been cloned into Fedora as Bug #1774028 for tracking purposes. There is no plan to add new features in dnsmasq in RHEL-7, therefore I'm closing this request as WONTFIX.

[1] https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_1_Phase

Comment 4 RHEL Program Management 2019-11-19 13:15:13 UTC
Development Management has reviewed and declined this request. You may appeal this decision by using your Red Hat support channels, who will make certain  the issue receives the proper prioritization with product and development management.

https://www.redhat.com/support/process/production/#howto