Skip to content

Commit

Permalink
Merge pull request #5858 from vojtechtrefny/master_turn-on-swap-ignor…
Browse files Browse the repository at this point in the history
…e-all

Ignore all storage errors when trying to activate swaps
  • Loading branch information
KKoukiou authored Sep 1, 2024
2 parents 2eb91b8 + 5c39951 commit 5fc607c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyanaconda/modules/storage/devicetree/fsset.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
from blivet import blockdev
from blivet.devices import NoDevice, DirectoryDevice, NFSDevice, FileDevice, MDRaidArrayDevice, \
NetworkStorageDevice, OpticalDevice
from blivet.errors import UnrecognizedFSTabEntryError, FSTabTypeMismatchError, SwapSpaceError
from blivet.errors import UnrecognizedFSTabEntryError, FSTabTypeMismatchError, SwapSpaceError, \
StorageError
from blivet.formats import get_format, get_device_format_class
from blivet.storage_log import log_exception_info

Expand Down Expand Up @@ -528,7 +529,8 @@ def turn_on_swap(self, root_path=""):
try:
device.setup()
device.format.setup()
except (SwapSpaceError, blockdev.SwapActivateError) as e:
except (SwapSpaceError, blockdev.SwapActivateError,
StorageError, blockdev.BlockDevError) as e:
log.error("Failed to activate swap on '%s': %s", device.name, str(e))
break
else:
Expand Down

0 comments on commit 5fc607c

Please sign in to comment.