Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Second DNR script not invoked on failure
fiquebem
I have a deployment configured as shown below. It works fine except that, when the 1st DNR script exits with <response code="-2"/>, the 2nd DNR script is not being invoked : (.
<deployment transactional="no">
<execDeploymentTask useDefinition="DEF_PRD">
<deployNRun>
<dnrDeployment location="target" when="after" state="success">
<script cmd="Some Perl script" async="no"/>
</dnrDeployment>
</deployNRun>
<deployNRun>
<dnrDeployment location="target" when="after" state="always">
<script cmd="Some other Perl script" async="no"/>
</dnrDeployment>
</deployNRun>
</execDeploymentTask>
</deployment>
We don't want transactional deployments yet, but even the following didn't help ("Some other Perl script" never ran upon failure):
<deployment transactional="yes">
<execDeploymentTask useDefinition="DEF_PRD">
<deployNRun>
<dnrDeployment location="target" when="after" state="success">
<script cmd="Some Perl script" async="no"/>
</dnrDeployment>
</deployNRun>
<deployNRun>
<dnrDeployment location="target" when="after" state="success">
<script cmd="Some other Perl script" async="no"/>
</dnrDeployment>
</deployNRun>
<deployNRun>
<dnrDeployment location="target" when="after" triggerPoint="rollback" state="failure">
<script cmd="Some other Perl script" async="no"/>
</dnrDeployment>
</deployNRun>
</execDeploymentTask>
</deployment>
Is that a bug or what?
The source is OD 6.0.1 on Solaris 9, the target is OD 5.6 SP1 w/ patch on NT 4.
What else can I try? Basically, the 2nd DNR deploys some logs back to the source. We want to see the logs at the source when the 1st DNR reports a failure too.
Thanks,
S.
Find more posts tagged with
Comments
Migrateduser
I think the first DNR is causing the deployment to terminate and therefore never fires the second DNR.
Perhaps you can build all the logic into a single DNR script?
Todd Scallan
Director of Product Management
Interwoven
t: 408-530-7167
e:
tscallan@interwoven.com
Adam Stoller
Well - 6.0.2 has the DNR on rollback trigger point ... I don't think it exists in 6.0.1 (which is what was specified) - right?
Todd - from the documentation this would seem to only work with transactional deployments - correct? it's not quite the same as a triggerpoint on failure for a non-transactional deployment - and it probably doesn't matter what order the DNR scripts are listed since the failure is being generated from a DNR...
However - since all the triggers (2 in the first example, 3 in the second example) in the config are running on the target side after the deployment - rather than have multiple execDeploymentTasks - why not have only one - and divide the functionality into subroutines so that you can easily code the logic for it (in this case it would be something like:
my $failure = 0;
$failure += do_script_1();
$failure += do_script_2(); # always run this even if script 1 fails?
print qq(<response code="-2"/>\n) if ($failure);
And both do_script_1() and do_script_2() would return zero on success and a positive value (1) on failure.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
> Todd - from the documentation this would seem to only work with transactional deployments - correct?
Yes, that's my understanding.
Todd Scallan
Director of Product Management
Interwoven
t: 408-530-7167
e:
tscallan@interwoven.com