There is no limitation on the number of <paralleliterate> items.  The STAX 
job you provided works correctly for me.  You should add some <message 
log="1"> elements to your job to see if there are any non-zero return 
codes.  For example:

    <paralleliterate var="machName" in="machList">
      <sequence>
        <message log="1">'%s %s' %(  machName.getScript(), 
machName.getHostname() ) </message>
        <stafcmd name="'Invoke STAX on Machines'">
          <location>machName.getHostname()</location>
          <service>'STAX'</service>
          <request>'EXECUTE  FILE %s JOBNAME %s CLEARLOGS' %( 
machName.getScript(),  machName.getHostname() ) </request>
        </stafcmd>
        <message log="1">'RC=%s, Result=%s' % (RC, STAFResult)</message>
      </sequence>
    </paralleliterate>

Then you would see the output (in my example I get the RC 16 because the 
machine names are not valid for my environment):

20080219-08:44:17
E:/testbed/STAF/xml/loadgen2.xml loadgen2 
20080219-08:44:17
E:/testbed/STAF/xml/loadgen4.xml loadgen4
20080219-08:44:17
E:/testbed/STAF/xml/loadgen3.xml loadgen3
20080219-08:44:17
E:/testbed/STAF/xml/loadgen1.xml loadgen1
20080219-08:44:22
RC=16, Result=STAFConnectionProviderConnect: Error resolving host name: 
Unknown host name: loadgen2, gethostbyname(): 22, Endpoint: tcp://loadgen2
20080219-08:44:22
RC=16, Result=STAFConnectionProviderConnect: Error resolving host name: 
Unknown host name: loadgen1, gethostbyname(): 22, Endpoint: tcp://loadgen1
20080219-08:44:22
RC=16, Result=STAFConnectionProviderConnect: Error resolving host name: 
Unknown host name: loadgen3, gethostbyname(): 22, Endpoint: tcp://loadgen3
20080219-08:44:22
RC=16, Result=STAFConnectionProviderConnect: Error resolving host name: 
Unknown host name: loadgen4, gethostbyname(): 22, Endpoint: tcp://loadgen4

David Bender
STAF/STAX Development
8-1268 (512-838-1268) 
IBM Austin Bldg. 903-5B002
Internet: [EMAIL PROTECTED]




Harsha <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
02/19/2008 07:13 AM

To
staf-users@lists.sourceforge.net
cc

Subject
[staf-users] STAX,      is there any iteration limit in <paralleliterate>?






Hi All

Take a look at the following STAX script, please.

I am using this STAX script to send STAF commands to four computers:
loadgen1, loadgen2, loadgen3, loadgen4.

All of these Machines have STAF installed and configured on them, with 
STAX service plugged to each one of them.

The computers: 

loadgen2, loadgen3, loadgen4 trust{level 5} the computer loadgen1.

I am using loadgen1 as the controller machine using which I trigger the 
STAF commands on all the machines.

When I do so, only the computers loadgen2, loadgen1, loadgen4 are 
executing the commands and the computer loadgen3 
remains mute :(

However, if I send the command (with out using/modifying this script) only 
to loadgen3 from loadgen1 it works.

Is there any limitation in the <paralleliterate> as to how many number of 
items it can iterate?
I am wondering about this strange behaviour.

mommy :(

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
<stax>
  <defaultcall function="Main"/>
  <function name="Main">
    <sequence>
    <script>
    class server:
        def __init__(self, hostname, script):
        self.hostname = hostname
        self.script = script
        def getHostname(self):
        return self.hostname
        def getScript(self):
        return self.script
    machList = [ server('loadgen1', 'E:/testbed/STAF/xml/loadgen1.xml'), 
server('loadgen2', 'E:/testbed/STAF/xml/loadgen2.xml'), server('loadgen3', 
'E:/testbed/STAF/xml/loadgen3.xml'), server('loadgen4', 
'E:/testbed/STAF/xml/loadgen4.xml')]</script>
    <paralleliterate var="machName" in="machList">
        <stafcmd name="'Invoke STAX on Machines'">
            <location>machName.getHostname()</location>
            <service>'STAX'</service>
            <request>'EXECUTE  FILE %s JOBNAME %s CLEARLOGS' %( 
machName.getScript(),  machName.getHostname() ) </request>
        </stafcmd>
    </paralleliterate>
    </sequence>
  </function>
</stax>

-- 
Cheers!!
Harsha Reddy
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to