Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
OD return value
System
Hi,
I am using the below code. To find out whether deployment success or not.Some times OD service is down still it is returning return code '0' and always saying it is successful.
my $deploy_command="$od_home\\bin\\iwodstart.bat file_deploy -k \"deploy_def=generic-def\" -k \"source_area_name=$areapath\" -k \"repfarm=$repFarm\" -k \"dest_area_name=$destination_dir\" -k \"filelist=$filelist\"";
$results = `$deploy_command`;
$rc = $?;
if ($rc eq 0)
{
$deploystatus = "Deployment Finished.";
}
else
{
$deploystatus = "Deployment NotFinished-ERRORCODE-$rc";
}
Could any one pls.help me to solve this issue.Does this command return's always '0'??.
I don't think so bcz i read in manuel it will return 0,1,2.
0-succeeded
1-starting of the deployment failed
2-deployment ran and returned a failed status. right
So what if OD service is down??
Thanx in advance
Find more posts tagged with
Comments
Migrateduser
If you are running OD in a windows environment, I believe the return code is always 0. Don't remember where this is documented but if I remember or come accross it I'll post it.
Whether the above statement is true or not the below solution will work.
To determine if the deployment failed or not you should parse the $results variable and look for a line that contains
Status: Complete - or - Status: Failed
Migrateduser
Thanx for your reply.
I am using the following statement.
if ($results =~ /Status: Completed/)
Is it ok?? or I need to include any thing else.
Right now with above statement it is working
Thank u once agian
Edited by krishna1288 on 12/19/02 11:37 AM (server time).
Adam Stoller
If you're on Windows, and trying to run OpenDeploy from within a script - I recommend you use IWODHOME/solutions/perl/iwodstart.ipl instead of IWODHOME/bin/iwodstart.bat.
I belive you will get more reasonable error code returns then
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
Thank you for your suggestion.
Migrateduser
If you are on windows I would suggest that you follow ghoti's advice and use the perl version if iwodstart (as the .bat version will return 0 incorrectly in cases where it should not).
Migrateduser
I believe the return code problem was fixed for Windows 2000 (but not NT) in OD 5.5.1 SP2.
See OD 5.5.1 SP2 Release Notes p. 15, bugs #30000, 23871.
Todd Scallan
Senior Product Manager
Interwoven
t: 408-530-7167
e:
tscallan@interwoven.com