Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a snapshot after writing data #538

Merged
merged 1 commit into from
May 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ci/scenarios/vmachine/check_scrubbing_test/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def start_test(cls):
vdisks = created_vdisks['clones']
else:
vdisks = created_vdisks['parents']
stored_map = cls._prepare_for_scrubbing(vdisks, storagedriver, fio_bin_loc, is_ee)
stored_map = cls._prepare_for_scrubbing(vdisks, storagedriver, fio_bin_loc, is_ee, api)
cls._validate_scrubbing(stored_map)
finally:
for vdisk_type, vdisk_list in created_vdisks.iteritems():
Expand Down Expand Up @@ -131,7 +131,7 @@ def _validate_scrubbing(vdisk_stored_mapper, amount_checks=MAX_SCRUBBING_CHECKS,
raise RuntimeError(error_msg)

@classmethod
def _prepare_for_scrubbing(cls, vdisks, storagedriver, fio_bin_location, is_ee):
def _prepare_for_scrubbing(cls, vdisks, storagedriver, fio_bin_location, is_ee, api):
"""
Writes data to the vdisks
:param vdisks: list of vdisks
Expand All @@ -152,6 +152,10 @@ def _prepare_for_scrubbing(cls, vdisks, storagedriver, fio_bin_location, is_ee):
edge_configuration=edge_configuration,
screen=False,
loop_screen=False)
for vdisk in vdisks: # Snapshot to give the volumedriver a point of reference to scrub towards
VDiskSetup.create_snapshot(snapshot_name='{}_snapshot01'.format(vdisk.name),
vdisk_name=vdisk.name,
vpool_name=vdisk.vpool.name, api=api, consistent=False, sticky=False)
stored_map = {}
for vdisk in vdisks:
stored_map[vdisk.guid] = vdisk.statistics['stored']
Expand Down