Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-29 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 9:

* update_tracker: OK
* Set MODIFIED::IGNORE, no Bug-Url found.

-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-29 Thread nsoffer
Nir Soffer has submitted this change and it was merged.

Change subject: storage: Add support for generation to VolumeMetadata
..


storage: Add support for generation to VolumeMetadata

We would like to add support for a new generation key in the volume
metadata.  GEN is a monotonically increasing integer that can be used
to determine whether certain operations have been completed on a volume
and to prevent two hosts from sequentially performing the same operation
in the event of double scheduling.

The new GEN key is optional.  If we read metadata without this key, a
default value of 0 will be reported.

This patch supports only the manipulation of the generation within
the VolumeMetadata class.  The value will be made available via
Volume.getInfo in a follow-up patch and will be changed by verbs in
subsequent patches.

Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Signed-off-by: Adam Litke 
Reviewed-on: https://gerrit.ovirt.org/64484
Reviewed-by: Nir Soffer 
Continuous-Integration: Jenkins CI
---
M lib/vdsm/storage/constants.py
M lib/vdsm/storage/volumemetadata.py
M tests/storage_volume_metadata_test.py
3 files changed, 40 insertions(+), 7 deletions(-)

Approvals:
  Adam Litke: Verified
  Nir Soffer: Looks good to me, approved
  Jenkins CI: Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-29 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 8:

* 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.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-29 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


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.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-29 Thread alitke
Adam Litke has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 6:

Verified with unit tests and SDM.copy_data functional testing.

-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-29 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


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.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-29 Thread alitke
Adam Litke has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 5: Verified+1

Verified by unit tests and SDM.copy_data functional testing.

-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-29 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


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.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-28 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 4: Code-Review+2

(1 comment)

https://gerrit.ovirt.org/#/c/64484/4/tests/storage_volume_metadata_test.py
File tests/storage_volume_metadata_test.py:

Line 188: 
Line 189: def test_generation_default(self):
Line 190: lines = make_lines(GEN=None)
Line 191: md = volume.VolumeMetadata.from_lines(lines)
Line 192: self.assertEqual(sc.DEFAULT_GENERATION, md.generation)
Neat


-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-28 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


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.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-28 Thread alitke
Adam Litke has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/64484/3/lib/vdsm/storage/constants.py
File lib/vdsm/storage/constants.py:

Line 165: # ascii values, but limit non-ascii values, which are encoded by 
engine
Line 166: # using 4 bytes per character.
Line 167: DESCRIPTION_SIZE = 210
Line 168: DEFAULT_GENERATION = 0
Line 169: MAX_GENERATION = 2 ** 63 - 1
> Yes, better - don't forget to update the worst case example and the number 
Done
Line 170: 
Line 171: # Block volume metadata tags
Line 172: TAG_PREFIX_MD = "MD_"
Line 173: TAG_PREFIX_MDNUMBLKS = "MS_"


-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-28 Thread alitke
Adam Litke has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 2:

(4 comments)

https://gerrit.ovirt.org/#/c/64484/2//COMMIT_MSG
Commit Message:

Line 5: CommitDate: 2016-09-27 15:19:01 -0400
Line 6: 
Line 7: storage: Add support for generation to VolumeMetadata
Line 8: 
Line 9: We would like to add support for a new generation id key in the volume
> remove id.
Done
Line 10: metadata.  GEN is a monotonically increasing integer that can be used
Line 11: to determine whether certain operations have been completed on a volume
Line 12: and to prevent two hosts from sequentially performing the same 
operation
Line 13: in the event of double scheduling.


https://gerrit.ovirt.org/#/c/64484/2/lib/vdsm/storage/constants.py
File lib/vdsm/storage/constants.py:

Line 161
Line 162
Line 163
Line 164
Line 165
> Lets separate DESCRIPTION_SIZE from the generation constants, and maybe add
Done


Line 124: IMAGE = "IMAGE"
Line 125: DESCRIPTION = "DESCRIPTION"
Line 126: LEGALITY = "LEGALITY"
Line 127: MTIME = "MTIME"
Line 128: GENERATION = "GEN"
> Lets add a comment:
Done
Line 129: POOL = MDK_POOLS  # Deprecated
Line 130: 
Line 131: # In block storage, metadata size is limited to BLOCK_SIZE (512), to
Line 132: # ensure that metadata is written atomically. This is big enough for 
the


https://gerrit.ovirt.org/#/c/64484/2/tests/storage_volume_metadata_test.py
File tests/storage_volume_metadata_test.py:

