Skip to content

Commit

Permalink
bundle-vol: call sync before kpartx/losetup
Browse files Browse the repository at this point in the history
Attempts to fix TOOLS-671
  • Loading branch information
gholms committed Jan 13, 2017
1 parent 123f412 commit cc2f34c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion euca2ools/commands/bundle/bundlevolume.py
@@ -1,4 +1,4 @@
# Copyright (c) 2009-2016 Hewlett Packard Enterprise Development LP
# Copyright (c) 2009-2017 Hewlett Packard Enterprise Development LP
#
# Redistribution and use of this software in source and binary forms,
# with or without modification, are permitted provided that the following
Expand Down Expand Up @@ -397,6 +397,7 @@ def __update_filesystem_ids(self, device, fsinfo):
subprocess.check_call(cmd)

def __detach_disk_image(self, image, device):
subprocess.check_call(['sync'])
if self.args['partition'] in ('mbr', 'gpt'):
self.log.debug('unmapping partitioned image %s', image)
cmd = ['kpartx', '-s', '-d', image]
Expand Down

0 comments on commit cc2f34c

Please sign in to comment.