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

CLOS-2786: Fix detection when a bootable partition in on RAID #22

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

shibutd
Copy link
Collaborator

@shibutd shibutd commented Aug 1, 2024

On my server, leapp preupgrade fail with the following error:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run
    actor_instance.run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 289, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/actor.py", line 18, in process
    scan_layout_lib.scan_grub_device_partition_layout()
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/libraries/scan_layout.py", line 91, in scan_grub_device_partition_layout
    dev_info = get_partition_layout(device)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/libraries/scan_layout.py", line 79, in get_partition_layout
    part_start = int(part_info[2]) if len(part_info) == len(part_all_attrs) else int(part_info[1])
ValueError: invalid literal for int() with base 10: '*'

This is caused by the following line:

/dev/sda1   *        2048     1026047      512000   fd  Linux raid autodetect

I have my server on EL7 with / using a Linux RAID so len(part_info) != len(part_all_attrs), hence why it try to convert '*' to int.

On my server, leapp preupgrade fail with the following error:

	Traceback (most recent call last):
	  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
	    self.run()
	  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
	    self._target(*self._args, **self._kwargs)
	  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run
	    actor_instance.run(*args, **kwargs)
	  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 289, in run
	    self.process(*args)
	  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/actor.py", line 18, in process
	    scan_layout_lib.scan_grub_device_partition_layout()
	  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/libraries/scan_layout.py", line 91, in scan_grub_device_partition_layout
	    dev_info = get_partition_layout(device)
	  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/libraries/scan_layout.py", line 79, in get_partition_layout
	    part_start = int(part_info[2]) if len(part_info) == len(part_all_attrs) else int(part_info[1])
	ValueError: invalid literal for int() with base 10: '*'

This is caused by the following line:

	/dev/sda1   *        2048     1026047      512000   fd  Linux raid autodetect

I have my server on EL7 with / using a Linux RAID so len(part_info) != len(part_all_attrs), hence why
it try to convert '*' to int.
Copy link

github-actions bot commented Aug 1, 2024

Thank you for contributing to the Leapp project!

Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergable.
If you want to re-run tests or request review, you can use following commands as a comment:

  • leapp-ci build to run copr build and e2e tests in OAMG CI
  • review please to notify leapp developers of review request

Please open ticket in case you experience technical problem with the CI. (RH internal only)

Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra.

@prilr prilr changed the title Fix detection when a bootable partition in on RAID CLOS-2786: Fix detection when a bootable partition in on RAID Aug 1, 2024
@prilr prilr merged commit 88c8780 into cloudlinux:cloudlinux Aug 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants