Bug 967977 - permissions on /proc/meminfo in LXC since libvirt-1.0.0
Summary: permissions on /proc/meminfo in LXC since libvirt-1.0.0
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-28 17:20 UTC by James R. Leu
Modified: 2016-04-09 23:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-09 23:15:44 UTC
Embargoed:


Attachments (Terms of Use)

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!


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