Bug 754738 - katello-jobs not returning proper service status (when process wedged?)
Summary: katello-jobs not returning proper service status (when process wedged?)
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Katello
Classification: Retired
Component: Installer
Version: 1.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 1.x
Assignee: Miroslav Suchý
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-17 15:44 UTC by Corey Welton
Modified: 2012-10-29 14:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-29 14:32:50 UTC


Attachments (Terms of Use)

Description Corey Welton 2011-11-17 15:44:23 UTC
Description of problem:
I am not sure exactly how to reproduce the wedging, though I currently have a system where it is occurring.  

In any case, I noticed that my template promotions weren't taking place, so I checked status of the katello-jobs status. Boiled down, it comes to this:


[root@se-rhelbox katello]# service katello-jobs status
katello-jobs is not running.
[root@se-rhelbox katello]# service katello-jobs start; cat jobs-startup.log 
Starting katello-jobs:                                     [  OK  ]
/usr/share/katello/app/models/sync_plan.rb:35: warning: don't put space before argument parentheses
ERROR: there is already one or more instance(s) of the program running

So there are two issues, probably related:
1) the service script thinks something is not running (when it may be?)
2) Somehow it is returning an OK on the start, even though the error logs indicate otherwise.  

Also possibly useful info:

[root@se-rhelbox katello]# ps ax|grep job
14431 ?        S      0:01 katello/delayed_job                             
14482 ?        S      0:01 katello/delayed_job                             
14561 pts/3    S+     0:00 grep job
19873 ?        S      0:01 delayed_job_monitor

Comment 1 Corey Welton 2011-11-17 15:47:22 UTC
[root@se-rhelbox katello]# service katello-jobs start
Starting katello-jobs:                                     [  OK  ]
[root@se-rhelbox katello]# echo $?
0

Comment 2 Lukas Zapletal 2011-12-07 15:27:44 UTC
It's due to very poor daemon interface of delayed_jobs. Will pick this up later on.

Comment 3 Miroslav Suchý 2012-09-06 11:42:51 UTC
taking

Comment 4 Miroslav Suchý 2012-09-07 18:04:00 UTC
https://github.com/Katello/katello/pull/613

Comment 5 Miroslav Suchý 2012-09-10 07:18:49 UTC
| * 0e78e3f (fork/pull-req-bz754738, pull-req-bz754738) 754738 - do not override variables in other procedures
| * 804d5ba 754738 - do not override status() from /etc/rc.d/init.d/functions
| * 73c80bf 754738 - fix name of monitor pid file
| * 2a98a6c 754738 - if program is already running, print failure, but return 0
| * ba2f8c6 754738 - if we fail in stopping delayed_jobs, kill it. One by one.
| * 225d592 75473 - correctly solve status for all processes of delayed_jobs
| * 2bd03eb 754738 - log even output of service stop
| * ddd5d85 use runuser instead of su
| * f3e3106 75473 - do not delete nor truncate log
| * 6048c1a 754738 - properly return when katello is not configured

Comment 6 Lukas Zapletal 2012-10-29 14:32:50 UTC
Part of Katello 1.1 release


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