Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1479476

Summary: rhn_check and restarting node
Product: [Community] Spacewalk Reporter: regis.legrand
Component: ClientsAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED NOTABUG QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 2.5CC: jdostal
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: 2017-08-24 16:06:50 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: 1484117    

Description regis.legrand 2017-08-08 15:38:33 UTC
Description of problem:

We are facing some issue with rhn_check / computer restarting.

We are using action chains in order to appy stuff like:
* execute something
* restart node
* execute something

The problem occurs when restarting the node.
The shutdown command is: "shutdown -r +3", but the delay of the restarting task is less than 3 minutes, and this is confirmed by the fact that the node never restart.


Version-Release number of selected component (if applicable):
Server is in 2.5
rhn_check 2.5.16-1

How reproducible:
I would be able to reproduce, but this seems to happen randomly, on different nodes. Actually we are not able to say that it happens in a specific case.


Steps to Reproduce:
1.
2.
3.

Actual results:

Sorry for french:

Redémarrage du système programmé par SomeUser
Cette action sera exécutée après 23/07/17 10:00:00 CEST
Le statut de cette action est : Terminé.
Le client a détecté cette action sur 23/07/17 10:07
Le client a terminé cette action sur 23/07/17 10:07

This typically says: 
restart shceduled
this action will run after 23/07/17 10:00:00 CEST
status is ended
The client has detected this action at 23/07/17 10:07
The client has ended this action at 23/07/17 10:07

So above, you can see that the delay between start and end is 0.

Expected results:
Redémarrage du système programmé par SomeUser
Cette action sera exécutée après 23/07/17 10:00:00 CEST
Le statut de cette action est : Terminé.
Le client a détecté cette action sur 23/07/17 10:07
Le client a terminé cette action sur 23/07/17 10:10 (or more)


Additional info:
NA

Comment 1 Jiří Dostál 2017-08-24 10:09:51 UTC
Hello,

what OS is your client using?

Comment 2 regis.legrand 2017-08-24 16:06:50 UTC
Hello,

The bug has been fixed.
It's due to the fact that we are using a cron job to call rhn_check.

What happens is:
* Cron call rhn_check -> ActionChain is executed until the reboot +3
* A new cron call rhn_check before the reboot is done -> The postreboot action is executed 
=> If you want my advice, this is a design problem

But it's easy to fix by checking that a shutdown process is not running before calling rhn_check.

Regards

Comment 3 Eric Herget 2017-09-28 18:12:02 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.