Line 188: 
Line 189: def test_generation_default(self):
Line 190: data = make_md_dict()
Line 191: lines = make_lines(generation=sc.DEFAULT_GENERATION + 1, 
**data)
Line 192: lines.remove("{}={}".format(sc.GENERATION, 
sc.DEFAULT_GENERATION + 1))
> Why not:
Simplified.
Line 193: md = volume.VolumeMetadata.from_lines(lines)


-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-28 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/64484/3/lib/vdsm/storage/constants.py
File lib/vdsm/storage/constants.py:

Line 165: # ascii values, but limit non-ascii values, which are encoded by 
engine
Line 166: # using 4 bytes per character.
Line 167: DESCRIPTION_SIZE = 210
Line 168: DEFAULT_GENERATION = 0
Line 169: MAX_GENERATION = 2 ** 63 - 1
> Let's reduce this to 999
Yes, better - don't forget to update the worst case example and the number 
above.
Line 170: 
Line 171: # Block volume metadata tags
Line 172: TAG_PREFIX_MD = "MD_"
Line 173: TAG_PREFIX_MDNUMBLKS = "MS_"


-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-28 Thread alitke
Adam Litke has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/64484/1/lib/vdsm/storage/volumemetadata.py
File lib/vdsm/storage/volumemetadata.py:

Line 148: constants.DESCRIPTION: self.description,
Line 149: constants.PUUID: self.puuid,
Line 150: constants.MTIME: str(self.mtime),
Line 151: constants.LEGALITY: self.legality,
Line 152: constants.GENERATION: self.generation,
> If you think it is less work to check old code, why not.
Just checked 3.6 code.  We don't try to filter out unknown keys in getMetadata. 
 We just read lines, split each line around '=' and populate a dict with the 
pairs.  This is verified to my satisfaction.


-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-28 Thread alitke
Adam Litke has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/64484/3/lib/vdsm/storage/constants.py
File lib/vdsm/storage/constants.py:

Line 165: # ascii values, but limit non-ascii values, which are encoded by 
engine
Line 166: # using 4 bytes per character.
Line 167: DESCRIPTION_SIZE = 210
Line 168: DEFAULT_GENERATION = 0
Line 169: MAX_GENERATION = 2 ** 63 - 1
Let's reduce this to 999
Line 170: 
Line 171: # Block volume metadata tags
Line 172: TAG_PREFIX_MD = "MD_"
Line 173: TAG_PREFIX_MDNUMBLKS = "MS_"


-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-27 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 3:

* update_tracker: OK
* 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.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-27 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 2: Code-Review-1

(4 comments)

https://gerrit.ovirt.org/#/c/64484/2//COMMIT_MSG
Commit Message:

Line 5: CommitDate: 2016-09-27 15:19:01 -0400
Line 6: 
Line 7: storage: Add support for generation to VolumeMetadata
Line 8: 
Line 9: We would like to add support for a new generation id key in the volume
remove id.

Please update also all the other commit messages.
Line 10: metadata.  GEN is a monotonically increasing integer that can be used
Line 11: to determine whether certain operations have been completed on a volume
Line 12: and to prevent two hosts from sequentially performing the same 
operation
Line 13: in the event of double scheduling.


https://gerrit.ovirt.org/#/c/64484/2/lib/vdsm/storage/constants.py
File lib/vdsm/storage/constants.py:

Line 161
Line 162
Line 163
Line 164
Line 165
Lets separate DESCRIPTION_SIZE from the generation constants, and maybe add a 
comment explaining these constants?


Line 124: IMAGE = "IMAGE"
Line 125: DESCRIPTION = "DESCRIPTION"
Line 126: LEGALITY = "LEGALITY"
Line 127: MTIME = "MTIME"
Line 128: GENERATION = "GEN"
Lets add a comment:

# Added in 4.1
Line 129: POOL = MDK_POOLS  # Deprecated
Line 130: 
Line 131: # In block storage, metadata size is limited to BLOCK_SIZE (512), to
Line 132: # ensure that metadata is written atomically. This is big enough for 
the


https://gerrit.ovirt.org/#/c/64484/2/tests/storage_volume_metadata_test.py
File tests/storage_volume_metadata_test.py:

Line 188: 
Line 189: def test_generation_default(self):
Line 190: data = make_md_dict()
Line 191: lines = make_lines(generation=sc.DEFAULT_GENERATION + 1, 
**data)
Line 192: lines.remove("{}={}".format(sc.GENERATION, 
sc.DEFAULT_GENERATION + 1))
Why not:

data = make_md_dict()
del data[sc.GENERATION]
lines = make_lines(**data)
Line 193: md = volume.VolumeMetadata.from_lines(lines)


-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storage: Add support for generation to VolumeMetadata

2016-09-27 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: storage: Add support for generation to VolumeMetadata
..


Patch Set 2:

* update_tracker: OK
* 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.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/64484
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org