Project

General

Profile

Actions

Bug #26170

closed

Undefined method `pxedir’ for #<Windows:xxxxxxxxxxxxx> when rendering a Windows PXELinux template (wimboot)

Added by Fredrik Dahlberg about 5 years ago. Updated about 5 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

When trying to create a new Windows host I get the following error regardless of what I write in my PXELinux template.

Error Message:

Unable to render PXELinux template ‘1-Windows PXELinux’: undefined method pxedir' for #<Windows:0x00007ff4aea838b0> Fetch TFTP boot files for test02.lab.lan task failed with the following error: undefined methodpxedir’ for #Windows:0x00007ff4aea838b0

Simplified PXELinux test template:

<%#
kind: PXELinux
name: 1-Windows PXELinux
oses:
- Windows Server 2008
- Windows Server 2008 R2
- Windows Server 2012
- Windows Server 2012 R2
- Windows Server 2016
- Windows
%>
DEFAULT menu    
LABEL menu         
     COM32 linux.c32 boot/wimboot

Support discussion on forum where tbrisker thinks it's a bug and shares a change that fixes the problem
https://community.theforeman.org/t/undefined-method-pxedir-for-windows-xxxxxxxxxxxxx/13017/7?u=fdaa

Fix
Change the following line in /usr/share/foreman/app/services/medium_providers/default.rb
From:

digest = Base64.urlsafe_encode64(Digest::SHA1.digest(medium_uri(entity.operatingsystem.pxedir).to_s), padding: false)

To:
digest = Base64.urlsafe_encode64(Digest::SHA1.digest(medium_uri(entity.operatingsystem.try(:pxedir)).to_s), padding: false)


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #26154: NoMethodError: undefined method `pxedir' for #<Windows:0x0000000007298338>ClosedTomer BriskerActions
Actions #1

Updated by Tomer Brisker about 5 years ago

  • Is duplicate of Bug #26154: NoMethodError: undefined method `pxedir' for #<Windows:0x0000000007298338> added
Actions #2

Updated by Tomer Brisker about 5 years ago

  • Status changed from New to Duplicate
Actions

Also available in: Atom PDF