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.
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
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.
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
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 / ......