Bug 1272342

Summary: Mosquitto daemon does not load any config file
Product: [Fedora] Fedora Reporter: C. Gräfe <redhat>
Component: mosquittoAssignee: Fabian Affolter <mail>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 22CC: mail, richmattes
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: mosquitto-1.4.9-2.fc24 mosquitto-1.4.9-2.fc23 mosquitto-1.4.9-2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-12 15:06:50 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 C. Gräfe 2015-10-16 07:27:47 UTC
Description of problem:
The package in question contains a systemd service description (/usr/lib/systemd/system/mosquitto.service) and provides a directory for configuration (/etc/mosquitto) including an example config file. When I create and modify the actual config from the example and restart the service, I would expect the service to load it. This does not happen though, since the mosquitto daemon requires any config file to be specified using the '-c' command line argument. This argument is missing in the service definition, so the daemon will always use its default configuration.

Version-Release number of selected component (if applicable):
1.4.2-1.fc22 

How reproducible:
Install mosquitto using dnf, create config in /etc/mosquitto, restart service.

Steps to Reproduce:
1. dnf install mosquitto
2. cp /etc/mosquitto/mosquitto.conf.example /etc/mosquitto/mosquitto.conf
3. edit mosquitto.conf
4. systemctl restart mosquitto

Actual results:
The mosquitto daemon is still operating on its compiled-in configuration.

Expected results:
The mosquitto daemon should load the configuration from /etc/mosquitto/mosquitto.conf instead.


Additional info:
I would suggest moving /etc/mosquitto/mosquitto.conf.example to /etc/mosquitto/mosquitto.conf in the package and modifying the service definition:

@@ -3,7 +3,7 @@
 Documentation=man:mosquitto.conf(5) man:mosquitto(8)

 [Service]
-ExecStart=/usr/sbin/mosquitto
+ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
 User=mosquitto

 [Install]

Comment 1 Rich Mattes 2015-12-10 00:49:21 UTC
I think that's reasonable, and it follows the same pattern as the upstart script shipped with mosquitto.  I can add the -c to the unit file, and install the example config file to mosquitto.conf as %config(noreplace) so it doesn't blow away anyone's custom mosquitto.conf

Comment 2 Fedora Update System 2016-07-01 15:02:58 UTC
mosquitto-1.4.9-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-eee2b6b6d7

Comment 3 Fedora Update System 2016-07-01 15:19:34 UTC
mosquitto-1.4.9-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-bc85eafce6

Comment 4 Fedora Update System 2016-07-01 15:36:16 UTC
mosquitto-1.4.9-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-462e3d081f

Comment 5 Fedora Update System 2016-07-02 20:20:40 UTC
mosquitto-1.4.9-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-462e3d081f

Comment 6 Fedora Update System 2016-07-02 20:29:23 UTC
mosquitto-1.4.9-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-eee2b6b6d7

Comment 7 Fedora Update System 2016-07-02 20:54:17 UTC
mosquitto-1.4.9-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-bc85eafce6

Comment 8 Fedora Update System 2016-07-12 15:06:44 UTC
mosquitto-1.4.9-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2016-07-15 10:23:49 UTC
mosquitto-1.4.9-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2016-11-19 12:48:17 UTC
mosquitto-1.4.9-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.