ControlTier 3.6.0 - Custom module command working from the command line, but not from the web interface

12 views
Skip to first unread message

Costin Caraivan

unread,
Jan 25, 2012, 10:15:02 AM1/25/12
to contr...@googlegroups.com
Hello,

I have a small module which launches Python scripts. It's implemented
as an Ant command. If I launch a command from this module from the
command line, it works. The command:
> ctl -p STAGING -m python -c launch "--" -parameters 'prepare --packageVersion=R353235 --selectedPackages=DB' -script InstallPackages.py
Package install preparation time was: 0:00:41.030000

From a job, it doesn't work:
<job>
<id>274</id>
<name>[Staging ] Prepare Database</name>
<description>[Private build]</description>
<additional />
<loglevel>INFO</loglevel>
<group>Prepare</group>
<context>
<project>STAGING</project>
<options>
<option name='packageVersion' enforcedvalues='false' required='false' />
</options>
</context>
<sequence threadcount='1' keepgoing='false' strategy='node-first'>
<command name='launch' module='python'>
<arg line='-parameters &apos;prepare
--packageVersion=${option.packageVersion} --selectedPackages=DB&apos;
-script InstallPackages.py' />
</command>
</sequence>
<dispatch>
<threadcount>1</threadcount>
<keepgoing>false</keepgoing>
</dispatch>
</job>
The system cannot find the drive specified.

Additional info, maybe something helps:
The actual script is launched from a share mapped as a drive (Python
is also installed on that mapped drive).
The ControlTier server is installed on Windows 2008 and the connection
to the clients is done through Cygwin OpenSSH.
The module itself:
<command name="launch" description="Launch a Python script
found in Z:/deploy-scripts." command-type="AntCommand"
is-static="true">
<implementation>
<exec executable="cmd" failonerror="true" >
<arg line="/c Z:/tools/python/python.exe
Z:/deploy-scripts/${opts.script} ${opts.parameters}"/>
</exec>
</implementation>
<opts>
<opt parameter="script" description="Python script
name." required="true" property="opts.script" type="string" />
<opt parameter="parameters" description="Python script
parameters." required="true" property="opts.parameters" type="string"
/>
</opts>
</command>
Nothing fancy, really :(
_____________
Costin Caraivan

Moses Lei

unread,
Jan 25, 2012, 11:24:36 AM1/25/12
to contr...@googlegroups.com
I would think that the executing user and environment over SSH might be slightly different; for example if your drive is mapped through explorer on the desktop, it may not be mapped in context through SSH.

Can you try to isolate it by just running trying to run python script over SSH? Something like ssh user@boxname call_to_python_script

One solution I can think of might be to map it inside the CTL wrapper-- run: net use z: \\path\to\share

Moses
--
Moses Lei
[ Professional Services | DTO Solutions, Inc. ]
[ mobile: +1 703.901.5969 | e-mail: ml...@dtosolutions.com | aim/gtalk: ml...@controltier.com | yahoo: moseslei | windows live (msn): ml...@dtosolutions.com ]



Costin Caraivan

--
You received this message because you are subscribed to the Google Groups "ControlTier" group.
To post to this group, send email to contr...@googlegroups.com
To unsubscribe from this group, send email to controltier...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/controltier?hl=en
http://wiki.controltier.org

Costin Caraivan

unread,
Jan 25, 2012, 12:13:46 PM1/25/12
to contr...@googlegroups.com, Moses Lei
I'll remap the drive through ControlTier and try again, thanks for the idea.

I find it strange that the command line and web results differ. Isn't
the base implementation the same for both? (i.e. they should give the
same error IMO).

Regards.

Reply all
Reply to author
Forward
0 new messages