Skip to content

Commit

Permalink
Log reason for ignoring disks in devicefactory
Browse files Browse the repository at this point in the history
Related: RHEL-8025
  • Loading branch information
vojtechtrefny committed Aug 27, 2024
1 parent 709884a commit 6920687
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions blivet/devicefactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,16 @@ def configure(self):

# drop any new disks that don't have free space
min_free = min(Size("500MiB"), self.parent_factory.size)

for d in add_disks:
if not d.partitioned:
log.debug("Ignoring disk %s: disk is not partitioned", d.name)
elif not d.format.supported:
log.debug("Ignoring disk %s: format %s is not supported", d.name, d.format.name)
elif d.format.free < min_free:
log.debug("Ignoring disk %s: not enough free space. Required: %s, free: %s",
d.name, min_free, d.format.free)

add_disks = [d for d in add_disks if d.partitioned and
d.format.supported and d.format.free >= min_free]

Expand Down

0 comments on commit 6920687

Please sign in to comment.