[uyuni-devel] Cobbler system add fails with exception
Hello Community, I'm trying to setup a fully automated deployment with Uyuni and cobbler, but it seems that there is something wrong with my setup. When I run 'uyuni:/etc/cobbler # cobbler system add --help' 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 745, in main rc = cli.run(sys.argv) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 358, in run self.object_command(object_type, object_action) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 428, in object_command network_interface_fields, settings, object_action) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 238, in add_options_from_fields _add_parser_option_from_field(parser, field, settings) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 209, in _add_parser_option_from_field raise Exception("field %s default value (%s) is not listed in choices (%s)" % (name, default, str(choices))) Exception: field redhat_management_key default value (<<inherit>>) is not listed in choices (str) I got a traceback that 'redhat_management_key' default value is not listed in choices. My guess is that this should not happen,but my python skills are quite limited. As I have a separate NIC (separate VLAN) for the Uyuni's cobbler, I wanted to be able to pass in kickstart/autoyast 's script the network settings (via system variables) before powering off the machine. Then an automated process will change the VLAN (and PXE boot) of the client's NIC and will start it up. Once it's available, it will be bootstrapped and additional configuration can be done on the permanent address. Also, it seems that bootstrapping RHEL 7 via cobbler is failing, so that cannot be done during initial deployment. Most probably the 'spacewalk/redhat_register' snippet has an issue and cobbler is not expanding the it. Thanks for reading such a long post and any help is appreciated, maybe there is already a fix. If not - I can provide details in an issue. Best Regards, Strahil Nikolov -- To unsubscribe, e-mail: uyuni-devel+unsubscribe@opensuse.org To contact the owner, e-mail: uyuni-devel+owner@opensuse.org
Hello, I forgot to clarify that I tried creating a system profile (as per https://documentation.suse.com/external-tree/en-us/suma/4.0/pdf/suse_manager... -> page 30) and trying to schedule the deployment.The webUI doesn't detect my profiles and even after I create a new one - it still search for profile. Maybe that option is only for SUSE-based systems and autoyast ? It seems that there is no tab for pushing system based variables which to be used by the kickstart (of course parsed by cobbler and cheetah),as I want to avoid pushing my settings in the profile and creating a clone for each system I have to deploy. I couldn't find a system-based variable set/deploy procedure in the API guide, but I might have missed that. Best Regards, Strahil Nikolov Hello Community, I'm trying to setup a fully automated deployment with Uyuni and cobbler, but it seems that there is something wrong with my setup. When I run 'uyuni:/etc/cobbler # cobbler system add --help' 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 745, in main rc = cli.run(sys.argv) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 358, in run self.object_command(object_type, object_action) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 428, in object_command network_interface_fields, settings, object_action) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 238, in add_options_from_fields _add_parser_option_from_field(parser, field, settings) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 209, in _add_parser_option_from_field raise Exception("field %s default value (%s) is not listed in choices (%s)" % (name, default, str(choices))) Exception: field redhat_management_key default value (<<inherit>>) is not listed in choices (str) I got a traceback that 'redhat_management_key' default value is not listed in choices. My guess is that this should not happen,but my python skills are quite limited. As I have a separate NIC (separate VLAN) for the Uyuni's cobbler, I wanted to be able to pass in kickstart/autoyast 's script the network settings (via system variables) before powering off the machine. Then an automated process will change the VLAN (and PXE boot) of the client's NIC and will start it up. Once it's available, it will be bootstrapped and additional configuration can be done on the permanent address. Also, it seems that bootstrapping RHEL 7 via cobbler is failing, so that cannot be done during initial deployment. Most probably the 'spacewalk/redhat_register' snippet has an issue and cobbler is not expanding the it. Thanks for reading such a long post and any help is appreciated, maybe there is already a fix. If not - I can provide details in an issue. Best Regards, Strahil Nikolov -- To unsubscribe, e-mail: uyuni-devel+unsubscribe@opensuse.org To contact the owner, e-mail: uyuni-devel+owner@opensuse.org
Hi Strahil, this is a known bug that should actually be fixed by now. Could you please tell me the Cobbler version you are using and maybe also the repository you are installing this from. You can get both information with "zypper info cobbler". Thanks! Jochen On 01.12.19 22:01, Strahil Nikolov wrote:
Hello,
I forgot to clarify that I tried creating a system profile (as per https://documentation.suse.com/external-tree/en-us/suma/4.0/pdf/suse_manager... -> page 30) and trying to schedule the deployment.The webUI doesn't detect my profiles and even after I create a new one - it still search for profile. Maybe that option is only for SUSE-based systems and autoyast ?
It seems that there is no tab for pushing system based variables which to be used by the kickstart (of course parsed by cobbler and cheetah),as I want to avoid pushing my settings in the profile and creating a clone for each system I have to deploy. I couldn't find a system-based variable set/deploy procedure in the API guide, but I might have missed that.
Best Regards, Strahil Nikolov
Hello Community,
I'm trying to setup a fully automated deployment with Uyuni and cobbler, but it seems that there is something wrong with my setup.
When I run 'uyuni:/etc/cobbler # cobbler system add --help' 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 745, in main rc = cli.run(sys.argv) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 358, in run self.object_command(object_type, object_action) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 428, in object_command network_interface_fields, settings, object_action) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 238, in add_options_from_fields _add_parser_option_from_field(parser, field, settings) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 209, in _add_parser_option_from_field raise Exception("field %s default value (%s) is not listed in choices (%s)" % (name, default, str(choices))) Exception: field redhat_management_key default value (<<inherit>>) is not listed in choices (str)
I got a traceback that 'redhat_management_key' default value is not listed in choices. My guess is that this should not happen,but my python skills are quite limited.
As I have a separate NIC (separate VLAN) for the Uyuni's cobbler, I wanted to be able to pass in kickstart/autoyast 's script the network settings (via system variables) before powering off the machine. Then an automated process will change the VLAN (and PXE boot) of the client's NIC and will start it up. Once it's available, it will be bootstrapped and additional configuration can be done on the permanent address.
Also, it seems that bootstrapping RHEL 7 via cobbler is failing, so that cannot be done during initial deployment. Most probably the 'spacewalk/redhat_register' snippet has an issue and cobbler is not expanding the it.
Thanks for reading such a long post and any help is appreciated, maybe there is already a fix. If not - I can provide details in an issue.
Best Regards, Strahil Nikolov
-- SUSE Software Solutions Germany GmbH Maxfeldstr. 5 90409 Nuremberg Germany (HRB 36809, AG Nürnberg) Managing Director: Felix Imendörffer -- To unsubscribe, e-mail: uyuni-devel+unsubscribe@opensuse.org To contact the owner, e-mail: uyuni-devel+owner@opensuse.org
Hi Strahil, a quick check revealed that this is fixed in the current HEAD of the Cobbler repo, but the released version still has that bug. Unfortunately we won't be able to ship a fix before the next release, but you could try to patch this in Cobbler manually. You can find the fix here: https://github.com/cobbler/cobbler/commit/3172d1df9b9cc8c3e51843428a9d8dec7e... To get the diff for a patch you can just add a ".diff" to this commit: https://github.com/cobbler/cobbler/commit/3172d1df9b9cc8c3e51843428a9d8dec7e... Now you can apply the patch like this: patch < 3172d1df9b9cc8c3e51843428a9d8dec7e05c0da.diff Of course you'll have to switch to the cobbler folder first, and that should be /usr/lib64/python3.6/site-packages/cobbler. Let me know if it works. Cheers Jochen On 03.12.19 08:50, Jochen Breuer wrote:
Hi Strahil,
this is a known bug that should actually be fixed by now. Could you please tell me the Cobbler version you are using and maybe also the repository you are installing this from. You can get both information with "zypper info cobbler".
Thanks!
Jochen
On 01.12.19 22:01, Strahil Nikolov wrote:
Hello,
I forgot to clarify that I tried creating a system profile (as per https://documentation.suse.com/external-tree/en-us/suma/4.0/pdf/suse_manager... -> page 30) and trying to schedule the deployment.The webUI doesn't detect my profiles and even after I create a new one - it still search for profile. Maybe that option is only for SUSE-based systems and autoyast ?
It seems that there is no tab for pushing system based variables which to be used by the kickstart (of course parsed by cobbler and cheetah),as I want to avoid pushing my settings in the profile and creating a clone for each system I have to deploy. I couldn't find a system-based variable set/deploy procedure in the API guide, but I might have missed that.
Best Regards, Strahil Nikolov
Hello Community,
I'm trying to setup a fully automated deployment with Uyuni and cobbler, but it seems that there is something wrong with my setup.
When I run 'uyuni:/etc/cobbler # cobbler system add --help' 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 745, in main rc = cli.run(sys.argv) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 358, in run self.object_command(object_type, object_action) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 428, in object_command network_interface_fields, settings, object_action) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 238, in add_options_from_fields _add_parser_option_from_field(parser, field, settings) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 209, in _add_parser_option_from_field raise Exception("field %s default value (%s) is not listed in choices (%s)" % (name, default, str(choices))) Exception: field redhat_management_key default value (<<inherit>>) is not listed in choices (str)
I got a traceback that 'redhat_management_key' default value is not listed in choices. My guess is that this should not happen,but my python skills are quite limited.
As I have a separate NIC (separate VLAN) for the Uyuni's cobbler, I wanted to be able to pass in kickstart/autoyast 's script the network settings (via system variables) before powering off the machine. Then an automated process will change the VLAN (and PXE boot) of the client's NIC and will start it up. Once it's available, it will be bootstrapped and additional configuration can be done on the permanent address.
Also, it seems that bootstrapping RHEL 7 via cobbler is failing, so that cannot be done during initial deployment. Most probably the 'spacewalk/redhat_register' snippet has an issue and cobbler is not expanding the it.
Thanks for reading such a long post and any help is appreciated, maybe there is already a fix. If not - I can provide details in an issue.
Best Regards, Strahil Nikolov
-- SUSE Software Solutions Germany GmbH Maxfeldstr. 5 90409 Nuremberg Germany (HRB 36809, AG Nürnberg) Managing Director: Felix Imendörffer -- To unsubscribe, e-mail: uyuni-devel+unsubscribe@opensuse.org To contact the owner, e-mail: uyuni-devel+owner@opensuse.org
On December 3, 2019 3:44:57 PM GMT+02:00, Jochen Breuer
Hi Strahil,
a quick check revealed that this is fixed in the current HEAD of the Cobbler repo, but the released version still has that bug. Unfortunately we won't be able to ship a fix before the next release, but you could try to patch this in Cobbler manually.
You can find the fix here: https://github.com/cobbler/cobbler/commit/3172d1df9b9cc8c3e51843428a9d8dec7e...
To get the diff for a patch you can just add a ".diff" to this commit: https://github.com/cobbler/cobbler/commit/3172d1df9b9cc8c3e51843428a9d8dec7e...
Now you can apply the patch like this: patch < 3172d1df9b9cc8c3e51843428a9d8dec7e05c0da.diff
Of course you'll have to switch to the cobbler folder first, and that should be /usr/lib64/python3.6/site-packages/cobbler.
Let me know if it works.
Cheers
Jochen
Hi Strahil,
this is a known bug that should actually be fixed by now. Could you please tell me the Cobbler version you are using and maybe also the repository you are installing this from. You can get both information with "zypper info cobbler".
Thanks!
Jochen
On 01.12.19 22:01, Strahil Nikolov wrote:
Hello,
I forgot to clarify that I tried creating a system profile (as
It seems that there is no tab for pushing system based variables
which to be used by the kickstart (of course parsed by cobbler and cheetah),as I want to avoid pushing my settings in the profile and creating a clone for each system I have to deploy.
I couldn't find a system-based variable set/deploy procedure in the API guide, but I might have missed that.
Best Regards, Strahil Nikolov
Hello Community,
I'm trying to setup a fully automated deployment with Uyuni and cobbler, but it seems that there is something wrong with my setup.
When I run 'uyuni:/etc/cobbler # cobbler system add --help' 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 745, in main rc = cli.run(sys.argv) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 358, in run self.object_command(object_type, object_action) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 428, in object_command network_interface_fields, settings, object_action) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 238, in add_options_from_fields _add_parser_option_from_field(parser, field, settings) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 209, in _add_parser_option_from_field raise Exception("field %s default value (%s) is not listed in choices (%s)" % (name, default, str(choices))) Exception: field redhat_management_key default value (<<inherit>>) is not listed in choices (str)
I got a traceback that 'redhat_management_key' default value is not
As I have a separate NIC (separate VLAN) for the Uyuni's cobbler, I
wanted to be able to pass in kickstart/autoyast 's script the network settings (via system variables) before powering off the machine.
Then an automated process will change the VLAN (and PXE boot) of the client's NIC and will start it up. Once it's available, it will be bootstrapped and additional configuration can be done on the permanent address.
Also, it seems that bootstrapping RHEL 7 via cobbler is failing, so
On 03.12.19 08:50, Jochen Breuer wrote: per https://documentation.suse.com/external-tree/en-us/suma/4.0/pdf/suse_manager... -> page 30) and trying to schedule the deployment.The webUI doesn't detect my profiles and even after I create a new one - it still search for profile. Maybe that option is only for SUSE-based systems and autoyast ? listed in choices. My guess is that this should not happen,but my python skills are quite limited. that cannot be done during initial deployment. Most probably the 'spacewalk/redhat_register' snippet has an issue and cobbler is not expanding the it.
Thanks for reading such a long post and any help is appreciated,
maybe there is already a fix. If not - I can provide details in an issue.
Best Regards, Strahil Nikolov
Thanks Jochen, Thanks for the reply. I really appreciate that. As it was just 2 lines , I did it manually and it works. I'm hitting a cheetah issue and I have no clue how to debug. Cobbler logs are not very helpful to me ( lack of python knowledge). Any hint (docu link, blog, etc) will be greatly appreciated for debugging the root cause. My idea is to learn to debug this type of issues on my own. P.S.: Also, could you share your approach for finding that the issue was already resolved ? Using 'google' was not very helpful. Best Regards, Strahil Nikolov -- To unsubscribe, e-mail: uyuni-devel+unsubscribe@opensuse.org To contact the owner, e-mail: uyuni-devel+owner@opensuse.org
Hi Jochen, All,
I have found a fix in cobbler's git and I have opened an issue (1686) - so it won't be missed in Uyuni.
Thanks again for your efforts.
Best Regards,
Strahil Nikolov
В събота, 7 декември 2019 г., 18:54:39 ч. Гринуич+2, Strahil Nikolov
Hi Strahil,
a quick check revealed that this is fixed in the current HEAD of the Cobbler repo, but the released version still has that bug. Unfortunately we won't be able to ship a fix before the next release, but you could try to patch this in Cobbler manually.
You can find the fix here: https://github.com/cobbler/cobbler/commit/3172d1df9b9cc8c3e51843428a9d8dec7e...
To get the diff for a patch you can just add a ".diff" to this commit: https://github.com/cobbler/cobbler/commit/3172d1df9b9cc8c3e51843428a9d8dec7e...
Now you can apply the patch like this: patch < 3172d1df9b9cc8c3e51843428a9d8dec7e05c0da.diff
Of course you'll have to switch to the cobbler folder first, and that should be /usr/lib64/python3.6/site-packages/cobbler.
Let me know if it works.
Cheers
Jochen
Hi Strahil,
this is a known bug that should actually be fixed by now. Could you please tell me the Cobbler version you are using and maybe also the repository you are installing this from. You can get both information with "zypper info cobbler".
Thanks!
Jochen
On 01.12.19 22:01, Strahil Nikolov wrote:
Hello,
I forgot to clarify that I tried creating a system profile (as
It seems that there is no tab for pushing system based variables
which to be used by the kickstart (of course parsed by cobbler and cheetah),as I want to avoid pushing my settings in the profile and creating a clone for each system I have to deploy.
I couldn't find a system-based variable set/deploy procedure in the API guide, but I might have missed that.
Best Regards, Strahil Nikolov
Hello Community,
I'm trying to setup a fully automated deployment with Uyuni and cobbler, but it seems that there is something wrong with my setup.
When I run 'uyuni:/etc/cobbler # cobbler system add --help' 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 745, in main rc = cli.run(sys.argv) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 358, in run self.object_command(object_type, object_action) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 428, in object_command network_interface_fields, settings, object_action) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 238, in add_options_from_fields _add_parser_option_from_field(parser, field, settings) File "/usr/lib/python3.6/site-packages/cobbler/cli.py", line 209, in _add_parser_option_from_field raise Exception("field %s default value (%s) is not listed in choices (%s)" % (name, default, str(choices))) Exception: field redhat_management_key default value (<<inherit>>) is not listed in choices (str)
I got a traceback that 'redhat_management_key' default value is not
As I have a separate NIC (separate VLAN) for the Uyuni's cobbler, I
wanted to be able to pass in kickstart/autoyast 's script the network settings (via system variables) before powering off the machine.
Then an automated process will change the VLAN (and PXE boot) of the client's NIC and will start it up. Once it's available, it will be bootstrapped and additional configuration can be done on the permanent address.
Also, it seems that bootstrapping RHEL 7 via cobbler is failing, so
On 03.12.19 08:50, Jochen Breuer wrote: per https://documentation.suse.com/external-tree/en-us/suma/4.0/pdf/suse_manager... -> page 30) and trying to schedule the deployment.The webUI doesn't detect my profiles and even after I create a new one - it still search for profile. Maybe that option is only for SUSE-based systems and autoyast ? listed in choices. My guess is that this should not happen,but my python skills are quite limited. that cannot be done during initial deployment. Most probably the 'spacewalk/redhat_register' snippet has an issue and cobbler is not expanding the it.
Thanks for reading such a long post and any help is appreciated,
maybe there is already a fix. If not - I can provide details in an issue.
Best Regards, Strahil Nikolov
Thanks Jochen, Thanks for the reply. I really appreciate that. As it was just 2 lines , I did it manually and it works. I'm hitting a cheetah issue and I have no clue how to debug. Cobbler logs are not very helpful to me ( lack of python knowledge). Any hint (docu link, blog, etc) will be greatly appreciated for debugging the root cause. My idea is to learn to debug this type of issues on my own. P.S.: Also, could you share your approach for finding that the issue was already resolved ? Using 'google' was not very helpful. Best Regards, Strahil Nikolov -- To unsubscribe, e-mail: uyuni-devel+unsubscribe@opensuse.org To contact the owner, e-mail: uyuni-devel+owner@opensuse.org
participants (2)
-
Jochen Breuer
-
Strahil Nikolov