Bug #17326

Remote execution of a Service Action(start) pending indefinitely

Added by Adam Ruzicka 7 months ago. Updated 6 months ago.

Status:Closed
Priority:High
Assigned To:Adam Ruzicka
Category:-
Target version:Foreman - Team Ivan Iteration 6
Difficulty: Pull request:https://github.com/theforeman/foreman_remote_execution/pull/209
Bugzilla link:1392948
Story points-
Velocity based estimate-

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1392948

Description of problem: Customer using remote command feature to start puppet(or any other service like-goferd tuned, besclient) service on the client. When he is executing remote command job using "Service Action - SSH Default" template, with action "start" and service "puppet to start the service the job/task for the remote command went into pending state however puppet service started on the client without any issue.

On the client server, there is a sleeping process related to this job:

lvmts005:/root > ps ef | grep foreman-ssh | grep -v grep
root 15244 15227 0 16:30 pts/0 00:00:00 bash -c exec 4>&1? exit_code=`((/var/run/satellite/foreman-ssh-cmd-a5190486-66df-4117-a446-6f5012ceb900/script; echo $?>&3 ) | /usr/bin/tee /var/run/satellite/foreman-ssh-cmd-a5190486-66df-4117-a446-6f5012ceb900/output ) 3>&1 >&4`? exec 4>&
? exit $exit_code?

How reproducible:
Always

Steps to Reproduce:
1. Stop puppet (or any affected service) on the client
2. Schedule a remote command to start that command

Actual results:
Task generated for that remote command keep pending indefinitely however service started on the client

Expected results:
Task should completed

Additional info:

If customer stop/restart puppet service in the client from the command line after starting it with a remote job, then the foreman-ssh-cmd process sleeping in the client is somehow resumed and the task is completed in Satellite.

Associated revisions

Revision a3a39f08
Added by Adam Ruzicka 6 months ago

Fixes #17326 - Handle getting exitcode better

History

#1 Updated by The Foreman Bot 7 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/209 added

#2 Updated by Adam Ruzicka 7 months ago

  • Subject changed from Remote execution of a Service Action(start) pending indefinitely to Remote execution of a Service Action(start) pending indefinitely
  • Priority changed from Normal to High
  • Target version set to Team Ivan Iteration 6

#3 Updated by Adam Ruzicka 6 months ago

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

Also available in: Atom PDF