%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 188.40.95.74 / Your IP : 216.73.216.142 Web Server : Apache System : Linux cp01.striminghost.net 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64 User : vlasotin ( 1054) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/leapp-repository/repositories/system_upgrade/common/actors/checkgrubcore/ |
Upload File : |
from leapp import reporting from leapp.actors import Actor from leapp.exceptions import StopActorExecutionError from leapp.libraries.common.config import architecture from leapp.models import FirmwareFacts, GrubInfo from leapp.reporting import create_report, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag GRUB_SUMMARY = ('On legacy (BIOS) systems, GRUB2 core (located in the gap between the MBR and the ' 'first partition) cannot be updated during the rpm transaction and Leapp has to initiate ' 'the update running "grub2-install" after the transaction. No action is needed before the ' 'upgrade. After the upgrade, it is recommended to check the GRUB configuration.') class CheckGrubCore(Actor): """ Check whether we are on legacy (BIOS) system and instruct Leapp to upgrade GRUB core """ name = 'check_grub_core' consumes = (FirmwareFacts, GrubInfo) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): if architecture.matches_architecture(architecture.ARCH_S390X): # s390x archs use ZIPL instead of GRUB return ff = next(self.consume(FirmwareFacts), None) if ff and ff.firmware == 'bios': grub_info = next(self.consume(GrubInfo), None) if not grub_info: raise StopActorExecutionError('Actor did not receive any GrubInfo message.') if grub_info.orig_devices: create_report([ reporting.Title( 'GRUB2 core will be automatically updated during the upgrade' ), reporting.Summary(GRUB_SUMMARY), reporting.Severity(reporting.Severity.HIGH), reporting.Groups([reporting.Groups.BOOT]), ]) else: create_report([ reporting.Title('Leapp could not identify where GRUB2 core is located'), reporting.Summary( 'We assumed GRUB2 core is located on the same device(s) as /boot, ' 'however Leapp could not detect GRUB2 on those device(s). ' 'This means GRUB2 core will not be updated during the upgrade process and ' 'the system will probably ' 'boot into the old kernel after the upgrade. ' 'GRUB2 core needs to be updated manually on legacy (BIOS) systems to ' 'fix this.' ), reporting.Severity(reporting.Severity.HIGH), reporting.Groups([reporting.Groups.BOOT]), reporting.Remediation( hint='Please run the "grub2-install <GRUB_DEVICE>" command manually ' 'after the upgrade'), ])