VMware Cloud Community
TonyK23
Contributor
Contributor

Error when selecting Script Action in Property Definitions in vRA 7.1

Hi all,

I am trying to setup Blueprint Dropdown relationship in vRA 7.1.  I have the actions already created in vRO.  Now when I select Script Action within Property Definitions, I get "Invalid argument" error (please see attached).  This is a newly built small vRA 7.1 environment with embedded vRO. I can create XaaS Blueprints so connecting to vRO is not an issue.  I am not sure why the "Script Action" is unable to connect to vRO Actions?  I went through the vRo logs and I really don't see anything meaningful there.

Can someone please help?

Thanks a lot,

Tony

12 Replies
iiliev
VMware Employee
VMware Employee

Hi,

I cannot reproduce this in my 7.1 environment, but I have a hypotheses why it could happen.

When you click 'Select...' button to choose a script action, vRA tries to build a tree view with vRO actions whose return type is compatible with property definition's data type. At the moment, vRO does not provide a REST API to retrieve all these actions with a single API call, so vRA has to made multiple REST API calls to vRO (tens, maybe even hundreds of calls). Depending on the environment/network/other factors, these calls could take a long time, possibly reaching some timeout.

I've yet to confirm with vRA guys if this is a feasible explanation, or is the error caused by something completely different.

