Bug 1473771 - hammer host package remove command hangs indefinitely when launched
hammer host package remove command hangs indefinitely when launched
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Remote Execution (Show other bugs)
x86_64 Linux
unspecified Severity high (vote)
: Beta
: --
Assigned To: satellite6-bugs
: Regression, Triaged
Depends On:
  Show dependency treegraph
Reported: 2017-07-21 11:07 EDT by Djebran Lezzoum
Modified: 2017-08-22 09:54 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-08-22 09:54:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Comment 2 Shimon Shtein 2017-08-16 03:43:19 EDT
The behavior depends on a task: it shows the progress of the task. If the task runs for too long, it will appear as the command is hanging. Eventually it will stop, but it will take a long time.

Workaround: you can always press CTRL+C to stop the hammer command, the asynchronous task will continue running in the background.

Is it acceptable?
Comment 3 Djebran Lezzoum 2017-08-16 04:06:35 EDT
Hi Shimon,

As you said the process is taking too much time, but it's too much for removing a package, I can assume this behavior is affected by bug https://bugzilla.redhat.com/show_bug.cgi?id=1457977
but it should have a reasonable timeout to exit as other tasks do.

Any way we have fixed our automation to cancel such process when reaching a time limit (as the whole automation was hanging on that tests), but in a client environment it can appear annoying and not acceptable.
Comment 4 Shimon Shtein 2017-08-17 07:03:14 EDT
@dlezzoum Thanks for the quick reply, after digging a bit into the code I have fond the following things that could help here:

1. Content tasks have a timeout setting - look for content_action_finish_timeout setting in the Administer -> Settings UI section (it's called "Finish action timeout" in the content tab).
2. You can add --async in the hammer command to release the execution:

# hammer host package-group remove --help
    hammer host package-group remove [OPTIONS]

 --async                       Do not wait for the task

Is it good enough?
Comment 5 Djebran Lezzoum 2017-08-17 12:31:52 EDT
Hi Shimon, many thanks for the explanation. 

Yes I think it's good enough.
Comment 6 Ivan Necas 2017-08-22 09:54:45 EDT
Based on comments, I'm closing as notabug

Note You need to log in before you can comment on or make changes to this bug.