[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] htcondor.send_command for a remote condor



Hi Colson,

In all likelihood, you're probably feeding it the correct ClassAd but effectively getting a permission denied from the remote daemon (due to some subtle protocol issues, it's sometimes hard for the client to distinguish a permission-denied from other errors).

Do you see any authorization errors in the remote daemon's logs?

Are you able to reproduce the same issue via the command-line client?

Brian

> On Dec 11, 2018, at 3:41 PM, Colson Driemel <colsond@xxxxxxx> wrote:
> 
> Hi all,
> 
> I've been helping develop a system that tracks/issues commands to jobs/machines via the python bindings and I've run into a situation that I don't see covered in the docs.
> 
> The system tracks jobs and machines from multiple condor instances and issues simple commands like DaemonsOffPeaceful. The commands work fine if the machines are located on the local condor but I don't see a way to issue a command to a remote condor. Unlike the Schedd and Collector python object the htcondor.send_command() does not require initialization as it uses the "htcondor" directly from the python import.
> 
> What I'd like to do is issue a command via send_command to a remote condor instance (not the one running on my local machine).
> 
> Typical workflow looks like this:
> 
> 
> #initialize a collector object to query for the machine classad i'd like to issue the command to
> condor_session = htcondor.Collector(condor_host) #condor_host can be the local or the remote host
> 
> #query for the classad
> condor_classad = condor_session.query(master_type, 'Name=="%s"' % resource.name.split("@")[1])[0] #i've confirmed this is returning the desired classad
> 
> #then finally issue the command
> result = htcondor.send_command(condor_classad, htcondor.DaemonCommands.DaemonsOffPeaceful)
> 
> 
> Which works nicely if the condor_host is the local one but if its a remote host then i get an error:
> 
> File "/opt/cloudscheduler/data_collectors/condor/csmachines.py", line 208, in command_poller
>   result = htcondor.send_command(condor_classad, htcondor.DaemonCommands.DaemonsOffPeaceful)
> RuntimeError: Failed to start command.
> 
> 
> I understand that what this is probably doing is issuing the command to the local condor which has no idea what the classad I'm passing in is. Anyone know of a way around this?
> 
> 
> Many Thanks,
> -Colson
> 
> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
> 
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/