Bug 1409562
| Summary: | Preparation for sending SIGTERM to rhn_check when rhnsd is terminated | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jiří Dostál <jdostal> |
| Component: | rhnsd | Assignee: | Jiří Dostál <jdostal> |
| Status: | CLOSED ERRATA | QA Contact: | Lukáš Hellebrandt <lhellebr> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.2 | CC: | jalviso, jdostal, jhutar, lhellebr, tlestach |
| Target Milestone: | rc | ||
| 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: | 2017-08-01 22:19:00 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: | 1395284 | ||
|
Description
Jiří Dostál
2017-01-02 13:29:19 UTC
When running multiple commands with the restart not being last, the execution stops after restart and the rest of the commands is not executed. The action is marked as Completed, with text 'Client execution returned "Script executed. Termination signal occurred during execution" (code 0)'. Example: 1) schedule remote command """ shutdown -r now echo test >> /root/test """ 2) rhn_check 3) after restart: # cat /root/test cat: test: No such file or directory 4) In WebUI, notice the action is marked as Completed, with text 'Client execution returned "Script executed. Termination signal occurred during execution" (code 0)' Needinfo: Is this acceptable behavior? Yes, this is exactly the reason why this result message has been chosen. If user runs a script with instant reboot "somewhere inside", we can't guarantee that this script was executed to the end, that's why we're letting him know that it was "terminated during execution". Verified with rhnlib-2.5.65-4, rhn-client-tools-2.0.2-11 (ONLY, rhn-client-tools-2.0.2-16 version is broken), rhnsd-5.0.13-7. The signal is sent correctly but SELinux blocks it. Follow up bug 1466430 created. I am treating this BZ as "rhnsd *tries* to send signal to rhn_check". 1. Have a Client (with setenforce 1) registered to some Satellite 5, with provisioning and packages necessary for remote command execution installed 2. Schedule a remote command with long sleep to the Client 3. Wait for rhnsd to run rhn_check * 4. After the command is in picked-up state, kill rhnsd with SIGTERM 5. This causes rhnsd to send SIGTERM to the running rhn_check 6. Mentioned AVC denial occurs, rhn_check doesn't receive the signal and rhnsd waits indefinitely for rhn_check's termination This also happens in 7.3 with package versions in which this BZ is fixed. * if you do not want to wait, use gdb: gdb -p <rhnsd PID> c ^C select-frame 2 set var sleep_untile=<now+1> select-frame 1 return (unsigned int)0 c 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-2017:2039 |