Bug #26
closedLink to "pxe template" does not contian major and minor version number
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)
Updated by Ohad Levy about 15 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.
Updated by Moty Lavi about 15 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
Updated by Ohad Levy about 15 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?
Updated by Moty Lavi about 15 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
Updated by Ohad Levy about 15 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: 3I 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.
Updated by Ohad Levy about 15 years ago
- Status changed from Assigned to Ready For Testing
- % Done changed from 0 to 100
Applied in changeset 290c4d84681e2e37867af7273848764e6a57c0d3.
Updated by Moty Lavi about 15 years ago
pxe links are created with major and minor numbers !
gr8
Updated by Ohad Levy about 15 years ago
- Status changed from Ready For Testing to Closed