Project

General

Profile

Actions

Bug #22679

closed

REX task using job template for reboot might hang despite reboot succeeded

Added by Pavel Moravec about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

After issuing a host reboot job through SSH-based REX, the job may remain in Pending state on Satellite. The host reboots just fine as expected but even after 18+ hours the task still shows Pending.

This happens just sometimes, with some random probability depending on several factors.

The problem is expected to appear in situation when the `reboot` command switches off network before the command returns success value back to `ssh`. Therefore, the `ssh` command is not properly completed.

A simple solution is to replace `reboot` by e.g. `shutdown -r +1` to delay the reboot by 1 minute, which allows the command and ssh to properly terminate. The negs is the reboot will happen with one minute delay.

We can try to come up with some bash tricks like:

(sleep 2; reboot) &
true

but I am afraid some gotchas can be found there as well - anyway I am open to any suggestion, the `shutdown -r +1` is just a proposal (with its own drawback).

PR for it on the way..


Related issues 1 (0 open1 closed)

Copied from Foreman Remote Execution - Bug #22630: REX task using job template for reboot might hang despite reboot succeededDuplicate02/20/2018Actions
Actions #1

Updated by Pavel Moravec about 6 years ago

  • Copied from Bug #22630: REX task using job template for reboot might hang despite reboot succeeded added
Actions #2

Updated by Pavel Moravec about 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF