Bug 828354
Summary: | mdadm-takeover.service not removed on uninstallation | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miloslav Trmač <mitr> |
Component: | mdadm | Assignee: | Jes Sorensen <Jes.Sorensen> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 17 | CC: | agk, dledford, janina, Jes.Sorensen, mschmidt |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-07-11 23:53:31 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: |
mdadm doesn't create this symlink itself, so it doesn't seem quite correct that we remove it when the package is uninstalled. Seems to be a systemd issue to me? Michal? From mdadm.spec: %post if [ $1 -eq 1 ] ; then /bin/systemctl enable mdmonitor.service mdmonitor-takeover.service >/dev/null 2>&1 || : fi Michal, I see - thanks. What is the right way to disable/remove it on uninstall? We have the following for mdmonitor.service - do I need two equivalent lines for mdmonitor-takeoever.service? %preun if [ $1 = 0 ]; then /bin/systemctl --no-reload disable mdmonitor.service > /dev/null 2>&1 || : /bin/systemctl stop mdmonitor.service > /dev/null 2>&1 || : fi or is systemctl disable mdmonitor-takeover.service enough? This systemctl fu is all black magic.... Thanks, Jes > We have the following for mdmonitor.service - do I need two equivalent > lines for mdmonitor-takeoever.service? The lines for mdmonitor.service look correct to me. They match the packaging guidelines: http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd Yes, you need to perform the same actions for mdmonitor-takeover.service. Note that systemctl can operate on more than one unit at a time, so you don't have to add more lines to the script. You can just add mdmonitor-takeover.service to the lines you already have. > This systemctl fu is all black magic.... These commands are no more magical than "chkconfig --del FOO" and "service FOO stop" were in SysV. Thanks, I'll add that to the next update! chkconfig is about the same, but I don't know that service command you are referring to. The normal way to do things in sysv is to use /etc/rc.d/init.d/<FOO> {stop,start,status,...} Much easier when one can use the file system to browse things :) Cheers, Jes (In reply to comment #5) > chkconfig is about the same, but I don't know that service command you > are referring to. The normal way to do things in sysv is to use > /etc/rc.d/init.d/<FOO> {stop,start,status,...} This usually worked... except in cases where it did not. /sbin/service was always the better way because at least it tried to provide a clean environment to services. (I learned about the problems of directly running initscripts in bug 588745.) mdadm-3.2.5-3.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/mdadm-3.2.5-3.fc17 mdadm-3.2.5-3.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/mdadm-3.2.5-3.fc16 Package mdadm-3.2.5-3.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mdadm-3.2.5-3.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-9931/mdadm-3.2.5-3.fc16 then log in and leave karma (feedback). mdadm-3.2.5-3.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. mdadm-3.2.5-3.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. Hmmm, seems to still (or again) be a problem on F18. I have -3.2.6-11.x86_64 |
Description of problem: After uninstalling mdadm, a dangling symlink > /etc/systemd/system/sysinit.target.wants/mdmonitor-takeover.service -> /usr/lib/systemd/system/mdmonitor-takeover.service is left around, causing systemd to log ? Jun 3 05:53:01 kulicka systemd[1]: Cannot add dependency job for unit mdmonitor-takeover.service, ignoring: Unit mdmonitor-takeover.service failed to load: No such file or directory. See system logs and 'systemctl status mdmonitor-takeover.service' for details. Version-Release number of selected component (if applicable): mdadm-3.2.3-6.fc17.x86_64 Additional info: The %post script adds both mdmonitor and mdmonitor-takeover services, but %preun (and %postun?) do not mention mdmonitor-takeover.