Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 951608

Summary: After upgrading to RHEL6.3 NFS images permissions are 440 and qemu user cannot start 2.2 vms
Product: Red Hat Enterprise Virtualization Manager Reporter: Idith Tal-Kohen <italkohe>
Component: vdsmAssignee: Federico Simoncelli <fsimonce>
Status: CLOSED ERRATA QA Contact: Elad <ebenahar>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.0.0CC: abaron, amureini, bazulay, cpelland, danken, gwatson, hateya, iheim, lpeer, lyarwood, mkalinin, scohen, sgrinber, ykaul, zdover
Target Milestone: ---Keywords: ZStream
Target Release: 3.1.4   
Hardware: All   
OS: Linux   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, upgrading to Red Hat Enterprise Linux 6.3 made it impossible to start Red Hat Enterprise Virtualization 2.2 virtual machines. This was due to an issue whereby the NFS images permissions were not properly set so that the qemu user could operate on them. An improvement to the upgrade procedure sets permissions correctly and allows the qemu user to operate on Red Hat Enterprise Virtualization 2.2 virtual machines.
Story Points: ---
Clone Of: 911417 Environment:
Last Closed: 2013-05-01 18:26:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 911417    
Bug Blocks:    
Attachments:
Description Flags
vdsm.log attached
none
vdsm.log (2) none

Comment 3 Elad 2013-04-21 16:03:12 UTC
Checked on RHEVM3.1 - si28

after changing permissions of volume on the SPM (on /rhev/data-center/volume_uuid) to 600:
drw-------. 2 vdsm kvm  4.0K Apr 21 15:52 afc1452e-5ed5-4ea3-b2db-72f323736406
; I ran the VM on HSM.
The volume permission changed to 755 on HSM and not to 660:
drwxr-xr-x. 2 vdsm kvm  4.0K Apr 21 15:52 afc1452e-5ed5-4ea3-b2db-72f323736406

