[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vdsm-devel
Subject:    Re: [vdsm] A question about the SPM operation permission in VDSM
From:       Federico Simoncelli <fsimonce () redhat ! com>
Date:       2013-01-31 13:55:16
Message-ID: 2090703238.8870757.1359640516060.JavaMail.root () redhat ! com
[Download RAW message or body]

----- Original Message -----
> From: "Shu Ming" <shuming@linux.vnet.ibm.com>
> To: "VDSM Project Development" <vdsm-devel@lists.fedorahosted.org>
> Sent: Tuesday, October 30, 2012 7:22:18 AM
> Subject: [vdsm] A question about the SPM operation permission in VDSM
> 
> 
> Hi,
> 
> In the VDSM code about some SPM operations like HSM.deleteImage(), It
> is found that VDSM doesn't check if the operation will be launched
> on a SPM host or not. It only checks if the storage pool is already
> acquired by one SPM host, but not necessary the same host as the SPM
> operation is delivered to. The code is like this:
> 
> HSM.deleteImage()
> {
> ...
> HSM._spmSchedule()
> {
> self.validateSPM(spUUID) <--- Only check if the storage pool was
> acquired by one host, but not necessary this host
> }
> ...
> }
> 
> 
> So it really depends on the node management application AKA
> ovirt-engine to dispatch the SPM operations to the right VDSM host.

Hi Shu,
 validateSPM is:

    def validateSPM(self, spUUID):
        pool = self.getPool(spUUID)
        if pool.spmRole != sp.SPM_ACQUIRED:
            raise se.SpmStatusError(spUUID)

despite its ambiguous name "SPM_ACQUIRED" refers only to the spmRole
of the current host. That said, vdsm actually checks before running
deleteImage if the host is actually the SPM or not. Eventually you can
verify it running deleteImage on an HSM host, it should fail with:

# vdsClient 0 deleteImage ...
Not SPM: ('<spUUID>',)

-- 
Federico
_______________________________________________
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic