8000 cobbler sync fails with a Type Error · Issue #2675 · cobbler/cobbler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cobbler sync fails with a Type Error #2675

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 #2677
Closed

cobbler sync fails with a Type Error #2675

heroin-moose opened this issue Jun 22, 2021 · 1 comment · Fixed by #2677
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

Running cobbler sync fails with a Type Error:

$ cobbler sync
...
Exception occurred: <class 'TypeError'>
Exception value: can't pickle _thread.RLock objects
Exception Info:
!!! TASK FAILED !!!

Steps to reproduce

  1. Create a distro
  2. Create a profile
  3. Run cobbler sync

Expected behavior

This command should not fail.

Cobbler version

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

Operating system

CentOS 8.

Cobbler log

[2021-06-21_231907_sync] 2021-06-21T23:19:08 - INFO | Exception occurred: <class 'TypeError'>
[2021-06-21_231907_sync] 2021-06-21T23:19:08 - INFO | Exception value: can't pickle _thread.RLock objects
[2021-06-21_231907_sync] 2021-06-21T23:19:08 - INFO | Exception Info:
  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 96, in run
    rc = self._run(self)

  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 212, in runner
    self.remote.api.sync(self.options.get("verbose", False), what=what)

  File "/usr/lib/python3.6/site-packages/cobbler/api.py", line 1379, in sync
    sync_obj.run()

  File "/usr/lib/python3.6/site-packages/cobbler/actions/sync.py", line 160, in run
    self.write_dhcp()

  File "/usr/lib/python3.6/site-packages/cobbler/actions/sync.py", line 242, in write_dhcp
    self.dhcp.write_configs()

  File "/usr/lib/python3.6/site-packages/cobbler/modules/managers/isc.py", line 406, in write_configs
    self.write_v4_config()

  File "/usr/lib/python3.6/site-packages/cobbler/modules/managers/isc.py", line 99, in write_v4_config
    interface = copy.deepcopy(system_interface)

  File "/usr/lib64/python3.6/copy.py", line 180, in deepcopy
    y = _reconstruct(x, memo, *rv)

  File "/usr/lib64/python3.6/copy.py", line 280, in _reconstruct
    state = deepcopy(state, memo)

  File "/usr/lib64/python3.6/copy.py", line 150, in deepcopy
    y = copier(x, memo)

  File "/usr/lib64/python3.6/copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)

  File "/usr/lib64/python3.6/copy.py", line 180, in deepcopy
    y = _reconstruct(x, memo, *rv)

  File "/usr/lib64/python3.6/copy.py", line 280, in _reconstruct
    state = deepcopy(state, memo)

  File "/usr/lib64/python3.6/copy.py", line 150, in deepcopy
    y = copier(x, memo)

  File "/usr/lib64/python3.6/copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)

  File "/usr/lib64/python3.6/copy.py", line 150, in deepcopy
    y = copier(x, memo)

  File "/usr/lib64/python3.6/copy.py", line 215, in _deepcopy_list
    append(deepcopy(a, memo))

  File "/usr/lib64/python3.6/copy.py", line 180, in deepcopy
    y = _reconstruct(x, memo, *rv)

  File "/usr/lib64/python3.6/copy.py", line 280, in _reconstruct
    state = deepcopy(state, memo)

  File "/usr/lib64/python3.6/copy.py", line 150, in deepcopy
    y = copier(x, memo)

  File "/usr/lib64/python3.6/copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)

  File "/usr/lib64/python3.6/copy.py", line 169, in deepcopy
    rv = reductor(4)l
@heroin-moose heroin-moose added the Bug Report Reporting a bug 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 SchoolGuy added the main Not a release but referring to the Git main branch label Jun 22, 2021
@SchoolGuy
Copy link
Member

This needs to use the new to_dict method to not fail. The logger and other internal attributes of an interface need to be excluded from the process.

SchoolGuy added a commit that referenced this issue Jun 22, 2021
Use new to_dict method of the Interface object
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