8000 Cannot toggle iPXE support via cobbler CLI tool · Issue #2674 · cobbler/cobbler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Cannot toggle iPXE support via cobbler CLI tool #2674

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 · 1 comment · Fixed by #2676
Closed

Cannot toggle iPXE support via cobbler CLI tool #2674

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

Comments

@heroin-moose
Copy link
Contributor
heroin-moose commented Jun 22, 2021

Describe the bug

It's not possible to toggle iPXE support, the API responds with a type check error:

# cobbler profile edit --name foobar --enable-ipxe 1
exception on server: enable_ipxe needs to be of type bool

Steps to reproduce

  1. Build fresh RPMs from master
  2. Create a distro
  3. Create a profile for that distro
  4. Run cobbler profile edit

Expected behavior

The given command should not fail.

Cobbler version

# cobbler version
Cobbler 3.2.1
  source: ?, ?
  build time: Mon Jun 21 17:54:49 2021

Operating system

CentOS 8.

Cobbler log

[Thread-5] 2021-06-22T08:44:16 - INFO | Exception occurred: <class 'TypeError'>
[Thread-5] 2021-06-22T08:44:16 - INFO | Exception value: enable_ipxe needs to be of type bool
[Thread-5] 2021-06-22T08:44:16 - 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 1938, in xapi_object_edit
    self.modify_item(object_type, handle, key, value, token)

  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 1696, in modify_item
    setattr(obj, attribute, arg)

  File "/usr/lib/python3.6/site-packages/cobbler/items/profile.py", line 285, in enable_ipxe
    raise TypeError("enable_ipxe needs to be of type bool")
@heroin-moose heroin-moose added the Bug Report Reporting a bug label Jun 22, 2021
@SchoolGuy SchoolGuy added the main Not a release but referring to the Git main branch label Jun 22, 2021
@SchoolGuy SchoolGuy self-assigned this Jun 22, 2021
@SchoolGuy SchoolGuy added this to the v3.3.0 milestone Jun 22, 2021
@SchoolGuy
Copy link
Member

The problem is that the value on the CLI is always a str. Currently we need to convert it with the utils method. Sadly we can't do that in the CLI since we can't distinguish that there. Thus we need to do it in the model. This is affecting all boolean attributes.

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