Bug 1022336 - Run command lsof in the app will show warnings.
Run command lsof in the app will show warnings.
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-10-23 01:41 EDT by Liang Xia
Modified: 2015-05-14 19:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:26:14 EST
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-10-23 01:41:35 EDT
Description of problem:
SSH into an app and run command lsof, show following warnings:
lsof: WARNING: can't stat() usbfs file system /proc/bus/usb
      Output information may be incomplete.
lsof: WARNING: can't stat() binfmt_misc file system /proc/sys/fs/binfmt_misc
      Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /cgroup/all
      Output information may be incomplete.

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

How reproducible:
always

Steps to Reproduce:
1.create an app.
2.ssh into the app and run command lsof.
3.

Actual results:
> lsof
lsof: WARNING: can't stat() usbfs file system /proc/bus/usb
      Output information may be incomplete.
lsof: WARNING: can't stat() binfmt_misc file system /proc/sys/fs/binfmt_misc
      Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /cgroup/all
      Output information may be incomplete.
COMMAND     PID                     USER   FD      TYPE             DEVICE  SIZE/OFF   NODE NAME
postgres  10316 526742e6a3d15cf30100003a  cwd       DIR             202,66      4096 388331 /var/lib/openshift/526742e6a3d15cf30100003a/postgresql/data
postgres  10316 526742e6a3d15cf30100003a  rtd       DIR             202,65      4096      2 /
postgres  10316 526742e6a3d15cf30100003a  txt       REG             202,65   5487400  46645 /opt/rh/postgresql92/root/usr/bin/postgres
postgres  10316 526742e6a3d15cf30100003a  mem       REG             202,65     65928     80 /lib64/libnss_files-2.12.so
postgres  10316 526742e6a3d15cf30100003a  DEL       REG                0,4                0 /SYSV0052e2c1
...

Expected results:
No warning and errors.

Additional info:
Run command lsof in the instance does not show the warning.
Comment 1 Liang Xia 2013-11-04 01:46:04 EST
Reproduced on STG(devenv-stage_549).

# rhc ssh jbossews20 'lsof -p 17475 | grep cwd'
Warning: Permanently added 'jbossews20-lxiamigrate.stg.rhcloud.com,54.234.56.174' (RSA) to the list of known hosts.
lsof: WARNING: can't stat() usbfs file system /proc/bus/usb
      Output information may be incomplete.
lsof: WARNING: can't stat() binfmt_misc file system /proc/sys/fs/binfmt_misc
      Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /cgroup/all
      Output information may be incomplete.
java    17475 52734bbc2587c870b4000050  cwd    DIR              253,0     4096  5243164 /var/lib/openshift/52734bbc2587c870b4000050/jbossews
Comment 2 Paul Morie 2013-11-05 16:33:34 EST
This should be fixed for interactive sessions, but this will necessarily still be a problem if you attempt to invoke via ssh like:

rhc app-ssh app 'lsof'

Recommend using lsof -w for those invocations.
Comment 3 openshift-github-bot 2013-11-05 18:40:50 EST
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/d75449975a6a2b9605945ca3b5ec6c919ccf5248
Fix bug 1022336: alias lsof to lsof -w
Comment 4 Liang Xia 2013-11-06 01:52:58 EST
Verified on devenv_3993.

[php-lxia.dev.rhcloud.com 5279e5a8373f39e5a7000007]\> alias
alias ctl_app='gear'
alias lsof='lsof -w'
[php-lxia.dev.rhcloud.com 5279e5a8373f39e5a7000007]\> lsof
COMMAND    PID                     USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
httpd     6730 5279e5a8373f39e5a7000007  cwd    DIR 202,65     4096      2 /
httpd     6730 5279e5a8373f39e5a7000007  rtd    DIR 202,65     4096      2 /
......

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