Project

General

Profile

Actions

Bug #26

closed

Link to "pxe template" does not contian major and minor version number

Added by Oded Ben Ozer over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
TFTP
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When creating a new OS your are instructed(by the examples) to put OS major and minor version number in separate fields,but these values are not present in the links created in pxelinux.cfg directory,this prevents you from using different kernel and initrd for different OS versions(which is mandatory)

Actions #1

Updated by Ohad Levy over 14 years ago

I'm not sure I understand the problem, lets take for example CentOS 5.3
if your OS name is CentOS, major is 5 and minor is 3, and your host arch is 32bit, Foreman will create a link to:CentOS-5.3-i386.

Actions #2

Updated by Moty Lavi over 14 years ago

You can see at /app/models/host.rb line 243:

GW::Tftp.create([mac, os.to_s.gsub(" ","-"), arch.name, serial])

that link is created as mac-->os_name.arch_name .
In my test OS did not include what I entered in the major & minor version fields when I've created the os object.

Another thing is that after adding an OS with major and minor numbers you can not edit them (major,minor) again

Moty

Actions #3

Updated by Ohad Levy over 14 years ago

Moty Lavi wrote:

You can see at /app/models/host.rb line 243:

GW::Tftp.create([mac, os.to_s.gsub(" ","-"), arch.name, serial])

that link is created as mac-->os_name.arch_name .
In my test OS did not include what I entered in the major & minor version fields when I've created the os object.

have a look inside the os.to_s:

"#{name} #{major}#{('.' + minor) unless minor.empty?}" 

that would not add the minor if it doesn't exists..

Another thing is that after adding an OS with major and minor numbers you can not edit them (major,minor) again

yeah, that's correct, I guess that I've missed that. can you create another ticket for that?

Actions #4

Updated by Moty Lavi over 14 years ago

In "settings-->operating systems-->create new" I had the following fields filled:

Name: RedHat Enterprise Linux
Architectures: i386
major: 5
minor: 3

I added output to log of major and minor before:
"#{name} #{major}#{('.' + minor) unless minor.empty?}"

And I get
major=RedHat
minor is empty

Actions #5

Updated by Ohad Levy over 14 years ago

  • Category set to TFTP
  • Status changed from New to Assigned
  • Assignee set to Ohad Levy
  • Target version set to 0.1-2

Moty Lavi wrote:

In "settings-->operating systems-->create new" I had the following fields filled:

Name: RedHat Enterprise Linux
Architectures: i386
major: 5
minor: 3

I added output to log of major and minor before:
"#{name} #{major}#{('.' + minor) unless minor.empty?}"

And I get
major=RedHat
minor is empty

You are correct: in the console:

Operatingsystem.last.to_s

=> "RedHat Enterprise Linux"

Operatingsystem.last.to_label

=> "RedHat Enterprise Linux 5.3"

it seems that my to_s method doesn't override the string.to_s method, I'll fix that.

Actions #6

Updated by Ohad Levy over 14 years ago

  • Status changed from Assigned to Ready For Testing
  • % Done changed from 0 to 100
Actions #7

Updated by Moty Lavi over 14 years ago

pxe links are created with major and minor numbers !

gr8

Actions #8

Updated by Ohad Levy over 14 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF