Adam Litke has uploaded a new change for review.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
storage: Make Image.__chainSizeCalc public
The new SDM copyVolumeData wants to make use of the same logic being used by the classic copy flows to extend the size of the target volume to the appropriate size. Make Image.__chainSizeCalc public so it can be accessed from the SDM code.
Change-Id: Id079eb5067c16f934370e42b5f4e09bbcef1512b Signed-off-by: Adam Litke alitke@redhat.com --- M vdsm/storage/image.py 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/95/38995/1
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py index 791b48c..8d5e8c2 100644 --- a/vdsm/storage/image.py +++ b/vdsm/storage/image.py @@ -140,7 +140,7 @@ randomStr = misc.randomStr(RENAME_RANDOM_STRING_LEN) return "%s%s_%s" % (sd.REMOVED_IMAGE_PREFIX, randomStr, uuid)
- def __chainSizeCalc(self, sdUUID, imgUUID, volUUID, size): + def chainSizeCalc(self, sdUUID, imgUUID, volUUID, size): """ Compute an estimate of the whole chain size using the sum of the actual size of the chain's volumes @@ -763,7 +763,7 @@ if volParams['volFormat'] != volume.COW_FORMAT or \ volParams['prealloc'] != volume.SPARSE_VOL: raise se.IncorrectFormat(self) - volParams['apparentsize'] = self.__chainSizeCalc( + volParams['apparentsize'] = self.chainSizeCalc( sdUUID, srcImgUUID, srcVolUUID, volParams['size'])
# Find out dest volume parameters
automation@ovirt.org has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 1:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16976/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 1:
Build Started (2/2) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17149/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 1:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16976/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17149/ : FAILURE
automation@ovirt.org has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 2:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 2:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/17054/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 2:
Build Started (2/2) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17228/
Adam Litke has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 2: Verified+1
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 2:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/17054/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17228/ : FAILURE
automation@ovirt.org has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 3:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 3:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/17564/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 3:
Build Started (2/2) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17738/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/17564/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17738/ : SUCCESS
Freddy Rolland has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 3: Code-Review+1
Nir Soffer has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 3:
(1 comment)
https://gerrit.ovirt.org/#/c/38995/3/vdsm/storage/image.py File vdsm/storage/image.py:
Line 139: """ Line 140: randomStr = misc.randomStr(RENAME_RANDOM_STRING_LEN) Line 141: return "%s%s_%s" % (sd.REMOVED_IMAGE_PREFIX, randomStr, uuid) Line 142: Line 143: def chainSizeCalc(self, sdUUID, imgUUID, volUUID, size): If this is public, we need a better name - how about estimatedChainSize() ? Line 144: """ Line 145: Compute an estimate of the whole chain size Line 146: using the sum of the actual size of the chain's volumes Line 147: """
automation@ovirt.org has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 4:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 4:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/17741/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 4:
Build Started (2/2) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17912/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 4:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17912/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/17741/ : SUCCESS
Adam Litke has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 3:
(1 comment)
https://gerrit.ovirt.org/#/c/38995/3/vdsm/storage/image.py File vdsm/storage/image.py:
Line 139: """ Line 140: randomStr = misc.randomStr(RENAME_RANDOM_STRING_LEN) Line 141: return "%s%s_%s" % (sd.REMOVED_IMAGE_PREFIX, randomStr, uuid) Line 142: Line 143: def chainSizeCalc(self, sdUUID, imgUUID, volUUID, size):
If this is public, we need a better name - how about estimatedChainSize() ?
Done Line 144: """ Line 145: Compute an estimate of the whole chain size Line 146: using the sum of the actual size of the chain's volumes Line 147: """
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 5:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18312/
automation@ovirt.org has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 5:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 5:
Build Started (2/2) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1542/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 5:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18312/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1542/ : SUCCESS
Freddy Rolland has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 5: Code-Review+1
Nir Soffer has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 5: Code-Review+1
Federico Simoncelli has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 5: Code-Review+2
Federico Simoncelli has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 5: -Code-Review
Actually now that I think of it... how can you reuse this in SDM if it uses the old Volume objects? Using those objects is risky.
automation@ovirt.org has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 6:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Federico Simoncelli has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 6: Code-Review-1
-1 for visibility. There's an unanswered comment.
Adam Litke has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 6:
Federico,
My philosophy with the SDM feature is to reuse any code from the Volume, Image, and StorageDomain objects which is narrowly focused on a specific task. For example, the metadata read/write functions, basic getters and setters, and other relatively simple operations. To maintain compatibility with SPM flows I am not changing the implementation of these reused functions. Whenever new semantics are required I add new code into the SDM classes.
automation@ovirt.org has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 7:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Jenkins CI RO has abandoned this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Abandoned
Abandoned due to no activity - please restore if still relevant
gerrit-hooks has posted comments on this change.
Change subject: storage: Make Image.__chainSizeCalc public ......................................................................
Patch Set 7:
* Update tracker: IGNORE, no Bug-Url found
vdsm-patches@lists.fedorahosted.org