Change in vdsm[master]: detach: Support force detach on Storage Domains with old pools.

nsoffer at redhat.com nsoffer at redhat.com
Thu Jun 26 14:07:42 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: detach: Support force detach on Storage Domains with old pools.
......................................................................


Patch Set 12:

(1 comment)

http://gerrit.ovirt.org/#/c/29042/12/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

Line 746:         # We are called with blank pool uuid, to avoid changing exiting
Line 747:         # API which we want to drop in next version anyway.
Line 748:         # So to get the pool we use the fact that there can be only one
Line 749:         # pool, and get the host id from it.
Line 750:         assert len(self.pools) <= 1
> Also, the check is not correct, if you're going to use:
No - the check is right.

The purpose of the check is to fail loudly if we have more then one pool - this is disabled in line 1011:

 1011         # TBD: To support multiple pool connection on single host,                                                                                                         
 1012         # we'll need to remove this validation
 1013         if len(self.pools) and spUUID not in self.pools:
 1014             raise se.CannotConnectMultiplePools(str(self.pools.keys()))

So if someone remove this check, and we start to support multiple pools, the assert will break and we will fix this.

Since this must happen during testing assert is good enough, even if someone run vdsm using python -O.

This check does not try to check that you are connected, if you like that it should be check separately:

    if not self.pools:
        raise NotConnected...
Line 751:         pool = self.pools.values()[0]
Line 752: 
Line 753:         dom = sdCache.produce(sdUUID=sdUUID)
Line 754:         dom.acquireHostId(pool.id)


-- 
To view, visit http://gerrit.ovirt.org/29042
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4a6fb01775f7c834a3466e45b9b7ed9b4bd5c3be
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list