Bug #25350
openHostgroup parameters are not overridden when using Image based Provisioning Method after upgrade to 1.18.2
Description
After upgrade to 1.18.2 hostgroup parameters are not overridden when using Image based Provisioning Method. It's working correctly for Network Based Provisioning Method.
Env:
Version 1.18.2
ovirt computer resource: RHEVM 4.2.6.4-0.1
Repro steps:
1 - create new host
2 - pick hostgroup
3 - choose Imaged Based provisioning method
4 - override some parameter (in this case cumulative_patch_url_pre_install was set to true, default value is false)
5 - submit
<% if host_param("cumulative_patch_url_pre_install") -%>
- this patch will be applied on not yet installed JON server
export CUMULATIVE_PATCH_PRE_INSTALL=<%=host_param("cumulative_patch_url_pre_install")-%>
<% end -%>
Result:
A default value is used for the parameter which should have been overridden.
It's visible in logs that cumulative_patch_url_pre_install should be overridden:
2018-10-31T07:26:31 [I|app|ede89] Parameters: {"utf8"=>"✓", "authenticity_token"=>"PRiwewC5bkXrlW5U76uFXYDk9ik292wDLR95UI31g0PBo+fDqU2YizcGrxyIj+81i/eEAbAl76OORIq9J5sewQ==", "host"=>{"name"=>"fbr-test2", "hostgroup_id"=>"59", "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"fbr-test2", "domain_id"=>"2", "subnet_id"=>"1", "ip"=>"10.16.23.203", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"name"=>"em1", "network"=>"00000000-0000-0000-0000-000000000009"}}}, "compute_attributes"=>{"cluster"=>"9895b86e-04d1-4c74-9d85-69f696088af3", "instance_type"=>"", "cores"=>"4", "sockets"=>"1", "memory"=>"4294967296", "start"=>"1", "image_id"=>"c5d6ca8f-c362-4a0b-848b-12801bea0531"}, "architecture_id"=>"1", "operatingsystem_id"=>"17", "provision_method"=>"image", "build"=>"1", "medium_id"=>"", "ptable_id"=>"", "pxe_loader"=>"PXELinux BIOS", "disk"=>"", "root_pass"=>"[FILTERED]", "host_parameters_attributes"=>{"1540985186262"=>{"name"=>"cumulative_patch_url_pre_install", "value"=>"[FILTERED]", "hidden_value"=>"[FILTERED]", "_destroy"=>"false"}}, "is_owned_by"=>"4-Users", "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}}
But later when rendering the template - Unattended render of 'jon_shellscripts' = '2b4424ea43ddd8322de3375bbe514617a3d6bedbcbaee20a9482aa80afc210f8' the default value is used: | # this patch will be applied on not yet installed JON server | export CUMULATIVE_PATCH_PRE_INSTALL=false
What is confusing is that UI shows that the value was correctly overridden which is not true (the env variable on created VM was set to false), UI->Host->Templates->Finish Template->Review:- this patch will be applied on not yet installed JON server
export CUMULATIVE_PATCH_PRE_INSTALL=true
Full production log attached
Files