Bug 1473771

Summary: hammer host package remove command hangs indefinitely when launched
Product: Red Hat Satellite Reporter: Djebran Lezzoum <dlezzoum>
Component: Remote ExecutionAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: aruzicka, bbuckingham, dlezzoum, inecas, sshtein
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-22 13:54:45 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:

Comment 2 Shimon Shtein 2017-08-16 07:43:19 UTC
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 08:06:35 UTC
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 11:03:14 UTC
@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
Usage:
    hammer host package-group remove [OPTIONS]

Options:
 --async                       Do not wait for the task

Is it good enough?

Comment 5 Djebran Lezzoum 2017-08-17 16:31:52 UTC
Hi Shimon, many thanks for the explanation. 

Yes I think it's good enough.

Comment 6 Ivan Necas 2017-08-22 13:54:45 UTC
Based on comments, I'm closing as notabug