8000 Cannot enable PXE menu for a profile · Issue #2678 · cobbler/cobbler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Cannot enable PXE menu for a profile #2678

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

Closed
heroin-moose opened this issue Jun 22, 2021 · 0 comments · Fixed by #2682
Closed

Cannot enable PXE menu for a profile #2678

heroin-moose opened this issue Jun 22, 2021 · 0 comments · Fixed by #2682
Labels
Bug Report Reporting a bug main Not a release but referring to the Git main branch
Milestone

Comments

@heroin-moose
Copy link
Contributor

Describe the bug

Running the following command fails:

# cobbler profile edit --name packer-ppc64le --enable-menu 1
exception on server: 'Archs' object has no attribute 'startswith'

Steps to reproduce

  1. Create a distro (ppc64le)
  2. Create a profile
  3. Try to enable PXE menu

Expected behavior

The command should not fail.

Cobbler version

Cobbler 3.2.1
  source: ?, ?
  build time: Tue Jun 22 15:41:34 2021

Operating system

CentOS 8.

Cobbler log

[Thread-283] 2021-06-22T16:27:59 - INFO | find_items; ['']                                                                                                                   [5/1913]
[Thread-283] 2021-06-22T16:27:59 - INFO | find_items; ['distro']
[Thread-283] 2021-06-22T16:27:59 - INFO | find_items; ['profile']
[Thread-283] 2021-06-22T16:27:59 - INFO | find_items; ['system']
[Thread-283] 2021-06-22T16:27:59 - INFO | Exception occurred: <class 'AttributeError'>
[Thread-283] 2021-06-22T16:27:59 - INFO | Exception value: 'Archs' object has no attribute 'startswith'
[Thread-283] 2021-06-22T16:27:59 - INFO | Exception Info:
  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 3505, in _dispatch
    return method_handle(*params)

  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 1988, in xapi_object_edit
    self.save_item(object_type, handle, token)

  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 2008, in save_item
    self.api.add_item(what, obj)

  File "/usr/lib/python3.6/site-packages/cobbler/api.py", line 744, in add_item
    self.get_items(what).add(ref, check_for_duplicate_names=check_for_duplicate_names, save=save)

  File "/usr/lib/python3.6/site-packages/cobbler/cobbler_collections/collection.py", line 401, in add
    self.lite_sync.add_single_profile(ref.name)

  File "/usr/lib/python3.6/site-packages/cobbler/actions/sync.py", line 396, in add_single_profile
    self.add_single_system(k)

  File "/usr/lib/python3.6/site-packages/cobbler/actions/sync.py", line 442, in add_single_system
    self.tftpd.sync_single_system(system)

  File "/usr/lib/python3.6/site-packages/cobbler/modules/managers/in_tftpd.py", line 117, in sync_single_system
    menu_items = self.tftpgen.get_menu_items()

  File "/usr/lib/python3.6/site-packages/cobbler/tftpgen.py", line 367, in get_menu_items
    return self.get_menu_level(None, arch)

  File "/usr/lib/python3.6/site-packages/cobbler/tftpgen.py", line 549, in get_menu_level
    self.get_profiles_menu(menu, metadata, arch)

  File "/usr/lib/python3.6/site-packages/cobbler/tftpgen.py", line 449, in get_profiles_menu
    image=None, format=boot_loader)

  File "/usr/lib/python3.6/site-packages/cobbler/tftpgen.py", line 677, in write_pxe_file
    image, arch, metadata["autoinstall"])

  File "/usr/lib/python3.6/site-packages/cobbler/tftpgen.py", line 1004, in build_kernel_options
    if arch is not None and arch.startswith("arm"):
@heroin-moose heroin-moose added the Bug Report Reporting a bug label Jun 22, 2021
@heroin-moose heroin-moose changed the title Cannot enable PXE menu Cannot enable PXE menu for a profile Jun 22, 2021
heroin-moose added a commit to heroin-moose/cobbler that referenced this issue Jun 22, 2021
The Enum class does not support string operations like startswith(), but
TFTP code still checks the CPU arch this way. Rewrite the check.

Fixes cobbler#2678.
@SchoolGuy SchoolGuy added this to the v3.3.0 milestone Jun 23, 2021
@SchoolGuy SchoolGuy added the main Not a release but referring to the Git main branch label Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Reporting a bug main Not a release but referring to the Git main branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0