10000 pxe_just_once no longer working with 3.2.1 · Issue #2783 · cobbler/cobbler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pxe_just_once no longer working with 3.2.1 #2783

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
lucap22 opened this issue Sep 10, 2021 · 5 comments · Fixed by #2784
Closed

pxe_just_once no longer working with 3.2.1 #2783

lucap22 opened this issue Sep 10, 2021 · 5 comments · Fixed by #2784
Labels
3.2.1 Release 3.2.1 Bug Report Reporting a bug
Milestone

Comments

@lucap22
Copy link
lucap22 commented Sep 10, 2021

Describe the bug

I have upgraded cobbler from 3.2.0 to 3.2.1 and pxe_just_once option no longer working, after the installation completes successfully the "Netboot Enabled" is still set to "True", I have correcty migrate settings file to new file format with .yaml extension.
After some checks i found the issue in the autoinstall_done snippet where the pxe_just_once check are done with "true" lowercase while $pxe_just_once variable contains the string "True" with T in Uppercase.
I have applyed a workaround below reported.

cobbler system report  --name=xxx  | grep -i Netboo
Netboot Enabled                : True
/etc/cobbler/settings.yaml
pxe_just_once: true
cobbler system dumpvars --name=xxx
pxe_just_once: True

Workaround used:

/var/lib/cobbler/snippets/autoinstall_done
    #if $pxe_just_once in [ "1", "true", "yes", "y" ]    --> 
    #if $pxe_just_once in [ "1", "true", "yes", "y", "True" ]

Cobbler version

Cobbler 3.2.1

Operating system

CentOS Linux release 8.4.2105

Other

There are other checks done in this way that maybe it is worth checking:

./autoinstall_snippets/autoinstall_done:    #if $pxe_just_once in [ "1", "true", "yes", "y" ]
./autoinstall_snippets/autoinstall_done:    #if $run_install_triggers in [ "1", "true", "yes", "y" ]
./autoinstall_snippets/autoinstall_done:    #if $run_install_triggers in [ "1", "true", "yes", "y" ]
./autoinstall_snippets/autoinstall_start:    #if $run_install_triggers in [ "1", "true", "yes", "y" ]
./autoinstall_snippets/autoinstall_start:    #if $run_install_triggers in [ "1", "true", "yes", "y" ]

@lucap22 lucap22 added the Bug Report Reporting a bug label Sep 10, 2021
@SchoolGuy SchoolGuy added the 3.2.1 Release 3.2.1 label Sep 10, 2021
@SchoolGuy
Copy link
Member

@lucap22 Thanks for the report. Could you try if the following works too please?

#if $pxe_just_once

The reason I am asking is because this is a boolean and normally this should not be a str anymore. So be careful that the negative case is also working. In Python non empty strings are being evaluated as True, so "False" would also be True (mind the quotation marks I added to mark it as a str).

@lucap22
Copy link
Author
lucap22 commented Sep 10, 2021

Sure, let me try.

@lucap22
Copy link
Author
lucap22 commented Sep 10, 2021

Yes, it works

@SchoolGuy
Copy link
Member

I'll fix it today and open a PR and look through all other snippets as well.

@SchoolGuy
Copy link
Member

@lucap22 I created a PR and tried to fix as much as possible. Please leave a comment in the PR if it works or not if you have time to test this again.

@SchoolGuy SchoolGuy added this to the v3.3.0 milestone Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.1 Release 3.2.1 Bug Report Reporting a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0