Saggi Mizrahi has posted comments on this change.
Change subject: BZ#750528 - pool refresh should not change metadatata.
......................................................................
Patch Set 2: Looks good to me, but someone else must approve
--
To view, visit http://gerrit.usersys/1082
To unsubscribe, visit http://gerrit.usersys/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I12e3e700ff67a527c367533bf9f5654e8760a118
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo Warszawski <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Ayal Baron
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Eduardo Warszawski <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Saggi Mizrahi has posted comments on this change.
Change subject: Avoid unnecesary produce-invalidate-produce on SD conf changes.
......................................................................
Patch Set 1: (6 inline comments)
....................................................
File vdsm/storage/sp.py
Line 530: def releaseClusterLock(self):
Line 531: self.masterDomain.releaseClusterLock()
Line 532:
Line 533: @unsecured
Line 534: def validateNewDomainConf(self, sdUUID, nextState):
This function doesn 3 things.
Line 535: domainConfs = self.getDomains()
Line 536:
Line 537: if sdUUID not in domainConfs.iterkeys():
Line 538: raise se.StorageDomainNotInPool(self.spUUID, sdUUID)
Line 536:
Line 537: if sdUUID not in domainConfs.iterkeys():
Line 538: raise se.StorageDomainNotInPool(self.spUUID, sdUUID)
Line 539: currState = domainConfs[sdUUID]
Line 540: #TODO: remove this validate when 2.2 domains are obsolete
This will not change in 3.1 domains. It'll only change when pool is removed
Line 541: if nextState not in sd.DOMAIN_TRANSITIONS[currState]:
Line 542: raise se.StorageDomainStateTransitionIllegal(sdUUID, currState, nextState)
Line 543:
Line 544: # Avoid handle domains if not owned by pool
Line 537: if sdUUID not in domainConfs.iterkeys():
Line 538: raise se.StorageDomainNotInPool(self.spUUID, sdUUID)
Line 539: currState = domainConfs[sdUUID]
Line 540: #TODO: remove this validate when 2.2 domains are obsolete
Line 541: if nextState not in sd.DOMAIN_TRANSITIONS[currState]:
Check if this is really needed
Line 542: raise se.StorageDomainStateTransitionIllegal(sdUUID, currState, nextState)
Line 543:
Line 544: # Avoid handle domains if not owned by pool
Line 545: dom = sdCache.produce(sdUUID)
Line 541: if nextState not in sd.DOMAIN_TRANSITIONS[currState]:
Line 542: raise se.StorageDomainStateTransitionIllegal(sdUUID, currState, nextState)
Line 543:
Line 544: # Avoid handle domains if not owned by pool
Line 545: dom = sdCache.produce(sdUUID)
No more produce outside of hsm. You can use old ones but try to refrain from adding more.
Line 546: pools = dom.getPools()
Line 547: if self.spUUID not in pools:
Line 548: raise se.StorageDomainNotInPool(self.spUUID, sdUUID)
Line 549: # domList[sdUUID] = domConfiguration = [active, attached]
Line 547: if self.spUUID not in pools:
Line 548: raise se.StorageDomainNotInPool(self.spUUID, sdUUID)
Line 549: # domList[sdUUID] = domConfiguration = [active, attached]
Line 550: # Formerly know as status
Line 551: return (dom, domainConfs)
You return unrelated data get this as an arg if the outside function needs this
Line 552:
Line 553: @unsecured
Line 554: def validatePoolMVerHigher(self, masterVersion):
Line 555: """
Line 1029: self.log.info("sdUUID=%s spUUID=%s msdUUID=%s", sdUUID, self.spUUID, msdUUID)
Line 1030:
Line 1031: try:
Line 1032: # Avoid detach domains if not owned by pool
Line 1033: dom, domConfs = self.validateNewDomainConf(sdUUID, sd.DOM_UNATTACHED_STATUS)
domConfs is not clear, I agree that state is not really what it is but we all know what it means.
Line 1034:
Line 1035: # If the domain being detached is the 'master', move all pool
Line 1036: # metadata to the new 'master' domain (msdUUID)
Line 1037: if sdUUID == self.masterDomain.sdUUID:
--
To view, visit http://gerrit.usersys/1081
To unsubscribe, visit http://gerrit.usersys/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If5165b92974145bcd26ca50648a65a6bfe282eb6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo Warszawski <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Saggi Mizrahi has posted comments on this change.
Change subject: Avoid unnecesary produce-invalidate-produce on SD conf changes.
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(1 inline comment)
....................................................
File vdsm/storage/sp.py
Line 530: def releaseClusterLock(self):
Line 531: self.masterDomain.releaseClusterLock()
Line 532:
Line 533: @unsecured
Line 534: def validateNewDomainConf(self, sdUUID, nextState):
This name is not good, use something that describes what the function does
Line 535: domainConfs = self.getDomains()
Line 536:
Line 537: if sdUUID not in domainConfs.iterkeys():
Line 538: raise se.StorageDomainNotInPool(self.spUUID, sdUUID)
--
To view, visit http://gerrit.usersys/1081
To unsubscribe, visit http://gerrit.usersys/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If5165b92974145bcd26ca50648a65a6bfe282eb6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo Warszawski <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Dan Kenigsberg has posted comments on this change.
Change subject: dir is a builtin, overriding it is not nice
......................................................................
Patch Set 1: Looks good to me, approved
--
To view, visit http://gerrit.usersys.redhat.com/1087
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I292cd9d5b47bb1051b765c02b55f351807316ea7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Eduardo Warszawski has posted comments on this change.
Change subject: BZ#750528 - pool refresh should not change metadatata.
......................................................................
Patch Set 2: (3 inline comments)
May be separated from the 1st one but why.
The 2nd proevents unnecesary produce's.
....................................................
File vdsm/storage/sp.py
Line 343: self.masterDomain.mountMaster()
Line 344: self.masterDomain.createMasterTree(log=True)
Line 345: self.tasksDir = os.path.join(self.poolPath, POOL_MASTER_DOMAIN, sd.MASTER_FS_DIR, sd.TASKS_DIR)
Line 346:
Line 347: #Domain private care
I put this n a separate function and received comments why this function makes trees for backup domains and reset role and version for data domains. It can be split in three separate functions (produce should be common) but seems too much.
Simply define wich criteria we use, inline or not since this too long function is mostly inline, as in the case of msd or mailboxes.
checkBackupDomain() was a very infortunate name since not checked anything and instead build trees.
Line 348: domUUIDs = self.getDomains(activeOnly=True).keys()
Line 349: for sdUUID in domUUIDs:
Line 350: if sdUUID == self.masterDomain.sdUUID:
Line 351: continue
Line 352: dom = sdCache.produce(sdUUID)
Line 353: domMD = dom.getMetadata()
Line 354: if domMD[sd.DMDK_CLASS] == sd.BACKUP_DOMAIN:
Line 355: dom.mountMaster()
Line 356: # Master tree should be exist in this point
In the original.
Line 357: # Recreate it if not.
Line 358: dom.createMasterTree()
Line 359: #Stale master domain?
Line 360: elif domMD[sd.DMDK_CLASS] == sd.DATA_DOMAIN \
Line 1006: dom.acquireClusterLock(self.id)
Line 1007: try:
Line 1008: domMD = dom.getMetadata()
Line 1009: #If you remove this condition, remove it from public_createStoragePool too.
Line 1010: if domMD[sd.DMDK_CLASS] == sd.DATA_DOMAIN and domMD[sd.DMDK_VERSION] != self.masterDomain.getVersion():
isData(), getVersion(), getRole() all of them access the metadata independently using getMetadata() and suffering caching issues.
The metadata should be accessed once for the sake of consistency and security.
Eventual optimizations are benefitial side effects.
Line 1011: raise se.MixedSDVersionError(dom.sdUUID, domMD[sd.DMDK_VERSION], self.masterDomain.sdUUID, self.masterDomain.getVersion())
Line 1012:
Line 1013: dom.attach(self.spUUID)
Line 1014: if domMD[sd.DMDK_CLASS] == sd.DATA_DOMAIN and domMD[sd.DMDK_ROLE] == sd.MASTER_DOMAIN:
--
To view, visit http://gerrit.usersys/1082
To unsubscribe, visit http://gerrit.usersys/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I12e3e700ff67a527c367533bf9f5654e8760a118
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo Warszawski <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Ayal Baron
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Eduardo Warszawski <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>
Dan Kenigsberg has submitted this change and it was merged.
Change subject: BZ#749151 revive Vm ticket just before migration
......................................................................
BZ#749151 revive Vm ticket just before migration
We set a new expiry time on the spice password of the source qemu. That is
copied to the destination qemu as migration begins. We thus give spice client
two minutes to connect to destination to facilitate seamless migration.
v2:
- revive password only when spice client is connected
- revive password, do not remove it completely
v3:
- do not disconnect current client while reviving password.
Change-Id: Ibc7c0347354cf8f943c787dd621ce7b0eb78ef55
---
M vdsm/libvirtvm.py
1 file changed, 19 insertions(+), 0 deletions(-)
Approvals:
Dan Kenigsberg: Verified; Looks good to me, approved
Igor Lvovsky: Looks good to me, but someone else must approve
--
To view, visit http://gerrit.usersys.redhat.com/1086
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc7c0347354cf8f943c787dd621ce7b0eb78ef55
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>