Bug 1396651
| Summary: | Failed to read PID from file /var/run/iscsid.pid: Invalid argument | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | John Pittman <jpittman> |
| Component: | iscsi-initiator-utils | Assignee: | Chris Leech <cleech> |
| Status: | CLOSED ERRATA | QA Contact: | Filip Suba <fsuba> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.3 | CC: | alex.wang, fsuba, jpittman, jsynacek, liu.junbj, loberman, nweddle, revers, systemd-maint-list, tcleveng, voxadam |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | iscsi-initiator-utils-6.2.0.874-15 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-31 20:03:52 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1420851, 1711360 | ||
|
Description
John Pittman
2016-11-18 20:31:18 UTC
It was just noted that disabling selinux is a workaround for this. selinux-policy-3.13.1-102.el7_3.4.noarch log snip with selinux disabled: https://paste.fedoraproject.org/484529/ Can you provide us the message from /var/log/audit/audit.log why selinux denied accessing that pid file? There doesn't seem to be a denial, and in my tests today, disabling selinux did not work around the issue, we get the same message of failure. Possibly changed the timing enough in my earlier attempts to get rid of the message. It looks like the pid file is there, but no pid has been written in it when systemd tries to read it. Does this happen only once on boot? Or every time that you start/restart iscsid? It happens every time. I've been able to reproduce at boot, with 'systemctl restart iscsid' and 'systemctl stop iscsid ; systemctl start iscsid'. I managed to reproduce this in my VM. Excerpt from the debug log (with my comments marked):
Nov 24 12:47:54 rhel7-virt systemd[1]: About to execute: /usr/sbin/iscsid
Nov 24 12:47:54 rhel7-virt systemd[1]: Forked /usr/sbin/iscsid as 1272
Nov 24 12:47:54 rhel7-virt systemd[1]: iscsid.service changed dead -> start
Nov 24 12:47:54 rhel7-virt systemd[1]: Starting Open-iSCSI...
Nov 24 12:47:54 rhel7-virt systemd[1272]: Executing: /usr/sbin/iscsid
Nov 24 12:47:54 rhel7-virt iscsid[1272]: iSCSI logger with pid=1276 started!
Nov 24 12:47:54 rhel7-virt iscsid[1276]: iSCSI daemon with pid=1277 started!
Nov 24 12:47:54 rhel7-virt systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/iscsid_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=82 reply_cookie=0 error=n/a
Nov 24 12:47:54 rhel7-virt systemd-logind[748]: Got message type=signal sender=:1.0 destination=n/a object=/org/freedesktop/systemd1/unit/iscsid_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=82 reply_cookie=0 error=n/a
Nov 24 12:47:54 rhel7-virt systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/iscsid_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=83 reply_cookie=0 error=n/a
Nov 24 12:47:54 rhel7-virt systemd-logind[748]: Got message type=signal sender=:1.0 destination=n/a object=/org/freedesktop/systemd1/unit/iscsid_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=83 reply_cookie=0 error=n/a
Nov 24 12:47:54 rhel7-virt systemd[1]: Received SIGCHLD from PID 1272 (iscsid).
Nov 24 12:47:54 rhel7-virt systemd[1]: Child 1272 (iscsid) died (code=exited, status=0/SUCCESS)
Nov 24 12:47:54 rhel7-virt systemd[1]: Child 1272 belongs to iscsid.service
Nov 24 12:47:54 rhel7-virt systemd[1]: iscsid.service: control process exited, code=exited status=0
Nov 24 12:47:54 rhel7-virt systemd[1]: iscsid.service got final SIGCHLD for state start
^^^^ systemd realizes that it got the final SIGCHLD, but the PID file hasn't been written yet (by iscsid).
Nov 24 12:47:54 rhel7-virt systemd[1]: Failed to read PID from file /var/run/iscsid.pid: Invalid argument
Nov 24 12:47:54 rhel7-virt systemd[1]: Setting watch for iscsid.service's PID file /var/run/iscsid.pid
^^^^ systemd starts watching for the soon-to-be PID file...
Nov 24 12:47:54 rhel7-virt systemd[1]: Trying to read iscsid.service's PID file /var/run/iscsid.pid in case it changed
Nov 24 12:47:54 rhel7-virt systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/iscsid_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=95 reply_cookie=0 error=n/a
Nov 24 12:47:54 rhel7-virt systemd-logind[748]: Got message type=signal sender=:1.0 destination=n/a object=/org/freedesktop/systemd1/unit/iscsid_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=95 reply_cookie=0 error=n/a
Nov 24 12:47:54 rhel7-virt systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/iscsid_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=96 reply_cookie=0 error=n/a
Nov 24 12:47:54 rhel7-virt systemd-logind[748]: Got message type=signal sender=:1.0 destination=n/a object=/org/freedesktop/systemd1/unit/iscsid_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=96 reply_cookie=0 error=n/a
Nov 24 12:47:54 rhel7-virt systemd[1]: inotify event for iscsid.service
^^^^ ...and it appears...
Nov 24 12:47:54 rhel7-virt systemd[1]: Main PID loaded: 1277
Nov 24 12:47:54 rhel7-virt systemd[1]: Stopping watch for iscsid.service's PID file /var/run/iscsid.pid
^^^^ ...and it is read, everything works as expected
Nov 24 12:47:54 rhel7-virt systemd[1]: iscsid.service changed start -> running
Nov 24 12:47:54 rhel7-virt systemd[1]: Job iscsid.service/start finished, result=done
Nov 24 12:47:54 rhel7-virt systemd[1]: Started Open-iSCSI.
Nov 24 12:47:54 rhel7-virt systemd[1]: iscsid.socket changed listening -> running
From now on, the service runs without any problems. I don't think that there are any problems with systemd with regards to this bug. If anything should be fixed, it's the iscsid - it should write the file earlier.
Has any progress been made on this? If this is indeed a bug in iscsid, has anyone reported it upstream? It's been over a year since the last update, any progress on this? Verified with iscsi-initiator-utils-6.2.0.874-17. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:1124 |