BTW, do you get this "Invalid argument" error immediately after you click 'Select...' button, or after some noticeable delay (let's say half a minute or more)?

TonyK23
Contributor
Contributor

Hi @Ilian Iliev

Good points.  No, the error message doesn't appear immediately.  It takes about 30 seconds or so for it to fail.  After the error, if I click the "select" option again, a blank window appears.

I am thinking perhaps deploying an external vRO, but unsure if the result will be any different as vRA REST calls to vRO will be the same?

Could this be a vRA bug?

Thanks for replying back to my post.  Much appreciated.

0 Kudos
iiliev
VMware Employee
VMware Employee

The vRA guys I spoke with agreed this could be caused by some timeout, but that it's difficult to further troubleshoot it without vRA/vRO logs. So the recommended approach is to collect vRA & vRO log bundles, and to work with your VMware point of contact to open a vRA bug/support request.

As for deploying an external vRO - it won't hurt to try. Functionality-wise, embedded and external vRO are equivalent, so they should behave pretty much the same, unless the slowness of embedded vRO is caused by insufficient system resources,

TuukkaK
Enthusiast
Enthusiast

Hi,

I have the same problem. In the vRA log file there are multiple entries like this:

2016-10-21 10:53:05,932 vcac: [component="cafe:o11n-gateway" priority="INFO" thread="tomcat-http--20" tenant="XXXXX" context="u1OIhILv" token="AVievDIz"] com.vmware.vcac.o11n.gateway.vco.VcoTypeMapperFactory.resolveTypeMapper:104 - Cannot find any data type to map for [Any], using string

Seems that vra tries to find vRO script actions with the return type of Any, but is unsuccessful. This works fine with the XaaS inputs, but not with Property Definitions.


-Tuukka

0 Kudos
JacquesNeocles
Enthusiast
Enthusiast

Hello,

Return values MUST BE type of "Array/String"

Any other things like "Any" will not works.

Eventually you can define this by script which will return Array/String value. So do that you will have to create a new workflow into vRO

pastedImage_5.png

After that you can retrive them into vRA custom proterties

pastedImage_6.png

Hope this helps.

Regards,

Jacques

0 Kudos
TuukkaK
Enthusiast
Enthusiast

Thanks for the reply! My return value is correct, but the problen is that I don't even get a list of the script actions. I am using an external vRO. Is your vRO external o internal?

See picture....

Something is wrong with the REST call to vRO:

2016-11-04 09:59:08,346 vcac: [component="cafe:advanced-designer" priority="ERROR" thread="tomcat-http--35" tenant="xxx" context="K0rJckr9" token="K0rJckr9"] com.vmware.vcac.platform.rest.client.error.Respons

eErrorHandler.handleRestError:113 - [Rest Error]: {Status code: 400}, {Error code: 10101} , {Error Source: null}, {Error Msg: Invalid argument.}, {System Msg: cannot make uri using part inventory/System/Actions/co

m.vmware.library.vCloud.Admin.Extension.VIM Server/}

2016-11-04 09:59:08,347 vcac: [component="cafe:advanced-designer" priority="ERROR" thread="tomcat-http--35" tenant="xxx" context="K0rJckr9" token="K0rJckr9"] com.vmware.vcac.platform.service.rest.resolver.App

licationExceptionHandler.handleRestException:610 - [Rest Error]: {Status code: 400}, {Error code: 10101} , {Error Source: null}, {Error Msg: Invalid argument.}, {System Msg: cannot make uri using part inventory/Sy

stem/Actions/com.vmware.library.vCloud.Admin.Extension.VIM Server/}

2016-11-04 09:59:08,726 vcac: [component="cafe:shell" priority="ERROR" thread="tomcat-http--44" tenant="xxx" context="h6iPFN7L" token="h6iPFN7L"] properties-service:extensibility.logToApacheCommons:59 - <8cdd

58f5> undefined

2016-11-04 09:59:09,041 vcac: [component="cafe:advanced-designer" priority="ERROR" thread="tomcat-http--1" tenant="xxx" context="XsYQnAS5" token="XsYQnAS5"] com.vmware.vcac.platform.rest.client.error.Response

ErrorHandler.handleRestError:113 - [Rest Error]: {Status code: 400}, {Error code: 10101} , {Error Source: null}, {Error Msg: Invalid argument.}, {System Msg: cannot make uri using part inventory/System/Actions/com

.vmware.library.vCloud.vApp Template/}

2016-11-04 09:59:09,042 vcac: [component="cafe:advanced-designer" priority="ERROR" thread="tomcat-http--1" tenant="xxx" context="XsYQnAS5" token="XsYQnAS5"] com.vmware.vcac.platform.service.rest.resolver.Appl

icationExceptionHandler.handleRestException:610 - [Rest Error]: {Status code: 400}, {Error code: 10101} , {Error Source: null}, {Error Msg: Invalid argument.}, {System Msg: cannot make uri using part inventory/Sys

tem/Actions/com.vmware.library.vCloud.vApp Template/}

2016-11-04 09:59:09,964 vcac: [component="cafe:o11n-gateway" priority="INFO" thread="tomcat-http--9" tenant="xxx" context="zbb6e8bY" token="3LMHeUB3"] com.vmware.vcac.o11n.gateway.vco.VcoTypeMapperFactory.res

olveTypeMapper:104 - Cannot find any data type to map for [Path], using string

vra.png

0 Kudos
JacquesNeocles
Enthusiast
Enthusiast

Hello,

 

My vRO is the internal one as I don't have multiple tenants on this implementation.

Can't test right now with external one, but on other project I have to delete the link between External vRO and create-it again to make the whole things work.

Did you try to create Service blueprint? Doing so, you will contact vRO server. If you're stuck with the "Circle of Doom" that means that the communication between the vRA and vRO server is not correct. (Even if the test into vRO connector said the opposite!)

Can't say if it's the right path to look into.

0 Kudos
JacquesNeocles
Enthusiast
Enthusiast

Anyway I repeat.

XaaS bluprint can return whatever you want. (Array/String, Any, Properties, ...)

Custom properties NOT. Custom properties MUST return Array/String values since 7.1 (works in 7.0.1 but not in 7.1)

Regards,

0 Kudos
TuukkaK
Enthusiast
Enthusiast

Hi all,

I did some testing and everything works when I log in to my default tenant that is using the embedded vRO. If I change to external vRO it doesn't work.

EDIT: Did some more testing and my other external vRO works fine. The only diffrence is that the vRO that does not work has vCloud Director and F5 Plugins installed and I try to browse the actions I find these entries in the vra log file:

2016-11-04 13:56:24,862 vcac: [component="cafe:advanced-designer" priority="ERROR" thread="tomcat-http--27" tenant="santalab" context="j7sictki" token="j7sictki"] com.vmware.vcac.platform.rest.client.error.ResponseErrorHandler.handleRestError:113 - [Rest Error]: {Status code: 400}, {Error code: 10101} , {Error Source: null}, {Error Msg: Invalid argument.}, {System Msg: cannot make uri using part inventory/System/Actions/com.vmware.library.vCloud.Admin.Extension.VIM Server/}

2016-11-04 13:56:24,863 vcac: [component="cafe:advanced-designer" priority="ERROR" thread="tomcat-http--27" tenant="santalab" context="j7sictki" token="j7sictki"] com.vmware.vcac.platform.service.rest.resolver.ApplicationExceptionHandler.handleRestException:610 - [Rest Error]: {Status code: 400}, {Error code: 10101} , {Error Source: null}, {Error Msg: Invalid argument.}, {System Msg: cannot make uri using part inventory/System/Actions/com.vmware.library.vCloud.Admin.Extension.VIM Server/}

2016-11-04 13:56:25,372 vcac: [component="cafe:advanced-designer" priority="ERROR" thread="tomcat-http--47" tenant="santalab" context="HNfPlgev" token="HNfPlgev"] com.vmware.vcac.platform.rest.client.error.ResponseErrorHandler.handleRestError:113 - [Rest Error]: {Status code: 400}, {Error code: 10101} , {Error Source: null}, {Error Msg: Invalid argument.}, {System Msg: cannot make uri using part inventory/System/Actions/com.vmware.library.vCloud.vApp Template/}

2016-11-04 13:56:25,372 vcac: [component="cafe:advanced-designer" priority="ERROR" thread="tomcat-http--47" tenant="santalab" context="HNfPlgev" token="HNfPlgev"] com.vmware.vcac.platform.service.rest.resolver.ApplicationExceptionHandler.handleRestException:610 - [Rest Error]: {Status code: 400}, {Error code: 10101} , {Error Source: null}, {Error Msg: Invalid argument.}, {System Msg: cannot make uri using part inventory/System/Actions/com.vmware.library.vCloud.vApp Template/}

Could be the vCloud Director plugin, not sure yet...

-Tuukka

0 Kudos
iiliev
VMware Employee
VMware Employee

Hi,

It seems that this part of vRA code does not handle properly the space characters (in your log samples, see 'VIM Server' and 'vApp Template'), hence you got these exceptions 'cannot make uri...'. The space (and other special characters) need to be escaped/encoded when used in URLs.

Looks like a bug in vRA to me. I'll open a PR to track it.

TuukkaK
Enthusiast
Enthusiast

IT WORKS!

I renamed all the vCloud Director action folders with 'spaces' to ones with no spaces and that fixed my problem. I think this will break something in the vCloud Director Plugin. So either the VCD plugin should be fixed not to have spaces or vRA should be fixed to handle the spaces...

Thank you Ilian Iliev!

-Tuukka

0 Kudos
drummoau
Enthusiast
Enthusiast

It will definitely break the plugin as all the references will be pointing at the old module names.

0 Kudos