cancel
Showing results for 
Search instead for 
Did you mean: 

login agent in pooled PCs

jhill
Level 3
I have two resource PCs in a pool that we need to reboot every Sunday evening.

I wrote a somewhat involved script to do this because I haven't found a good way to target a task at a single member of a pool, and we need to reboot and login both PCs.  Here's the script's logic:
  • Reboot both devices
  • Sleep for 2.5 minutes, which is enough time for both machines to return to the login screen
  • Send a task to the pool to log in.  Because they're pooled, only one device will grab this task.
  • Sleep for 30 seconds, which trial and error has told us is long enough to shut down the login agent on the first device but not long enough for the first device's "regular" agent to start up
  • Send a task to the pool to log in.  About 85% of the time, the second device will log in.  The remaining 15% of the time the first device will grab the request 
I would love to be able to target the two resource PCs individually so I could ensure that Bot A and Bot B have each been rebooted and logged in, but I can't find a way to do that.  Any advice appreciated.

------------------------------
Jon Hill
VP
Jennison Associates
America/New_York
------------------------------
5 REPLIES 5

bruce.liu
Staff
Staff
Hi Jon,

Have you tried drag-and-drop the resource pool to Login process twice so two sessions will be created instead of one? 

Regards,

------------------------------
Bruce Liu
Senior Product Consultant, Professional Services
Blue Prism
Australia/Sydney
------------------------------

HakanEngman
Level 6

Hi,

Have done some testing with pools and the only way I was able to operate the resource properly was through command line. My thinking is that one resource is "acting" for the complete pool, and if you send a reboot request from a job in BP then the pool go offline for a while. ( Not ideal in my book..) But using AutomateC.exe I could adress a specific resource that is not "primary" in the pool currently. 

Maybe I should highlight that we used separate ports for the RunTime and the Login agent. So we would have one resource not in the pool, pointing to the LoginAgent resource ; and the "RunTime" resource beeing a member in the pool. 

So, basically I would setup a Login schema, pointing to the LA resource, and when executing it ; the resource would become a active member of the pool. I was planning to have a morning job that would add more resources to the pool during the day, and then in the evening fire a few "logout" schemas just to move those resources to another pool. Then something else go in the way… 

But maybe these examples of functions could provide a embryo to something for you.

This functionality is something you want in a resilient and dynamic environment! Hope you get closer to the goal! 

Br,

Håkan Engman

Function Login2poolvdi
{
PARAM($vdi,$cred)
$xml = "<inputs><input name='Login Locally' type='flag' value='False'/><input name='Domain' type='Text' value='YourDomain'/><input name='Credential Name' type='Text' value='$($cred)'/></inputs>"
& $AutoC_exe /sso /dbconname $environment /resource $vdi /port 8180 /run "Login v2" /startp "$($xml)"
}

#################################
Function LogoutOfpool
{
PARAM($vdi)
$xml = "<inputs><input name='Force' type='flag' value='True'/><input name='Delay' type='timespan' value='0.00:00:05'/></inputs>"
& $AutoC_exe /sso /dbconname $environment /resource $vdi /port 8181 /run "Logout v2" /startp "$($xml)"
}


------------------------------
Hakan Engman
Automation engineer
Teliacompany.com
Europe/Stockholm
------------------------------

Thanks Bruce,

We see inconsistent results if we try executing two login processes simultaneously.  Often the first machine in the pool just grabs them both.  We've had better luck waiting until the first device has shut down its login agent but before it has started its regular agent, but the timing doesn't work all the time.

------------------------------
Jon Hill
VP
Jennison Associates
America/New_York
------------------------------

Ooh, I love the idea of putting them on different ports.  That never occurred to me!  I'll give that a shot - if I can get it to work that would solve the problem entirely because I wouldn't pool the login agents.

------------------------------
Jon Hill
VP
Jennison Associates
America/New_York
------------------------------

This turned out to be very easy to do once I updated the login agent service config to use a different port.  A new device appeared in the Control Room named <machinename>:8180, and that's the one I targeted for my process.

------------------------------
Jon Hill
VP
Jennison Associates
America/New_York
------------------------------