Eduardo Warszawski has posted comments on this change.
Change subject: Adding shared raw disk feature. ......................................................................
Patch Set 1: (5 inline comments)
.................................................... Commit Message Line 10: Use Line 11: drive=GUID:<guid>, Line 12: or Line 13: drive=UUID:<uuid>, Line 14: Note the mandatory ',' The actual code takes a string containing ':' as a string. Only inputs containing ',' are processed as dicts. See parseDriveSpec() BC Line 15: Line 16: Change-Id: Ib417bd6423773db382826d6255e8cbeafd333116 Line 17 Line 18
.................................................... File vdsm/clientIF.py Line 556: if res['status']['code']: Line 557: raise vm.VolumeError(drive) Line 558: path = res['path'] Line 559: #Another drive dict type Line 560: elif drive.has_key("GUID") and os.path.exists(os.path.join("/dev/mapper", drive["GUID"])): Yes. Line 561: path = os.path.join("/dev/mapper", drive["GUID"]) Line 562: elif drive.has_key("UUID"): Line 563: rc, out, err = storage.misc.execCmd(["blkid", "-U", drive["UUID"]], sudo=False) Line 564: if not out or rc != 0:
Line 558: path = res['path'] Line 559: #Another drive dict type Line 560: elif drive.has_key("GUID") and os.path.exists(os.path.join("/dev/mapper", drive["GUID"])): Line 561: path = os.path.join("/dev/mapper", drive["GUID"]) Line 562: elif drive.has_key("UUID"): More is better. Line 563: rc, out, err = storage.misc.execCmd(["blkid", "-U", drive["UUID"]], sudo=False) Line 564: if not out or rc != 0: Line 565: self.log.info("blkid failed for UUID: %s" % drive) Line 566: raise vm.VolumeError(drive)
Line 567: else: Line 568: path = out[0] Line 569: #For BC sake: a path as a string. Line 570: elif not drive: Line 571: path = drive It is possible with the actual code. BC. Line 572: elif os.path.exists(drive): Line 573: path = drive Line 574: self.log.info("prepared volume path: %s" % path) Line 575: return path
Line 580: try: Line 581: result = self.irs.teardownVolume(drive['domainID'], drive['poolID'], Line 582: drive['imageID'], drive['volumeID']) Line 583: except KeyError: Line 584: self.log.info("Avoiding tear down drive %s", str(drive)) Shared disk are not really prepared therefore can't be teared down. This is only logging. Line 585: Line 586: return result['status']['code'] Line 587: Line 588: def create(self, vmParams):
-- To view, visit http://gerrit.usersys/1064 To unsubscribe, visit http://gerrit.usersys/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib417bd6423773db382826d6255e8cbeafd333116 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo Warszawski ewarszaw@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo Warszawski ewarszaw@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
vdsm-patches@lists.fedorahosted.org