Issue #20235: blockdev.format fails when succeeding

After a mkfs is issued, an immediate lsblk will show the device as
unformatted. Issuing a sync before lsblk will allow the check to
succeed.
This commit is contained in:
Joe Julian 2015-01-29 20:16:40 -08:00
parent 34e0cab774
commit 9ea76ed9c1

View File

@ -130,6 +130,7 @@ def formatted(name, fs_type='ext4', **kwargs):
cmd += '-i size={0} '.format(kwargs['inode_size'])
cmd += name
__salt__['cmd.run'](cmd).splitlines()
__salt__['cmd.run']('sync').splitlines()
blk = __salt__['cmd.run']('lsblk -o fstype {0}'.format(name)).splitlines()
if len(blk) == 1: