Skip to content

Commit

Permalink
Add support for passing the disk/memory overlay maps as the OpenStack…
Browse files Browse the repository at this point in the history
… path via cloudlet_driver.py already composes the chunk-valid_bit tuples when it transmits the data.
  • Loading branch information
teiszler committed Sep 13, 2017
1 parent 4233899 commit 9f186e6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions elijah/provisioning/synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -983,8 +983,8 @@ def recover_launchVM(base_image, meta_info, overlay_file, **kwargs):

def run_fuse(bin_path, chunk_size, original_disk, fuse_disk_size,
original_memory, fuse_memory_size,
resumed_disk=None, disk_chunks=None,
resumed_memory=None, memory_chunks=None,
resumed_disk=None, disk_chunks=None, disk_overlay_map=None,
resumed_memory=None, memory_chunks=None, memory_overlay_map=None,
valid_bit=0, **kwargs):
if fuse_disk_size <= 0:
raise CloudletGenerationError("FUSE disk size should be bigger than 0")
Expand All @@ -998,10 +998,12 @@ def run_fuse(bin_path, chunk_size, original_disk, fuse_disk_size,
resumed_disk = os.path.abspath(resumed_disk) if resumed_disk else ""
resumed_memory = os.path.abspath(resumed_memory) if resumed_memory else ""

disk_overlay_map = ','.join("%ld:%d" % (item, valid_bit)
for item in disk_chunks or [])
memory_overlay_map = ','.join("%ld:%d" % (item, valid_bit)
for item in memory_chunks or [])
if disk_overlay_map is None:
disk_overlay_map = ','.join("%ld:%d" % (item, valid_bit)
for item in disk_chunks or [])
if memory_overlay_map is None:
memory_overlay_map = ','.join("%ld:%d" % (item, valid_bit)
for item in memory_chunks or [])

# launch fuse
execute_args = [
Expand Down

0 comments on commit 9f186e6

Please sign in to comment.