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

fix(middlewared/disk): only run savecore in unused partitions #811

Merged
merged 1 commit into from Feb 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/middlewared/middlewared/plugins/disk.py
Expand Up @@ -595,9 +595,11 @@ async def swaps_configure(self):
for p in g.providers:
# if swap partition
if p.config['rawtype'] == '516e7cb5-6ecf-11d6-8ff8-00022d09712b':
# Try to save a core dump from that
await run('savecore', '-z', '-m', '5', '/data/crash/', f'/dev/{p.name}', check=False)
if p.name not in used_partitions:
# Try to save a core dump from that.
# Only try savecore if the partition is not already in use
# to avoid errors in the console (#27516)
await run('savecore', '-z', '-m', '5', '/data/crash/', f'/dev/{p.name}', check=False)
swap_partitions_by_size[p.mediasize].append(p.name)

dumpdev = False
Expand Down