Project

General

Profile

Actions

Bug #7480

closed

Unable to use cloned PXELinux global default template with 6.0.4

Added by Bryan Kearney over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Target version:
Difficulty:
medium
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1142160
Since "PXELinux global default" template is locked and the name is hardcoded in Foreman codebase, there is no way to use Foreman Discovery since we can't configure initial boot.

Workaround: Unlock the locked template and edit it.

  1. foreman-rake console

ct = ConfigTemplate.find_by_name("PXELinux global default"); ct.locked = false; ct.save!
exit


Related issues 1 (0 open1 closed)

Blocked by Foreman - Feature #8477: Improve usability of config template locking/defaultsClosedStephen Benjamin11/21/2014Actions
Actions #1

Updated by Dominic Cleal over 9 years ago

  • Project changed from Foreman to Katello
  • Category set to 83
  • Triaged set to No

Katello should not be locking core Foreman templates: https://github.com/Katello/katello/blob/katello-2.0.0-0/db/seeds.rb#L39-L44

Actions #2

Updated by Lukas Zapletal over 9 years ago

Anyway I'd like to implement possibility to change hardcoded template names in Settings. I wish I remember how to change issue subject in RedMine :-(

Actions #3

Updated by Dominic Cleal over 9 years ago

Lukas Zapletal wrote:

Anyway I'd like to implement possibility to change hardcoded template names in Settings.

#7484 covers the subnet bit, you could file another ticket for that if you wish.

I wish I remember how to change issue subject in RedMine :-(

Click Edit, click pencil icon next to Description.

Please keep this one to fix the locking of Foreman's templates.

Actions #4

Updated by Stephen Benjamin over 9 years ago

Katello should not be locking core Foreman templates: https://github.com/Katello/katello/blob/katello-2.0.0-0/db/seeds.rb#L39-L44

I disagree. Foreman should be locking core templates, so that you can update them at will, but you're stuck due to precedence.

In a multi-org and multi-loc setup, having the core templates editable is just totally broken.

Actions #5

Updated by Stephen Benjamin over 9 years ago

Just some more background, I originally tried the permissions model, but you may have a user who should be able to change associations (requiring 'edit' permission) but not the template content.

Fire up Katello and try to imagine managing a multi-org setup with users with varying levels of permissions, with the default templates unlocked. You're opening yourself up to pure chaos when a user in Org A with no permissions to Org B are able to change a template they rely on. The core templates need to be locked for Katello to work sensibly.

I'm open to a suggestion that could fix this, and perfectly happy if you can find one in Foreman itself.

Actions #6

Updated by Stephen Benjamin over 9 years ago

(Although the issue at hand is fixed by not hard coding template names in the code, and the Katello locked templates issue should be done elsewhere, feel free to file an issue about it)

Actions #7

Updated by Eric Helms over 9 years ago

  • Difficulty set to medium
  • Triaged changed from No to Yes
Actions #8

Updated by Justin Sherrill over 9 years ago

To work around this for 2.0:

echo ConfigTemplate.find_by_name('PXELinux global default').update_attribute(:locked, false) | foreman-rake console

This allows the user to unlock the template. I believe the longer term solution is to make this not hardcoded in foreman.

Actions #9

Updated by Stephen Benjamin over 9 years ago

  • Blocked by Feature #8477: Improve usability of config template locking/defaults added
Actions #10

Updated by The Foreman Bot over 9 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 61
  • Pull request https://github.com/Katello/katello/pull/4829 added
  • Pull request deleted ()
Actions #11

Updated by Stephen Benjamin over 9 years ago

  • Assignee set to Stephen Benjamin
Actions #12

Updated by Eric Helms over 9 years ago

  • Target version changed from 61 to 62
Actions #13

Updated by Anonymous over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #14

Updated by Eric Helms about 9 years ago

  • translation missing: en.field_release set to 23
Actions

Also available in: Atom PDF