Comment 7 Federico Simoncelli 2013-04-22 07:31:34 UTC
(In reply to comment #3)
> Checked on RHEVM3.1 - si28
> 
> after changing permissions of volume on the SPM (on
> /rhev/data-center/volume_uuid) to 600:

That is not a volume, it's a storage domain. If the verification failed for such a trivial mistake please reverify asap.

> drw-------. 2 vdsm kvm  4.0K Apr 21 15:52
> afc1452e-5ed5-4ea3-b2db-72f323736406
> ; I ran the VM on HSM.
> The volume permission changed to 755 on HSM and not to 660:
> drwxr-xr-x. 2 vdsm kvm  4.0K Apr 21 15:52
> afc1452e-5ed5-4ea3-b2db-72f323736406

Comment 8 Elad 2013-04-22 08:10:26 UTC
Will verified again

Comment 9 Elad 2013-04-22 08:37:25 UTC
Volume permissions changed to 600 on HSM: 

-bash-4.1$ chmod 600 cb1dea6d-1861-4c81-9ce4-b26542cd28ad/


/rhev/data-center/c52df970-f2e7-4aa0-b254-d691ee4bcd6c/79b96f56-0ee0-449a-9b5c-5987023da0fd/images
-bash-4.1$ ls -l
total 8
drw-------. 2 vdsm kvm 4096 Apr 22 09:29 cb1dea6d-1861-4c81-9ce4-b26542cd28ad


And remained the same after vm was started on this host (using pinned host):

-bash-4.1$ ls -l
total 8
drw-------. 2 vdsm kvm 4096 Apr 22 09:29 cb1dea6d-1861-4c81-9ce4-b26542cd28ad


Moving back to ASSIGNED.

Comment 10 Federico Simoncelli 2013-04-22 08:48:39 UTC
Attach the logs.

Comment 11 Elad 2013-04-22 08:52:03 UTC
VM cannot be started with such permissions (600)

Thread-3104::ERROR::2013-04-22 09:49:28,026::dispatcher::69::Storage.Dispatcher.Protect::(run) [Errno 13] Permission denied: '/rhev/data-center/c52df970-f2e7-4aa0-b254-d691ee4bcd6c/79b96f56-0ee0-449a-9b5c-5987023da0fd/images/cb1dea6d-1861-4c81-9ce4-b26542cd28ad/b1851d79-6c3a-4c12-a751-775b2325c238'
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/dispatcher.py", line 61, in run
    result = ctask.prepare(self.func, *args, **kwargs)
  File "/usr/share/vdsm/storage/task.py", line 1159, in prepare
    raise self.error

Comment 12 Elad 2013-04-22 08:55:55 UTC
Created attachment 738458 [details]
vdsm.log attached

Comment 13 Federico Simoncelli 2013-04-22 09:07:59 UTC
MainThread::INFO::2013-04-22 08:42:20,129::vdsm::88::vds::(run) I am the actual vdsm 4.10.2.0.19.gitf9eda0a tigris01.scl.lab.tlv.redhat.com (2.6.32-358.2.1.el6.x86_64)

# rpm -q vdsm
vdsm-4.10.2-15.0.el6ev.x86_64

Please verify the bug with a build containing the fix.

Comment 14 Elad 2013-04-22 10:53:32 UTC
(In reply to comment #13)
> MainThread::INFO::2013-04-22 08:42:20,129::vdsm::88::vds::(run) I am the
> actual vdsm 4.10.2.0.19.gitf9eda0a tigris01.scl.lab.tlv.redhat.com
> (2.6.32-358.2.1.el6.x86_64)
> 
> # rpm -q vdsm
> vdsm-4.10.2-15.0.el6ev.x86_64
> 
> Please verify the bug with a build containing the fix.

This bug is targeted for si28, which contains vdsm-4.10.2-1.10.el6ev.x86_64

Comment 15 Federico Simoncelli 2013-04-22 14:36:38 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > MainThread::INFO::2013-04-22 08:42:20,129::vdsm::88::vds::(run) I am the
> > actual vdsm 4.10.2.0.19.gitf9eda0a tigris01.scl.lab.tlv.redhat.com
> > (2.6.32-358.2.1.el6.x86_64)
> > 
> > # rpm -q vdsm
> > vdsm-4.10.2-15.0.el6ev.x86_64
> > 
> > Please verify the bug with a build containing the fix.
> 
> This bug is targeted for si28, which contains vdsm-4.10.2-1.10.el6ev.x86_64

Exactly, so you need to verify the bug with vdsm-4.10.2-1.10.el6ev.x86_64 (and not with vdsm-4.10.2-15.0.el6ev.x86_64).

Comment 16 Elad 2013-04-22 14:52:08 UTC
Checked again:

Before permissions change:

-bash-4.1$ ls -l
total 28
drwxr-xr-x. 2 vdsm kvm 4096 Apr 22 15:39 bd76d5a0-cc4f-4865-810a-02ebd1051a22


After permissions change:

-bash-4.1$ chmod 600 bd76d5a0-cc4f-4865-810a-02ebd1051a22
-bash-4.1$ ls -l
total 28
drw-------. 2 vdsm kvm 4096 Apr 22 15:39 bd76d5a0-cc4f-4865-810a-02ebd1051a22


After start to the vm:

-bash-4.1$ ls -l
total 28
drw-------. 2 vdsm kvm 4096 Apr 22 15:39 bd76d5a0-cc4f-4865-810a-02ebd1051a22



version:

-bash-4.1$ grep 'I am' /var/log/vdsm/vdsm.log
MainThread::INFO::2013-04-22 13:23:44,114::vdsm::88::vds::(run) I am the actual vdsm 4.10-1.10 tigris01.scl.lab.tlv.redhat.com (2.6.32-358.2.1.el6.x86_64)
-bash-4.1$ rpm -q vdsm
vdsm-4.10.2-1.10.el6ev.x86_64

Comment 17 Elad 2013-04-22 14:53:12 UTC
Created attachment 738561 [details]
vdsm.log (2)

Comment 18 Federico Simoncelli 2013-04-22 15:03:45 UTC
(In reply to comment #16)
> Checked again:
> 
> Before permissions change:
> 
> -bash-4.1$ ls -l
> total 28
> drwxr-xr-x. 2 vdsm kvm 4096 Apr 22 15:39 bd76d5a0-cc4f-4865-810a-02ebd1051a22
> 
> 
> After permissions change:
> 
> -bash-4.1$ chmod 600 bd76d5a0-cc4f-4865-810a-02ebd1051a22
> -bash-4.1$ ls -l
> total 28
> drw-------. 2 vdsm kvm 4096 Apr 22 15:39 bd76d5a0-cc4f-4865-810a-02ebd1051a22
> 
> 
> After start to the vm:
> 
> -bash-4.1$ ls -l
> total 28
> drw-------. 2 vdsm kvm 4096 Apr 22 15:39 bd76d5a0-cc4f-4865-810a-02ebd1051a22

The *DIRECTORY* bd76d5a0-cc4f-4865-810a-02ebd1051a22 is an *image*, and not a *volume*.

Please verify this bug properly.

Comment 19 Elad 2013-04-23 07:43:15 UTC
Hey Federico, 
I've tested it as you said and it works OK.
Sorry for misunderstanding. 

Permissions of volume change back to 660 after running the VM on HSM host.


-bash-4.1$ chmod 600 4a87935d-9257-40b9-9287-62a15ba7b99c
-bash-4.1$ ls -l
total 1841608
-rw-------. 1 vdsm kvm 10737418240 Apr 23 08:34 4a87935d-9257-40b9-9287-62a15ba7b99c
-rw-rw----. 1 vdsm kvm     1048576 Apr 22 11:59 4a87935d-9257-40b9-9287-62a15ba7b99c.lease
-rw-r--r--. 1 vdsm kvm         268 Apr 22 11:59 4a87935d-9257-40b9-9287-62a15ba7b99c.meta

After VM started:

-bash-4.1$ ls -l
total 1841608
-rw-rw----. 1 vdsm kvm 10737418240 Apr 23 08:34 4a87935d-9257-40b9-9287-62a15ba7b99c
-rw-rw----. 1 vdsm kvm     1048576 Apr 22 11:59 4a87935d-9257-40b9-9287-62a15ba7b99c.lease
-rw-r--r--. 1 vdsm kvm         268 Apr 22 11:59 4a87935d-9257-40b9-9287-62a15ba7b99c.meta
-bash-4.1$ ls -l

Comment 20 errata-xmlrpc 2013-05-01 18:26:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0774.html