AWS Thinkbox Discussion Forums

Slaves don't update status with startup Event

Ok with

cmd="/c echo \"hello world\"" process = ProcessUtils.SpawnProcess( "cmd", cmd, startupDir, ProcessWindowStyle.Hidden, True )

It seems to work

With cmd="/c getmac /S " + Render-X3-Host + " /NH" process = ProcessUtils.SpawnProcess( "cmd", cmd, startupDir, ProcessWindowStyle.Hidden, True )

I get

So GetMac seems to sit indefinitely. If I run it from a command prompt or line it takes about 2 seconds and finishes.

Solved the last remaining bits. GetMac was waiting on a domain password. We’ve moved Deadline over to a non-domain privileged account in order to simply cloud/VM deployment without necessarily joining every slave to our domain. As a result the process wouldn’t have the elevation to use GetMac.

New question. Is there a way to pass encrypted data to an event plugin (username/password) without it living as plain-text in a python event script which could be edited?

That’s very interesting. Who knew… I was expecting the same WMIC slowdown we saw in the Windows API.

As far as safely passing data, we don’t have a secure way and to be honest people might edit the script. The Unix way would be to create a script with the password in it and lock the reading of that file to just the render user. Again, not great if others can log in.

The goal though seems to be to get the MAC addresses of the current machine, so you could probably do that a few different ways. Just for funzies, I played around and got this:

from FranticX.Net import NetUtils
from System.Net import IPAddress

# address = IPAddress.Parse("192.168.5.202")

for endpoint in NetUtils.GetIPEndPoints():
    address = endpoint.Address
    mac = NetUtils.GetMacAddress(address)
    print("Mac: {0} for {1}".format(mac, address))

It’s leveraging C# inside Python because Python itself doesn’t come with cross-platform packages for this and Mono/.net comes packed with the kitchen sink. I’m also making use of our FranticX library since it does some of the work for me.

Privacy | Site terms | Cookie preferences