help-cfengine
[Top][All Lists]
Advanced

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

2.1.17 having issue with ExecResult() using pipelines


From: nathan r. hruby
Subject: 2.1.17 having issue with ExecResult() using pipelines
Date: Thu, 10 Nov 2005 17:31:22 -0500 (EST)

Hi!

I'm testing a cfengine 2.1.14 -> 2.1.17 upgrade this afternoon and have
hit a snag.  It appears that the places in which I use constructs like
  control:
  fooish = ( ExecResult(/bin/sh -c "/bin/cat file | yada | yada | yada") )
seem to be only executing the first argument (eg: the /bin/cat) instead of
the whole pipeline.

For instance, a cfagent -d2 spins like this waiting for cat to return
(which it never will):
----
HandleFunctionObject(ExecResult(/bin/sh -c "/bin/cat /proc/loadavg | /bin/awk 
'{print $1}' | tr -d '\n' "))
IsBuiltinFunction(ExecResult(/bin/sh -c "/bin/cat /proc/loadavg | /bin/awk '{print 
$1}' | tr -d '\n' "))
IsBuiltinFunction: ExecResult(/bin/sh -c "/bin/cat /proc/loadavg | /bin/awk '{print 
$1}' | tr -d '\n' ")
HandleFunction: ExecResult(/bin/sh -c "/bin/cat /proc/loadavg | /bin/awk '{print 
$1}' | tr -d '\n' ")
FunctionStringToCode(ExecResult)
Appending [/bin/sh -c /bin/cat /proc/loadavg | /bin/awk '{print $1}' | tr -d 
'\n' ]
ExpandVarstring(/bin/sh -c /bin/cat /proc/loadavg | /bin/awk '{print $1}' | tr 
-d '\n' )
ARG[0] /bin/sh -c /bin/cat /proc/loadavg | /bin/awk '{print $1}' | tr -d '\n' cfpopen(/bin/sh -c /bin/cat /proc/loadavg | /bin/awk '{print $1}' | tr -d '\n' )
cfengine:: Time out
----

ps -ef during this spin shows that there's only a "/bin/cat" running.

I have several other variables that do similar constructs with find, and
they appear to exhibit the same problem, returning the listing for the
current working directory, instead of the directory I indicated in the
second argument for find.

Did the way ExecResult works change recently, or is this possibly a bug
related to the parameter changes in 2.1.16 (though the Changelog states it
was fixed for 2.1.17a, which I'm not sure is what you get if you grab
ftp://ftp.iu.hio.no/pub/cfengine/cfengine-2.1.17.tar.gz)

Thanks for any clues that could be landed upon my thick head :)

-n

--
-------------------------------------------
nathan hruby <address@hidden>
uga enterprise information technology services
production systems support
-------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]