Bug 967977 - permissions on /proc/meminfo in LXC since libvirt-1.0.0
permissions on /proc/meminfo in LXC since libvirt-1.0.0
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Libvirt Maintainers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-28 13:20 EDT by James R. Leu
Modified: 2016-04-09 19:15 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-09 19:15:44 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 James R. Leu 2013-05-28 13:20:03 EDT
Description of problem:
non root user cannot run ps to see running processes


Version-Release number of selected component (if applicable):
libvirt-1.0.5-1

How reproducible:
any version of libvirt > 1.0.0

Steps to Reproduce:
1. build LXC guest on a host running libvirt-1.0.5
2. enter LXC and change to a non-root user
3. issue ps

Actual results:
Error: /proc must be mounted
  To mount /proc at boot you need an /etc/fstab line like:
      /proc   /proc   proc    defaults
  In the meantime, run "mount /proc /proc -t proc"


Expected results:
list of running processes

Additional info:
ls -la /proc
-r--r--r--   1 root  root                0 May 28 12:22 mdstat
-?????????   ? ?     ?                   ?            ? meminfo
-r--r--r--   1 root  root                0 May 28 12:22 misc
Comment 1 James R. Leu 2013-06-04 09:35:03 EDT
Issue still reproducible with host running libvirt 1.0.6
Comment 2 James R. Leu 2013-06-04 11:31:34 EDT
compiling with --without-fuse works around the issue

Here is the command line I use to build my RPMs, perhaps my combination of options is invalid:

rpmbuild --rebuild libvirt-1.0.6-1.fc17.src.rpm --without storage_sheepdog --without storage_rbd --without xen --without uml --without libxl --without vbox --without openvz --without vmware --without esx --without hyperv --without parallels --without xenapi --without qemu --without curl --without selinux --without sanlock --without phy --without libssh2 --without fuse

please advise
Comment 3 Daniel Berrange 2013-06-04 11:38:14 EDT
I've tried to reproduce this without luck several times now. I just realize however, that I missed the bit where you say "non root" and of course i was testing with root. Testing non-root i see the same problem as you.
Comment 5 James R. Leu 2013-06-04 15:07:48 EDT
I applied the patch Daniel posted to libvir-list on top of 1.0.6 and recompiled with

rpmbuild -ba libvirt.spec --without storage_sheepdog --without storage_rbd --without xen --without uml --without libxl --without vbox --without openvz --without vmware --without esx --without hyperv --without parallels --without xenapi --without qemu --without curl --without selinux --without sanlock --without phy --without libssh2

and the issue appears to be resolved.  Thank you Daniel!

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