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

Re: [HTCondor-users] eval() not working?



For what it's worth. HTCondor 8.3.0 allows startd cron scripts to publish a different value into each slot
which would make the use of eval in this context unnecessary.

-tj

On 8/28/2014 8:36 AM, Sarmiento, Evan wrote:
Hi,

I'm running Condor 8.0.7--

I made a custom set of Machine ClassAds which display CGROUP
parameters per slot, configuration below:

#
# CGROUP Machine ClassAds
#

STARTD_CRON_AUTOPUBLISH = If_Changed

STARTD_CRON_JOBLIST =

STARTD_CRON_JOBLIST = $(CRON_JOBLIST) cgroup

STARTD_CRON_cgroup_PREFIX =
STARTD_CRON_cgroup_EXECUTABLE = /usr/local/HMDC/bin/condor_slot_cgroups
STARTD_CRON_cgroup_PERIOD = 5s
STARTD_CRON_cgroup_MODE = WaitForExit
STARTD_CRON_cgroup_RECONFIG = true
STARTD_CRON_cgroup_SLOTS =
STARTD_CRON_cgroup_ARGS = $(BASE_CGROUP)

#
# STARTD ATTRS
#
#

DYNAMIC_SLOT_ID = \
   splitSlotName(Name)[0]

MEMORY_USAGE_IN_BYTES = \
  eval( strcat( toUpper(DYNAMIC_SLOT_ID), "_cgroup_memory_usage_in_bytes" ) )


SLOTD_SLOT_ATTRS = $(STARTD_SLOT_ATTRS), MEMORY_USAGE_IN_BYTES,
CGROUP_MEMORY_USAGE_IN_BYTES, DYNAMIC_SLOT_ID
STARTD_ATTRS = $(STARTD_ATTRS), MEMORY_USAGE_IN_BYTES,
CGROUP_MEMORY_USAGE_IN_BYTES, DYNAMIC_SLOT_ID

#
# private IP
#
NETWORK_INTERFACE = <%= @hmdc_node_listen %>

#
# We're a head node that also runs jobs
#
DAEMON_LIST = $(HMDC_COMPUTE_DAEMON_LIST)

However, when I login to my collector, eval() doesn't seem to work--
check this out:

[root@dev-cod6-head tmp]# condor_status -autoformat Dynamic_Slot_Id

slot1

slot1

slot1_1

-- This works, my Dynamic_Slot_Id is available for each slot

This doesn't work:

[root@dev-cod6-head tmp]# condor_status -long|grep MEM

MEMORY_USAGE_IN_BYTES =
eval(strcat(toUpper(DYNAMIC_SLOT_ID),"_cgroup_memory_usage_in_bytes"))

MEMORY_USAGE_IN_BYTES =
eval(strcat(toUpper(DYNAMIC_SLOT_ID),"_cgroup_memory_usage_in_bytes"))

MEMORY_USAGE_IN_BYTES =
eval(strcat(toUpper(DYNAMIC_SLOT_ID),"_cgroup_memory_usage_in_bytes"))


[root@dev-cod6-head tmp]# condor_status -autoformat MEMORY_UAGE_IN_BYTES

undefined

undefined

undefined

-- Bugt oddly enough, this DOES work

[root@dev-cod6-head tmp]# condor_status -autoformat
'strcat(toUpper(DYNAMIC_SLOT_ID),"_cgroup_memory_usage_in_bytes")'

SLOT1_cgroup_memory_usage_in_bytes

SLOT1_cgroup_memory_usage_in_bytes

SLOT1_1_cgroup_memory_usage_in_bytes

And if I run

[root@dev-cod6-head tmp]# condor_status -autoformat
SLOT1_1_cgroup_memory_usage_in_bytes

14090240

826781696

826781696

This actually appears to work. I was trying to use eval() to actually
get the proper dynamic slot classad. Can anyone tell me what's going
on? Been banging my head against the wall for a day

Best,
Evan
_______________________________________________
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/