Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log reason for ignoring disks in devicefactory #1278

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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