python3-hivex breaks cobbler
I am trying to get windows and pxe/ipxe working on cobbler-3.2.2. However when I install python3-hivex it breaks cobbler sync, as the sync_post_wingen.py script kicks in, but removing python3-hivex gets things working again.
To fix I had to create the following empty files (and maybe some more):
touch /var/lib/tftpboot/winos/win_sif.template
touch /var/lib/tftpboot/winos/startnet.template
cobbler sync --> worked
I have tried to follow the cobbler official guide for windows setup, but its not working for now and not clear if sync_post_wingen.py creates the templates needed or all the mentioned files need to created manually ?
I was following this documentation: https://cobbler.readthedocs.io/en/latest/user-guide/wingen.html
Adding windows_enabled: true in /etc/cobbler/settings.d/windows.settings also breaks cobblerd and the following errors are shown:
Traceback (most recent call last):
File "/usr/bin/cobbler", line 35, in <module>
sys.exit(app.main())
File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 849, in main
cli = CobblerCLI(sys.argv)
File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 312, in __init__
self.url_cobbler_api = utils.local_get_cobbler_api_url()
File "/usr/lib/python3.6/site-packages/cobbler/utils.py", line 2267, in local_get_cobbler_api_url
data = settings.read_settings_file()
File "/usr/lib/python3.6/site-packages/cobbler/settings.py", line 534, in read_settings_file
filecontent = __migrate_settingsfile_int_bools(filecontent)
File "/usr/lib/python3.6/site-packages/cobbler/settings.py", line 498, in __migrate_settingsfile_int_bools
if DEFAULTS[key][1] == "bool":
KeyError: 'windows_enabled'
[root@cblr-ldn-01 ~]# cobbler check
Traceback (most recent call last):
File "/usr/bin/cobbler", line 35, in <module>
sys.exit(app.main())
File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 849, in main
cli = CobblerCLI(sys.argv)
File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 312, in __init__
self.url_cobbler_api = utils.local_get_cobbler_api_url()
File "/usr/lib/python3.6/site-packages/cobbler/utils.py", line 2267, in local_get_cobbler_api_url
data = settings.read_settings_file()
File "/usr/lib/python3.6/site-packages/cobbler/settings.py", line 534, in read_settings_file
filecontent = __migrate_settingsfile_int_bools(filecontent)
File "/usr/lib/python3.6/site-packages/cobbler/settings.py", line 498, in __migrate_settingsfile_int_bools
if DEFAULTS[key][1] == "bool":
KeyError: 'windows_enabled'
Deleting: /etc/cobbler/settings.d/windows.settings --> fixes above error. But is this file and variable needed ?
My setup is using Python3.6 (AlmaLinux8.6)
We need better guide for non-developers. Is there a simpler working guide for cobbler 3.2.2 windows setup.
@tpw56j Could you maybe take some time to investigate and help out here?
@SchoolGuy Yes, unfortunately I didn't check for the existence of the win_sif.template and startnet.template templates in sync_post_wingen.py. I can justify myself only by the fact that I described their need and an example of the content in cobbler/docs/user-guide/wingen.rst (for version 3.2.2).
In version 3.3.3 they are in cobbler/templates/windows, win_sif.template renamed to answerfile.template.
Okay then I will label this as a docs bug. Thanks for the quick answer!
@asimat here are the docs for your version: https://cobbler.readthedocs.io/en/v3.2.2/user-guide/wingen.html the latest guide is becoming slowly out of sync for your version. If you find missing bugs feel free to submit PRs but it will take me time to get to review them and release a new version for 3.2.x.