User Input parameter with built-In parameter value is not correctly resolved during deployment execution
search cancel

User Input parameter with built-In parameter value is not correctly resolved during deployment execution

book

Article ID: 274786

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio)

Issue/Introduction

A User Input parameter set with value of a built-in parameter, is not correctly resolved during deployment execution.
 
 
Example :
 
- User Input parameter "Environment_Name" is created with value set to buil-in parameter <> Environment Name
 

- This parameter is used in a step defined in a template :

- A deployment plan and deployment are created from the template and during deployment execution, the User Input parameter value is not resolved.

<> Environment Name is resolved as {param:Environment Name} instead the correct name of environment.

Environment

Release Automation 6.7, 6.8

Cause

This problem occurs if the User Input parameter is updated in the template.
The update of the User Input Parameter creates a copy of the value with type STRING and replaces the default value of type PARAMETER.
 
Example :
In this template I have updated the parameter Environment_name 
I have removed a character }, save the change and add it again.
So nothing is really changed but a new value of type STRING is created in the database and replace the value of type PARAMETER
 
 

Resolution

1- Execute following SQL Query :

Replace {param:Environment Name} by the built-in parameter with problem.

 

MySQL

select rpvc.id as container_id, rpv.id as value_id
 from rc_server_types rst
 inner join rc_basic_modules bm          on bm.id = rst.module_id
 inner join rc_module_templates rtm      on rtm.id = bm.id
 inner join rc_env_module_templates remt on remt.id = bm.id    
 inner join rc_param_val_container rpvc  on rpvc.rc_server_type_id = rst.id
 inner join rc_param_values rpv          on rpv.id = rpvc.rc_value and substr(rpv.value_string,1,3999) = '{param:Environment Name}'
union all
select rpvc.id as container_id, rpv.id as value_id
 from rc_server_types rst
 inner join rc_basic_modules bm         on bm.id = rst.module_id
 inner join rc_module_templates rtm     on rtm.id = bm.id
 inner join rc_rc_module rrm            on rrm.id = bm.id    
 inner join rc_param_val_container rpvc on rpvc.rc_server_type_id = rst.id
 inner join rc_param_values rpv         on rpv.id = rpvc.rc_value and substr(rpv.value_string,1,3999) = '{param:Environment Name}' ;

 

Oracle

select rpvc.id as container_id, rpv.id as value_id
from rc_server_types rst
inner join rc_basic_modules bm on bm.id = rst.module_id
 inner join rc_module_templates rtm on rtm.id = bm.id
 inner join rc_env_module_templates remt on remt.id = bm.id    
 inner join rc_param_val_container rpvc on rpvc.rc_server_type_id = rst.id
 inner join rc_param_values rpv  on rpv.id = rpvc.rc_value and TO_CHAR(SUBSTR(rpv.value_string,0,3999)) = '{param:Environment Name}'
union all
select rpvc.id as container_id, rpv.id as value_id
from rc_server_types rst
 inner join rc_basic_modules bm on bm.id = rst.module_id
 inner join rc_module_templates rtm on rtm.id = bm.id
 inner join rc_rc_module rrm on rrm.id = bm.id    
 inner join rc_param_val_container rpvc on rpvc.rc_server_type_id = rst.id
 inner join rc_param_values rpv on rpv.id = rpvc.rc_value and TO_CHAR(SUBSTR (rpv.value_string,0,3999)) = '{param:Environment Name}'


Microsoft SQL Server

select rpvc.id as container_id, rpv.id as value_id
 from rc_server_types rst
 inner join rc_basic_modules bm          on bm.id = rst.module_id
 inner join rc_module_templates rtm      on rtm.id = bm.id
 inner join rc_env_module_templates remt on remt.id = bm.id    
 inner join rc_param_val_container rpvc  on rpvc.rc_server_type_id = rst.id
 inner join rc_param_values rpv          on rpv.id = rpvc.rc_value and substring(rpv.value_string,1,3999) = '{param:Environment Name}'
union all
select rpvc.id as container_id, rpv.id as value_id
 from rc_server_types rst
 inner join rc_basic_modules bm         on bm.id = rst.module_id
 inner join rc_module_templates rtm     on rtm.id = bm.id
 inner join rc_rc_module rrm            on rrm.id = bm.id    
 inner join rc_param_val_container rpvc on rpvc.rc_server_type_id = rst.id
 inner join rc_param_values rpv         on rpv.id = rpvc.rc_value and substring(rpv.value_string,1,3999) = '{param:Environment Name}' ;

 

This gives a list container ID and value ID which generate the problem.

Example

+--------------+----------+
| container_id | value_id |
+--------------+----------+
|        42312 |   100536 |
|        41453 |    99181 |
|        41485 |    99223 |
|        41624 |    99438 |
|        41772 |    99672 |
|        41908 |    99884 |
|        42189 |   100347 |
|        42326 |   100560 |
|        42488 |   100798 |
|        42618 |   101004 |
|        42754 |   101216 |
|        43168 |   101866 |
|        44031 |   103359 |
|        45012 |   104958 |
|        45605 |   105929 |
+--------------+----------+

 

From this list build 2 delete SQL Queries to delete the container and values :

delete from rc_param_val_container where id in (<container list ID>) ;
delete from rc_param_values where id in (<value list ID>) ;
 
 
Example based on example above :
 
delete from rc_param_val_container where id in (42312,41453,41485,41624,41772,41908,42189,42326,42488,42618,42754,43168,44031,45012,45605);
delete from rc_param_values where id in (100536,99181,99223,99438,99672,99884,100347,100560,100798,101004,101216,101866,103359,104958,105929);
 
 
2- Restart service on NAC