Skip to content

Commit

Permalink
Ignore format create/remove actions on Stratis filesystem devices
Browse files Browse the repository at this point in the history
REMOVE THIS BEFORE MERGING!
  • Loading branch information
vojtechtrefny committed Jan 18, 2021
1 parent 762de1c commit c187d08
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions blivet/deviceaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,12 @@ def execute(self, callbacks=None):
get_current_entropy(), min_required_entropy)
luks_data.min_entropy = 0

self.device.setup()
self.device.format.create(device=self.device.path,
options=self.device.format_args)
if self.device.type == "stratis_filesystem":
self.device.format.exists = True
else:
self.device.setup()
self.device.format.create(device=self.device.path,
options=self.device.format_args)

# Get the UUID now that the format is created
udev.settle()
Expand Down Expand Up @@ -745,6 +748,10 @@ def execute(self, callbacks=None):
# remove any flag if set
super(ActionDestroyFormat, self).execute(callbacks=callbacks)
status = self.device.status

if self.device.type == "stratis_filesystem":
return

self.device.setup(orig=True)
if hasattr(self.device, 'set_rw'):
self.device.set_rw()
Expand Down

0 comments on commit c187d08

Please sign in to comment.