Bug 788996 - Only first referenced parameter get value
Summary: Only first referenced parameter get value
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-configserver
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
Assignee: Greg Blomquist
QA Contact: dgao
Depends On:
TreeView+ depends on / blocked
Reported: 2012-02-09 14:39 UTC by Steve Reichard
Modified: 2012-08-30 17:15 UTC (History)
4 users (show)

Clone Of:
Last Closed: 2012-08-30 17:15:13 UTC

Attachments (Terms of Use)
CS logs (10.04 KB, application/x-gzip)
2012-02-09 14:39 UTC, Steve Reichard
no flags Details

Description Steve Reichard 2012-02-09 14:39:20 UTC
Created attachment 560605 [details]
CS logs

Description of problem:

I did a little test case of parameter returns and ran into an issuu.  Here is some related mail:


Looking in the cfg srv log, seems like the xml for second parameter is mal-formed, thus not being matched:

<required-parameter service="print_vars" name="ri_ip" assembly="f6e7cf00-5325-11e1-93de-001a64760006" parameter="ipaddress"/>
 name='ri_hostname' assembly='f6e7cf00-5325-11e1-93de-001a64760006' parameter='hostname'/&gt;

On 02/08/2012 07:00 PM, Steve Reichard wrote:
> So I don't know if I am doing something wrong or not, but I've included the deployable/blueprint that I used below.
> The issue that I see is that only the first parameter in the service "print_vars" is getting defined.   In the current config, only the ipaddress is echo'd.  If I swap the order of the parameter in this service, then only hostname is matched.   Looking at the log on the config server I can see where both are being returned but only one is being matched.   Is this me or a bug?
> thanks,
> spr
> <?xml version="1.0"?>
> <deployable version="1.0" name="multi">
> <description/>
> <assemblies>
> <assembly name="script_inst" hwp="hwp1">
> <image id="125643c8-526a-11e1-93de-001a64760006"/>
> <services>
> <service name="print_vars">
> <executable>
> <contents><![CDATA[#!/bin/bash -x
> echo "Return instance hostname : $AUDREY_VAR_print_vars_ri_hostname" | tee variableValues
> echo "Return instance ip : $AUDREY_VAR_print_vars_ri_ip" | tee -a variableValues
> printenv | grep AUDREY | tee -a variableValues
>             ]]></contents>
> </executable>
> <parameters>
> <parameter name="ri_ip" type="scalar">
> <reference assembly="return_inst" parameter="ipaddress"/>
> </parameter>
> <parameter name="ri_hostname" type="scalar">
> <reference assembly="return_inst" parameter="hostname"/>
> </parameter>
> </parameters>
> </service>
> </services>
> </assembly>
> <assembly name="return_inst" hwp="hwp1">
> <image id="125643c8-526a-11e1-93de-001a64760006"/>
> <returns>
> <return name="ipaddress"/>
> <return name="hostname"/>
> </returns>
> </assembly>
> </assemblies>
> </deployable>

I'll attach the complete config server logs.

Version-Release number of selected component (if applicable):

[root@dhcp-149 log]# tar czvf /tmp/cs.tgz aeolus-configserver
[root@dhcp-149 log]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.2 (Santiago)
[root@dhcp-149 log]# uname -a
Linux dhcp-149.cloud.lab.eng.bos.redhat.com 2.6.32-220.4.1.el6.x86_64 #1 SMP Thu Jan 19 14:50:54 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@dhcp-149 log]# yum list install | grep aeolus
Error: No matching Packages to list
[root@dhcp-149 log]# yum list installed | grep aeolus
aeolus-audrey-agent.noarch          0.4.3-1.el6                        @latest  
aeolus-configserver.noarch          0.4.5-2.el6                        @latest  
[root@dhcp-149 log]# 

How reproducible:

While I have only used the same config server,  I have launched several deployables and changed order of the parameters, each with the same issue.

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 1 Greg Blomquist 2012-02-09 15:34:59 UTC
Added cloudforms 1.0? flag.

Comment 2 Greg Blomquist 2012-02-09 20:19:10 UTC
Fix: https://github.com/aeolusproject/audrey/commit/5c7e84ef7ef3b70763d7f19641d5c10184c863e7

Version bump: https://github.com/aeolusproject/audrey/commit/4fdc67fde5bb07c56e2a63584acad492305b6ebb

The config server was munging the XML for the required parameters when writing out the "required-parameters.xml" on instance creation.  This patch fixes the required-parameters.xml.

Comment 4 dgao 2012-02-27 21:07:47 UTC
Fixed in aeolus-configserver-0.4.6-0.el6.noarch

Verification test was ran using the deployable.xml in comment #1

[root@ip-10-34-250-11 ~]# cat /var/log/audrey.log 
2012-02-27 16:05:33,756 - INFO    : audrey:1293 Invoked audrey_script_main
2012-02-27 16:05:33,966 - INFO    : audrey:1321 
<Instance of: CSClient
	Version: 1
	Config Server Endpoint: https://ec2-107-22-91-192.compute-1.amazonaws.com
	Config Server oAuth Key: 9e065f40-6186-11e1-b161-001e4fb5bf1d
	Config Server oAuth Secret: 5zz9gunPkrHouRvr1Kgc3dw86ETokxXbKybSiCCmTbXtjJ
	Config Server Params: 
	Config Server Configs: 
	Temporary Directory: 
	Tarball Name: 
2012-02-27 16:05:33,967 - INFO    : audrey:944 Invoked CSClient.get_cs_tooling()
2012-02-27 16:05:34,046 - INFO    : audrey:682 Invoked unpack_tooling()
2012-02-27 16:05:34,051 - INFO    : audrey:901 Invoked CSClient.get_cs_configs()
2012-02-27 16:05:34,110 - INFO    : audrey:612 Execute Tooling command: /var/audrey/tooling/user/print_vars/start
2012-02-27 16:05:34,111 - INFO    : audrey:612 return code: 0
2012-02-27 16:05:34,111 - INFO    : audrey:612 
	Start Output of: /var/audrey/tooling/user/print_vars/start >>>
Return instance hostname : ip-10-194-131-130
Return instance ip :

	<<< End Output
2012-02-27 16:05:34,111 - INFO    : audrey:916 Invoked CSClient.get_cs_params()
2012-02-27 16:05:34,136 - INFO    : audrey:520 Invoked generate_provides()
2012-02-27 16:05:35,864 - INFO    : audrey:931 Invoked CSClient.put_cs_params_values()

Note You need to log in before you can comment on or make changes to this bug.