Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #39 from upgrades-migrations/disable_free_space_check
Browse files Browse the repository at this point in the history
Add option to disable /boot size check
  • Loading branch information
bocekm committed Jun 12, 2018
2 parents a7f6133 + db64dd5 commit 7180b94
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions man/redhat-upgrade-tool.8
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ Print lots of debugging info\&.
Continue even if the Preupgrade Assistant risk check fails\&. Use it at your own risk\&.
.RE
.PP
\fB\-\-no\-space\-check\fR
.RS 4
Disable check of free space in /boot\&. By default the required minimum before reboot is 50 MiB\&. Use it at your own risk\&.
.RE
.PP
\fB\-\-debuglog\fR \fIDEBUGLOG\fR
.RS 4
Write debugging output to the given file\&. Defaults to
Expand Down
4 changes: 4 additions & 0 deletions man/redhat-upgrade-tool.8.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ Print lots of debugging info.
*--force*::
Continue even if the Preupgrade Assistant risk check fails. Use it at your own risk.

*--no-space-check*::
Disable check of free space in /boot. By default the required minimum before
reboot is 50 MiB. Use it at your own risk.

*--debuglog* 'DEBUGLOG'::
Write debugging output to the given file. Defaults to '/var/log/redhat-upgrade-tool.log'.

Expand Down
2 changes: 1 addition & 1 deletion redhat-upgrade-tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def main(args):
# installation during the upgrade.
statvfs = os.statvfs("/boot")
avail_bytes = statvfs.f_frsize * statvfs.f_bavail
if avail_bytes < MIN_AVAIL_BYTES_FOR_BOOT:
if not args.no_space_check and avail_bytes < MIN_AVAIL_BYTES_FOR_BOOT:
reset_boot()
additional_mib_needed = \
(MIN_AVAIL_BYTES_FOR_BOOT - avail_bytes) / 2**20
Expand Down
6 changes: 6 additions & 0 deletions redhat_upgrade_tool/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from . import packagedir
from .sysprep import reset_boot, remove_boot, remove_cache, misc_cleanup
from . import _
from . import MIN_AVAIL_BYTES_FOR_BOOT

import logging
log = logging.getLogger(__package__)
Expand All @@ -45,6 +46,11 @@ def parse_args(gui=False):
p.add_option('-f', '--force', action='store_true', default=False,
help=_('continue even if the Preupgrade Assistant risk check'
'fails. Use it at your own risk.'))

p.add_option('--no-space-check', action='store_true', default=False,
help=_('disable check of free space in /boot. By default the'
' required minimum before reboot is 50 MiB. Use it at'
' your own risk.'))
p.add_option('--cleanup-post', action='store_true', default=False,
help=_('cleanup old package after the upgrade'))

Expand Down

0 comments on commit 7180b94

Please sign in to comment.