Federico Simoncelli has uploaded a new change for review.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
upgrade: force upgrade to v2 before upgrading to v3
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=893184 Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Signed-off-by: Federico Simoncelli fsimonce@redhat.com --- M vdsm/storage/imageRepository/formatConverter.py 1 file changed, 14 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/10792/1
diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py index ff9a507..037c212 100644 --- a/vdsm/storage/imageRepository/formatConverter.py +++ b/vdsm/storage/imageRepository/formatConverter.py @@ -93,6 +93,19 @@ log = logging.getLogger('Storage.v3DomainConverter') log.debug("Starting conversion for domain %s", domain.sdUUID)
+ targetVersion = 3 + currentVersion = domain.getVersion() + + # If we're upgrading from version 0 we need to first upgrade to version 2 + # and then proceed to upgrade to version 3. + if currentVersion == 0: + v2DomainConverter(repoPath, hostId, domain, isMsd) + currentVersion = domain.getVersion() + + if currentVersion != 2: + log.debug("Unsupported conversion from version %s to version %s", + currentVersion, targetVersion) + if domain.getStorageType() in sd.FILE_DOMAIN_TYPES: log.debug("Setting permissions for domain %s", domain.sdUUID) domain.setMetadataPermissions() @@ -268,17 +281,10 @@ "not critical since the volume might be in use", imgUUID, exc_info=True)
- targetVersion = 3 - currentVersion = domain.getVersion() log.debug("Finalizing the storage domain upgrade from version %s to " "version %s for domain %s", currentVersion, targetVersion, domain.sdUUID) - - if (currentVersion not in blockSD.VERS_METADATA_TAG and - domain.getStorageType() in sd.BLOCK_DOMAIN_TYPES): - __convertDomainMetadataToTags(domain, targetVersion) - else: - domain.setMetaParam(sd.DMDK_VERSION, targetVersion) + domain.setMetaParam(sd.DMDK_VERSION, targetVersion)
except: if isMsd:
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/641/ (1/2)
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/606/ (2/2)
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/606/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/641/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Haim Ateya has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 1: Verified
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/655/ (1/2)
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/620/ (2/2)
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/620/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/655/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Lee Yarwood has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Lee Yarwood has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 2: Verified
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Federico Simoncelli has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 2: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm/storage/imageRepository/formatConverter.py Line 105: currentVersion = domain.getVersion() Line 106: Line 107: if currentVersion != 2: Line 108: log.debug("Unsupported conversion from version %s to version %s", Line 109: currentVersion, targetVersion) Raise Line 110: Line 111: if domain.getStorageType() in sd.FILE_DOMAIN_TYPES: Line 112: log.debug("Setting permissions for domain %s", domain.sdUUID) Line 113: domain.setMetadataPermissions()
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/658/ (1/2)
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/693/ (2/2)
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/658/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/693/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Ayal Baron has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 3: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Haim Ateya has posted comments on this change.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
Patch Set 3: Verified
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: upgrade: force upgrade to v2 before upgrading to v3 ......................................................................
upgrade: force upgrade to v2 before upgrading to v3
During the upgrade of a domain to version 3 vdsm reallocates the metadata slots that are higher than 1947 (given a leases LV of 2Gb) in order to use the same offsets for the volume leases (BZ#882276 and git commit hash 2ba76e3). This has no effect when the domain is version 0 since the metadata slots offsets are fixed (the first physical extent of the LV) and they can't be reallocated. In such case the domain must be upgraded to version 2 first.
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=893184 Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Signed-off-by: Federico Simoncelli fsimonce@redhat.com --- M vdsm/storage/imageRepository/formatConverter.py M vdsm/storage/volume.py 2 files changed, 21 insertions(+), 9 deletions(-)
Approvals: Ayal Baron: Looks good to me, approved Haim Ateya: Verified Dan Kenigsberg:
-- To view, visit http://gerrit.ovirt.org/10792 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org