Bug 1498813

Summary: Retrieve partial output of script.run action if it gets SIGKILLed
Product: Red Hat Satellite 5 Reporter: Tomáš Kašpárek <tkasparek>
Component: ClientAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED ERRATA QA Contact: Pavel Studeník <pstudeni>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: pstudeni, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhncfg-5.10.87-12-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-28 14:45:27 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: 1494389    
Bug Blocks: 1450111    

Description Tomáš Kašpárek 2017-10-05 10:18:58 UTC
Description of problem:
When client is executing remote script with some output and rhn_check process gets killed (e.g. BZ#1494389 and BZ#1260527) we can store the partial output and then resend it back to Satellite in case the action is picked up again in pending state (for 2nd time)

Version-Release number of selected component (if applicable):
rhncfg-5.10.87-11

How reproducible:
always

Steps to Reproduce:
1. schedule remote command like:
#!/bin/sh
echo bla bla
sleep 10
2. rhn_check -vv on the client
3. once it's visible from rhn_check's output that the actions has started it's execution run: pkill -KILL rhn_check

Actual results:
no previous output is sent back to satellite

Expected results:
At least some output is either stored on the client or send back to satellite.

Additional info:
Typical use case are remote commands like "yum update && reboot" and osad running on client.

Comment 1 Tomáš Kašpárek 2017-10-05 14:10:14 UTC
spacewak.git(master): 67f94213d29facb3925f6063bd41bf8ca33b0c95

Won't work without updated rhn_check, but cuases no harm without it.

Comment 2 Tomáš Kašpárek 2017-12-12 11:53:59 UTC
spacewalk.git(master): bb58e1a4ef55f1130ee1f591b89d58388ecb8969

Comment 6 Pavel Studeník 2018-01-11 13:52:27 UTC
Verified with:

rhncfg-5.10.87-12.el7sat.noarch
rhnlib-2.5.65-7.el7.noarch


Reproducer same as Description

SIGTERM: Client execution returned "Termination signal occurred during execution." (code 255)

SIGKILL: Client execution returned "Previous run of action didn't completed sucessfully, aborting." (code 255)

Comment 9 errata-xmlrpc 2018-01-28 14:45:27 UTC
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-2018:0137