Bug 134459
| Summary: | mdadm prints [OK] twice when starting up | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Reuben Farrelly <reuben-redhatbugzilla> |
| Component: | mdadm | Assignee: | Doug Ledford <dledford> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2005-05-16 22:01:39 UTC | Type: | --- |
| 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: | 136451 | ||
|
Description
Reuben Farrelly
2004-10-03 00:08:43 UTC
I don't see this, but that's probably due to terminal position sequences and the two OKs overwriting each other. In any case, it's not entirely clear what the right thing to do here is because there are two different things being checked. One is an OK because the program was successfully started. The other is because the program stayed started, which is to say that it didn't have any post fork hiccups. I inhereted this package with that little startup script oddness, and I'm not entirely sure if it needs to stay. I emailed Neil Brown (mdadm author) about this and he's what he had to say: "I'm not sure what the actual problem is, but mdadm now has a "--daemonise" option would could probably be used to remove half of the ugly code in the script." man mdadm says: -f, --daemonise Tell mdadm to run as a background daemon if it decides to monitor anything. This causes it to fork and run in the child, and to disconnect form the terminal. The process id of the child is written to stdout. This is useful with --scan which will only continue monitoring if a mail address or alert program is found in the config file. So maybe this can be used to simplify some of the complexity of the init script. mdadm-1.8.0 is now out: http://www.spinics.net/lists/raid/msg06699.html One of the new features in this release is: --pid-file option to declare a file to record the pid in for --monitor --daemonise Probably useful for cleaning up this part of the initscript: daemon --check mdadm \ "/bin/bash -c \"mdadm --monitor --scan -f > /var/run/mdadm/mdadm.pid\"" # hack: wait for mdadm to die, assume success if it doesn't die quickly usleep 100000 if [ -s /var/run/mdadm/mdadm.pid -a -d /proc/$(cat /var/run/mdadm/mdadm.pid) ] ; then Checking in a cleanup to this section of the code now. 1.11.0-4.fc4 and later will have the new mdmonitor init script. |