Bug 983376 - oo-admin-ctl-gear status show errors when pid file is missing
oo-admin-ctl-gear status show errors when pid file is missing
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Jhon Honce
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-11 01:55 EDT by Liang Xia
Modified: 2015-05-14 19:23 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-29 08:48:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Liang Xia 2013-07-11 01:55:38 EDT
Description of problem:
oo-admin-ctl-gear status show errors when pid file is missing.

Version-Release number of selected component (if applicable):
devenv_3481

How reproducible:
always

Steps to Reproduce:
1.create a perl app.
2.stop the app.
3.run oo-admin-ctl-gear status.
4.check the output.

Actual results:
Checking application app2 (85c6f568e9e111e291e012313b047002) status:
-----------------------------------------------
Cartridge: perl...
Perl is either stopped or inaccessible
/var/lib/openshift/85c6f568e9e111e291e012313b047002/perl/bin/control: line 34: /var/lib/openshift/85c6f568e9e111e291e012313b047002/perl//run/httpd.pid: No such file or directory
ERROR: List of process IDs must follow --pid.
********* simple selection *********  ********* selection by list *********
-A all processes                      -C by command name
-N negate selection                   -G by real group ID (supports names)
-a all w/ tty except session leaders  -U by real user ID (supports names)
-d all except session leaders         -g by session OR by effective group name
-e all processes                      -p by process ID
T  all processes on this terminal     -s processes in the sessions given
a  all w/ tty, including other users  -t by tty
g  OBSOLETE -- DO NOT USE             -u by effective user ID (supports names)
r  only running processes             U  processes for specified users
x  processes w/o controlling ttys     t  by tty
*********** output format **********  *********** long options ***********
-o,o user-defined  -f full            --Group --User --pid --cols --ppid
-j,j job control   s  signal          --group --user --sid --rows --info
-O,O preloaded -o  v  virtual memory  --cumulative --format --deselect
-l,l long          u  user-oriented   --sort --tty --forest --version
-F   extra full    X  registers       --heading --no-heading --context
                    ********* misc options *********
-V,V  show version      L  list format codes  f  ASCII art forest
-m,m,-L,-T,H  threads   S  children in sum    -y change -l format
-M,Z  security data     c  true command name  -c scheduling class
-w,w  wide output       n  numeric WCHAN,UID  -H process hierarchy
 
Cartridge: haproxy...
HAProxy instance is stopped
 
Running Processes:
 
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
506      26881 26836  0  2299  1236   0 00:34 ?        00:00:00 /bin/sh -c set -e; /var/lib/openshift/85c6f568e9e111e291e012313b047002/haproxy/bin/control status
506      26891 26881  0  2333  1504   0 00:34 ?        00:00:00 /bin/bash -e /var/lib/openshift/85c6f568e9e111e291e012313b047002/haproxy/bin/control status
506      26912 26891  0  3341  1060   0 00:34 ?        00:00:00 ps -FCvx -U 506
 

Expected results:
No error show.

Additional info:
/var/lib/openshift/.cartridge_repository/redhat-perl/0.0.2/bin/control
function status() {
  if ps --no-headers --pid $(< $HTTPD_PID_FILE) > /dev/null
  then
    client_result 'Perl is running'
  else
    client_result 'Perl is either stopped or inaccessible'
  fi
}

php does not have this issue.
Comment 1 Michal Fojtik 2013-08-14 09:53:10 EDT
Hi Liang,

The new 0.0.3 cartridge seems to have this bug fixed:

# Is the packaged software really running?
function status() {
  if [ -f "$HTTPD_PID_FILE" ] && ps --no-headers --pid $(< $HTTPD_PID_FILE) > /dev/null
  then
    client_result 'Perl is running'
  else
    client_result 'Perl is either stopped or inaccessible'
  fi
}
Comment 2 Meng Bo 2013-08-15 02:39:57 EDT
checked on devenv_3654, issue has been fixed.


# oo-admin-ctl-gears status

Checking application perl1 (520c76e2114ad40aa7000001) status:
-----------------------------------------------
Cartridge: perl...
Perl is either stopped or inaccessible

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