Bug 1714373
Summary: | systemd-cat output not associated with the unit that generated it | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Robin A. Meade <robin.a.meade> |
Component: | systemd | Assignee: | systemd-maint |
Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 30 | CC: | lnykryn, msekleta, ssahani, s, systemd-maint, zbyszek |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-07-21 09:39:53 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
Robin A. Meade
2019-05-27 21:51:21 UTC
Possible explanation: https://bbs.archlinux.org/viewtopic.php?pid=1326954#p1326954 "The reason for this is a race condition, because the logger/systemd-cat process dies before journald can get the information it needs." -- September 2013 I integrated the workaround offered in the above archlinux.org forum and it worked: File: /usr/bin/test_service.sh ``` # The script: /usr/bin/test_service.sh sudo tee /usr/bin/test_service.sh > /dev/null << "EOF" # For info messages: info=/tmp/myservice-systemd-cat-pipe-info mkfifo "$info" trap "exec 3>&-; rm $info" EXIT systemd-cat -p info < "$info" & exec 3>"$info" # For warning messages: warning=/tmp/myservice-systemd-cat-pipe-warning mkfifo "$warning" trap "exec 4>&-; rm $warning" EXIT systemd-cat -p warning < "$warning" & exec 4>"$warning" # For err messages: err=/tmp/myservice-systemd-cat-pipe-err mkfifo "$err" trap "exec 5>&-; rm $err" EXIT systemd-cat -p err < "$err" & exec 5>"$err" echo "This is an information message" > "$info" echo "This is an warning message" > "$warning" echo "This is an error message" > "$err" DATE=`date '+%Y-%m-%d %H:%M:%S'` echo "Example service started at ${DATE}" > "$info" while : do echo "Looping..."; sleep 30; done EOF ``` Yep, not much we can do unless the kernel helps us. *** This bug has been marked as a duplicate of bug 963620 *** |