Bug #7480
closed
Unable to use cloned PXELinux global default template with 6.0.4
Added by Bryan Kearney over 10 years ago.
Updated over 6 years ago.
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.
- foreman-rake console
ct = ConfigTemplate.find_by_name("PXELinux global default"); ct.locked = false; ct.save!
exit
- Project changed from Foreman to Katello
- Category set to 83
- Triaged set to No
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 :-(
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.
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.
(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)
- Difficulty set to medium
- Triaged changed from No to Yes
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.
- Blocked by Feature #8477: Improve usability of config template locking/defaults added
- 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 (
)
- Assignee set to Stephen Benjamin
- Target version changed from 61 to 62
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Translation missing: en.field_release set to 23
Also available in: Atom
PDF