Bug #21172
closedUnknown Variables in partition tables <%= @osver %>
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1459290
Description of problem: After provisioning a Host when Partition table template is unlocked and a kickstart specific variable @osver is used instead of @host.operatingsystem.major variable the @osver variable is not able to process causing the statements of a particular block of code.
According to the "Host configuration Guide in the 'A.3. Satellite Specific Functions and Variables - Table A.4. Kickstart Specific Variables' the table state that @osver is the same as @host.operatingsystem.major.
==================================================================
@osver The operating system major version number, same as @host.operatingsystem.major.
==================================================================
Version-Release number of selected component (if applicable): satellite-6.2.9-7
How reproducible: 100%
Steps to Reproduce:
1. Go to the "Hosts" - "Partition Tables" - select the "clone" - unlock for the specific Template.
2. Access the template by click it and add the following block of code:
<% if @host.operatingsystem.major.to_i 6 ->
modprobe -r qla2xxx
modprobe -r lpfc
partprobe
< end -%>
3. Go back to the preview page of the partition template opened before and refresh the page. the 3 lines should be printed there.
4. Now go back to the Partition tables edition page and change the variable @host.operatingsystem to @osver.to_i
<% if @osver.to_i 6 ->
modprobe -r qla2xxx
modprobe -r lpfc
partprobe
< end -%>
5. Go back to the preview page and refresh. Now you none of the lines were executed.
6. Change the @osver.to_i to @osver
<% if @osver 6 ->
modprobe -r qla2xxx
modprobe -r lpfc
partprobe
< end -%>
7. Go back to the preview page and refresh. Now you none of the lines were executed.
Actual results:
The block of code defined between the <% if @osver 6 -> and < end -> and < if @osver.to_i == 6 -> and < end -%> are not being evaluated.
Expected results:
both variables @host.operatingsystem.major and @osver should be processed successful.