Bug 967977

Summary: permissions on /proc/meminfo in LXC since libvirt-1.0.0
Product: [Community] Virtualization Tools Reporter: James R. Leu <jleu>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, crobinso, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-09 23:15:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James R. Leu 2013-05-28 17:20:03 UTC
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 13:35:03 UTC
Issue still reproducible with host running libvirt 1.0.6

Comment 2 James R. Leu 2013-06-04 15:31:34 UTC
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 Berrangé 2013-06-04 15:38:14 UTC
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 19:07:48 UTC
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!