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)
Deploy of empty dir won't overwrite target files
System
Follow-up to my post about reverse deploy and delete files....
I've got my scripts written to do a reverse deploy of the data files, then a forward deploy of an EMPTY directory, with the intent of removing the files I just retrieved. The forward deploy configuration has 'doDeletes=yes', but it won't delete the files on the forward deploy target.
The deploy log files show "DEPLOYING not required". There are no errors relating to permissions or the area I'm targeting, just an indication that nothing is being sent. A snippe of log:
id=0 server: Destination directory [/local/home/doc/en_US/dataSource]
id=0 server: Options: do_deletes user=dynuser group=other ignore_modes ignore_users ignore_groups
id=0 server: COMPARE - dst[/local/home/doc/en_US/dataSource] with src[/tmp/180203105557]
(3) id=0 server: Getting directory info for (.)
(2) id=0 server: COMPARING done.
Thread-16 PRECOMMIT
(3) id=0 server: DEPLOYING to destination path [/local/home/doc/en_US/dataSource]
id=0 server: DEPLOYING not required
My ksh script looks like this, just showing the important bit here::
EMPTY_DIR=/tmp/`date+%d%m%y%H%M%S`
mkdir -p $EMPTY_DIR
# reverse deploy config to pull files to my 'safe' server from production servers
iwodstart CopyUserFiles -k area=${mySrcArea} -k remote_directory=${myDestDir} user=${myUser}
DEPLOY_STATUS=$?
if [[ ${DEPLOY_STATUS} == 0 ]]
then
# forward deploy to production servers, doDeletes=yes, overwrites the area, removing the data files
iwodstart RemoveUserFiles -k area=${EMPTY_DIR} -k remote_directory=${mySrcDir} -k user=${myUser} -k remote_server=${myServer}
fi
The RemoveUserFiles deploy config looks like:
<deploymentConfiguration >
<localNode host="10.101.112.183" />
<deployment name="RemoveUserFiles" transactional="no" >
<execDeploymentTask useDefinition="RemoveUserFiles-def" />
</deployment>
<definition name="RemoveUserFiles-def" >
<source >
<sourceFilesystem area="$area^" >
<pathSpecification >
<path name="." />
</pathSpecification>
</sourceFilesystem>
</source>
<target useReplicationFarm="REPFARM_0" >
<targetFilesystem area="$remote_directory^" />
<transferRules doDeletes="yes" />
<permissionRules group="other" user="$user^" />
<comparisonRules ignoreModes="yes" ignoreUser="yes" ignoreGroup="yes" />
</target>
</definition>
<replicationFarmSet >
<replicationFarm name="REPFARM_0" >
<nodeRef useNode="$remote_server^" timeout="30" />
</replicationFarm>
</replicationFarmSet>
</deploymentConfiguration>
Find more posts tagged with
Comments
Adam Stoller
I'm not sure I'm following you here - you're creating an empty directory with a unique name and expecting that the deployment of that directory will delete the contents of a directory on the receiving side with a different name?
Please provide a "picture" of the directory structure on both sides of the equation here, to help make it clearer what you are deploying from where to where so that we can verify what should be happening.
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
Data flow:
Application Server:
/local/userdata/en_US/resumes/
/local/userdata/en_US/forms/userentries/
Safe Server:
/local/productionData/userdata/en_US/resumes
/local/productionData/userdata/en_US/forms/userentries
(1) Move the user-generated files on the Production server to the Safe Server directory structure (reversedeploy #1)
(2) Send an empty directory from the Safe Server to each source directory on the Production servers, thereby overwriting the original data files (deploy #2)
I'm using a random temp directory on the Safe Server so I don't have to rely on a specific directory being empty. Since in deploy #2 the source area (my empty directory) is empty, shouldn't that overwrite the destination directory?
Adam Stoller
I just want to make sure I'm reading this correctly - so if I find
some time I can try it out in my own (albeit standalone) environment.
So - for Reverse Deployment:
sourceFilesystem area="/local/userdata/en_US/resumes"
targetFilesystem area="/local/productionData/userdata/en_US/resumes"
for Forward Deployment
sourceFilesystem area="/tmp/18022003140223"
targetFilesystem area="/local/userdata/en_US/resumes"
Is this correct?
If not, please show me where I got it wrong.
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
Exactly. I could send you my script, but you might not want that much detail
I was looking at sourceTransferRules element to see if it might have a doDeletes attribute, but the sourceTransferRules element isn't even listed in the DTD. If that attribute existed, it seems like the reverse deploy might be able to do the whole job...but I think you told me that wasn't possible before.
Adam Stoller
I just did a quick test - using OpenDeploy 5.6 on my W2K laptop (sorry, but that's all I have available as far as an environment is concerned). I had several files and directories sitting in IWODHOME/tmp/
I created a new deployment config file with
sourceFilesystem area="c:/temp/emptydir"
targetFilesystem area="IWODHOME/tmp"
transferRules doDeletes="yes"
I created an empty directory (c:/temp/emptydir") and ran the deployment. When it was done, IWODHOME/tmp was empty.
So - this definitely seems to work with OpenDeploy 5.6. I'm not aware of any bug reports regarding this in earlier versions of OpenDeploy, but I'm also not aware of what version of OpenDeploy you are running - and I'm using W2K whereas I assume you're running on Solaris.
Could you try doing a simple test case like this and if it doesn't work, post (as an attachment) all the log files and config files involved?
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
Running Solaris 2.7, OpenDeploy 5.5.1 Build 8687 (service pack 1)
Deploying to Solaris 2.8, OpenDeploy 5.5.1 Build 8687 (Service pack 1).
I'll put some test output together. Thanks for your help!
Migrateduser
As is often the case as one works on making a simple example, things begin to work... I made a couple small changes to my script and configs as I worked on an example, and now the forward delete is working. I'll post my example stuff for reference, should others be interested.
Adam Stoller
Can you state what the "small changes" you made were?
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
I believe that I had my source and target servers backwards in the remove-files deploy. My retrieve-files deploy is a REVERSE deploy to grab the files from the source, and my remove-files deploy is a forward deploy of my empty directory. I had mixed the two up, and was doing the remove-files deploy to the local server.
Life is good, thanks for the assist.