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)
dnr runce multiple times on source
bimsan
Hi, I use dnr script running on source of deployment to prepare files that are about to be moved to target servers. However, the script runs as many times as it is the number of target servers defined by replicationFarm. I do not understand why the dnr runs multiple times, when it suppose to be run just once on source before the deployment process starts. Is there any way to avoid it ?
<execDeploymentTask useDefinition="dotcom" downRev="" >
<deployNRun >
<dnrDeployment location="source" when="before" state="success" >
<script cmd="/usr/OpenDeployNG/custom/ms_od_wrapper.ipl ms_COM_to_WSS -k source_area=$source_area^ -k WSS_local_dir=$WSS_local_dir^" as="msadmin" where="/usr/OpenDeployNG/bin" async="no" >
</script>
</dnrDeployment>
</deployNRun>
</execDeploymentTask>
Find more posts tagged with
Comments
Adam Stoller
In order to have it run once - you have two options:
1: Upgrade to OpenDeploy 5.6 (if you haven't already) and use dnrDeploymentJob (note the 'Job' at the end there)
2: If unable to use OpenDeploy 5.6 - hack the **** out of your script to use some sort of counter / counter-file to keep track of whether or not the script has already been run (or to wait until the Nth attempt to run it before allowing it to run)
Method '2' is ugly and painful, and will probably take a fair amount of time to figure out how to get it to work reliably.
Method '1' is the preferred method.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
bimsan
thanks, option 1 sounds realy better. We will go for that.
i_like_smile
Normally you can use dnrDeploymentJob to run a DNR at deployment level. However please keep in mind that macro-level DNRs have no access to the in-memory log. So if your DNR script needs to access in-memory log, then this option will not work for you.
Migrateduser
Hi,
What will be my option if my script needs to access the in-memory log? Below is my deployment scenario:
I have two web servers sharing one database server. Upon deployment of web pages to those two web servers, the OpenDeploy script also needs to execute a DNR script that will extract certain information from the files just deployed into the database (for example, I need to put page title and url links into the database.).
In my case, the DNR script can only be executed once and it also needs to be able to access the in-memory logs.
Any help is appreciated.
Migrateduser
Although not the most elegant approach, you could have each deployment leg kick off the DNR script and have the DNR determine whether it should do the database update or simply exit. How the script determines whether to proceed or exit would depend on your scenario; for instance, by using the name of the target host on which the script runs to decide.
OD 6.0 (now in beta) makes the synchronized file/database update scenario much easier by eliminating the need for DNRs. Instead, you can define a database deployment leg within the OD config file. That leg can run in a deployment transaction along with multiple other file deployment legs.
Todd Scallan
Director of Product Management
Interwoven
t: 408-530-7167
e:
tscallan@interwoven.com
fiquebem
Isn't another option to have multiple Definitions (one for each target node), and then use the DNR in only one of the execDeploymentTasks for the Definitions?
S.
Adam Stoller
We do that at my customer's site - we define two replicationFarms, and duplicate the definitions, and then have two execDeploymentTasks - one which runs without any DNR script and the other runs with a DNR script to perform the DataDeploy part.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com