Sub Connections and Variable Support

Sub Connections and Variable Support

avatar

Version: 8.0.18.0 Enterprise

Background:

We are working hard on making solid templates with sub-connections for all of our common devices/nodes we support. We want to minimize data entry and have as much of the system configured through convention (naming conventions and DNS hostnames) and well defined templates.
Our structure looks like this

Customer (Group: Customer Type)
>Site1 (Group: Site Type)
>> Virtual Machines (Group: Group/Folder Type)
>>> VM1 (Session: "Host" Type) <-- We enter these using "Templates" and have all the subconnections below already setup
>>>> RDP (Subconnection Session: RDP Type)
>>>> WebGUI (Subconnection Session: Web/HTTP)
>>>> VMWare Remote Consoel (Subconnection Session: VMWare Remote Console)

We are running into trouble accessing most hierarichal variables, for examples: $SITE_CUSTOM_FIELD1$, $CUSTOMER_CUSTOM_FIELD1$ from any sub-connection entries.

We have narrowed it down to sub conneciton entries by making a simple "Command" session type that simply calls a parrot.cmd script in C:\windows\system32 that simply parrots back anything passed on the command line. We then put in the command line in RDM for the "Command" session something like:

parrot.cmd $HOST$ $SITE_CUSTOM_FIELD1$ $CUSTOMER_CUSTOM_FIELD1$

We can do this at various levels in the tree above and it behaves as expected, when anywhere (other than a sub-connection) under Customer>Site1 both the custom fields are replaced with the values we have in the Customer and Site level entries. However, if we create a Command session as a subconnection of a "Host" type, it doesn't work at all. The variable is replaced, but its always replaced with an empty string.

This feature is critical for sub-connections via templates to be truly powerful. It allows one template to work across multiple customers and sites and adapt properly to the place it is created in the tree.

This seems to be related to this post: http://forum.devolutions.net/topic2405-variables-in-subconnections.aspx and it says it will be in the next update, and there have been many updates since 12/25/2012 released. It does not seem to be fixed in 8.0.18.0.

Sample of my parrot.cmd script:


@echo off
echo "GOT: 1|%1| 2|%2| 3|%3| 4|%4| 5|%5| 6|%6| 7|%7| 8|%8| 9|%9|"
pause



We have had a number of issues with sub-connection session appearing to not do everything an equivilently defined normal session connection can do. We are unsure if these are bugs, design decisions, or applications of sub-connections not forseen. Any information that you could provide on limitations of sub-connections would help us design our templates and entire structure better.

Thanks for your quick support on all our other questions/etc. It's great that you monitor these forums so closely and implement fixes, changes, features for your customers.

All Comments (7)

avatar

Hi,
I tried to reproduce this but I'm not able to.

I create this:

Site
-> Host
---> Command line

The command line contains this

c:\windows\notepad.exe c:\windows\notepad.exe $PARENT_HOST$$SITE_CUSTOM_FIELD1$$CUSTOMER_CUSTOM_FIELD1$

All variables are replaced

David Hervieux

avatar

David,

I am not sure why its working for you. To help you find the issue I have included a youtube video of my issue on the latest 8.0.20.0 beta.
This time I did it with the Company type as I have a problem with that too. So I have a:

Company -> Site -> Host -> Command (as sub connection) tree which will not replace the custom field 1 from either Company or Site.

however

Company -> Site -> Command (as non-subconnection, just a normal session) works fine under the same Company -> Site tree.

http://www.youtube.com/watch?v=mVcntQQm5UU

I also attached a copy of a Access Data Source file I put this in. We have the same issue in a Enterprise SQL Connection too.

The parrot.cmd file the command entries reference is explained earlier in this thread.

You'll see when I run the command session as a subconnection it doesn't replace the variables.
Note, while building this sample I may have found another issue, or maybe its not supported.

1. I originally built this ACME company tree in our enterprise SQL datasource and verified the problem still existed.
2. I then exported the group as a RDM file.
3. I then made a new Access data source
4. I then imported the RDM file.
5. All the entries showed up but it wasn't a complete export/import. The "Company" and "Site" types for the groups where lost, they both came in just as a "Group" type. Further, neither the Company or Site folders kept their custom defined variables under Information > Other.

I attached the exported file too. From what I can see it doesn't appear the Type of the group or the custom variables are supported during export.
If they are not supported and its not a bug, I think you should warn the user of anything in the tree that won't be exported to the file. I can see somebody exporting a number of trees, thinking they have backups of the data and then importing and realizing they lost a lot of custom setup. It needs to be clear while using the program what is being exported vs. what is not supported. Even if its in a help file or release notes, I can see people being burned by it unless it notifies them during use as the program is pretty intuitive overall (nice work) so if it says "Export..." the assumption is it is exporting everything.

The help files says:

"Exports all session in xml format within a .rdm file that can now be imported into any RDM install. Good for backups but doesn't include credentials (username, domain & password). All data is in clear text."

It makes it clear it doesn't do credentials and the export menu even has another choice for w/ credentials so that is clear when using the program. The help says export is good for backups, but if it doesn't do all the properties then it's not good for backups.

Thanks for all your attention to these posts. The best feature of RDM is the forum and responsiveness to posts/feature requests.

Test.mdb

C-ACME.rdm

avatar

David,
Did my post above help you reproduce the issue or am I doing something wrong?

Thanks,
Brett

avatar

I'm working on this right now. I will get back to you soon.

David Hervieux

avatar

This is now fixed internally. It will be included in the version 8.0.23 soon

David Hervieux

avatar

David Hervieux

avatar

David,
Thank you, this is now working. Note, the change did appear to break something else which I have entered as a new bug.

Thanks,
Brett