Project

General

Profile

Bug #2792

If you delete "PXE Localboot Default" cancel build fails

Added by Florian Rosenegger almost 10 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Hello,

i deleted the Provisioning template "PXE Localboot Default" and after that it was no longer possible to cancel a build for a host.

The error i got was:
Failed to save: Failed to generate PXELinux template: undefined method `template' for nil:NilClass

Via finish.sh script i also tried to call https://foreman/unattended/built but i only got a 409.

So maybe it would be good to make the Template undeleteable.

Thanks,
Florian


Related issues

Related to Foreman - Feature #3103: Read only provisioning/config templates for pluginsClosed2013-09-17
Related to Foreman - Feature #7484: Per-subnet PXELinux global default filesNew2014-09-17
Has duplicate Foreman - Bug #2215: When PXE Localboot Default is deleted, causes nil error when cancelling buildDuplicate2013-02-17
Has duplicate Foreman - Bug #4008: Disable 'build mode' unsuccessfulDuplicate2014-01-14

Associated revisions

Revision 061e34f2 (diff)
Added by Lukas Zapletal over 9 years ago

refs #2792 - Adding comments to pxe templates

Revision c40a0f07 (diff)
Added by Lukas Zapletal over 9 years ago

refs #2792 - Adding comments to pxe templates

(cherry picked from commit 061e34f25131647fe6af0654cdbd492eb64ad402)

History

#1 Updated by Greg Sutcliffe almost 10 years ago

As we don't have an "undeleteable" feature for templates, I'm not sure this is a strong enough use case to implement one. It could be sensible to have some internal string which could be used if the template is not found, though. Any objections?

#2 Updated by Lukas Zapletal almost 10 years ago

  • Category set to Templates
  • Target version set to 1.3.0

Can't we just implement ON DELETE ERROR instead default ON DELETE NULL for this one?

#3 Updated by Greg Sutcliffe almost 10 years ago

We could, yes. I'm happy with either approach, tbh.

#4 Updated by Florian Rosenegger almost 10 years ago

Hello again,

i would also be happy if Foreman would just post a message that it is missing this special template (maybe with a hint to create one with the default name..)

My problem was that i just couldn't cancel the build but there was none whatsoever reason why (even in the log) and without Ohad and the IRC i wouldn't had a single idea what the error means.

The undeleteable feature for important templates was just one idea, but maybe/definitely not the best.

#5 Updated by Lukas Zapletal over 9 years ago

  • Description updated (diff)
  • Target version deleted (1.3.0)

#6 Updated by Dominic Cleal over 9 years ago

  • Has duplicate Bug #2215: When PXE Localboot Default is deleted, causes nil error when cancelling build added

#7 Updated by Dominic Cleal over 9 years ago

  • Related to Feature #3103: Read only provisioning/config templates for plugins added

#8 Updated by Lukas Zapletal over 9 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Lukas Zapletal
  • Target version set to 1.15.0
  • Legacy Backlogs Release (now unused) set to 1
  • Difficulty set to trivial

At least, I am adding comment to the templates.

https://github.com/theforeman/foreman/pull/977

#9 Updated by Dominic Cleal over 9 years ago

  • Status changed from Ready For Testing to New
  • Assignee deleted (Lukas Zapletal)
  • Target version deleted (1.15.0)
  • Legacy Backlogs Release (now unused) deleted (1)
  • Difficulty deleted (trivial)

Sorry, I'm going to reset this as I don't think this is a final solution to the issue, helpful though it is. Thanks Lukas.

#10 Updated by Dominic Cleal over 9 years ago

  • Has duplicate Bug #4008: Disable 'build mode' unsuccessful added

#11 Updated by Dominic Cleal over 8 years ago

  • Related to Feature #7484: Per-subnet PXELinux global default files added

Also available in: Atom PDF