Fix parted task ordering

This commit is contained in:
Anders Ingemann 2013-08-11 18:33:35 +02:00
parent fbae8fa17c
commit 014488e6c9

View file

@ -1,7 +1,7 @@
from base import Task from base import Task
from common import phases from common import phases
from common.tools import log_check_call from common.tools import log_check_call
from filesystem import UnmountVolume import filesystem
class PartitionVolume(Task): class PartitionVolume(Task):
@ -35,6 +35,7 @@ class MapPartitions(Task):
class FormatPartitions(Task): class FormatPartitions(Task):
description = 'Formatting the partitions' description = 'Formatting the partitions'
phase = phases.volume_preparation phase = phases.volume_preparation
before = [filesystem.TuneVolumeFS]
after = [MapPartitions] after = [MapPartitions]
def run(self, info): def run(self, info):
@ -45,7 +46,7 @@ class FormatPartitions(Task):
class UnmapPartitions(Task): class UnmapPartitions(Task):
description = 'Removing volume partitions mapping' description = 'Removing volume partitions mapping'
phase = phases.volume_unmounting phase = phases.volume_unmounting
after = [UnmountVolume] after = [filesystem.UnmountVolume]
def run(self, info): def run(self, info):
log_check_call(['kpartx', '-d', info.loopback_file]) log_check_call(['kpartx', '-d', info.loopback_file])