help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: copy:: problem


From: Wheeler, John
Subject: RE: copy:: problem
Date: Tue, 20 Jan 2004 12:32:31 -0600

I had a similar experience once, I think the d2 says it all... it thinks
you are trying to copy the same file/dir within the ifelapsed time
frame. Sometimes locks are not our friends.

Not sure which version you are using, but mark added the ifelapsed and
expiresafter options to each action so I think you could try to do 

ifelapsed=0 on each copy. 

I think I solved this problem with:

         $(server_jar_dir) dest=$(cots_lib_dir)
                                r=inf
                                syslog=true
                                          include=saaj-api.jar
                                          include=commons-logging.jar
                                          include=saaj-ri.jar
                                mode=$(readMode)
                                type=binary
                                server=$(policyhost)
                                trustkey=true
                                purge=false


it's a bit more compact and cfengine only see's it as one copy,
eliminating the need for an ifelased on each stanza.

As for why cfengine "locks" your subsequent copies, duno. Maybe someone
else can speak to the logic behind it.


> -----Original Message-----
> From: Pete Ehlke [mailto:address@hidden
> Sent: Tuesday, January 20, 2004 11:13 AM
> To: address@hidden
> Subject: copy:: problem
> 
> Folks:
> 
> Having an exceptionally odd issue with a copy:: stanza. Given this
> fragment, copying files from one directory to another on $(policyhost)
> itself:
> 
>         $(server_jar_dir)/saaj-api.jar
dest=$(cots_lib_dir)/saaj-api.jar
>                                r=inf
>                                syslog=true
>                                mode=$(readMode)
>                                type=binary
>                                server=$(policyhost)
>                                trustkey=true
>                                purge=false
> 
>         $(server_jar_dir)/commons-logging.jar
> dest=$(cots_lib_dir)/commons-logging.jar
>                                r=inf
>                                syslog=true
>                                mode=$(readMode)
>                                type=binary
>                                server=$(policyhost)
>                                trustkey=true
>                                purge=false
> 
>         $(server_jar_dir)/saaj-ri.jar dest=$(cots_lib_dir)/saaj-ri.jar
>                                r=inf
>                                syslog=true
>                                mode=$(readMode)
>                                type=binary
>                                server=$(policyhost)
>                                trustkey=true
>                                purge=false
> 
> Where $(server_jar_dir) expands to
> /home/cmbuild/cvs-source/2004-01-19/server/jar/ and $(cots_lib_dir)
> expands to /var/cfengine/files/sparc/psf/paytool_1_4_0_0/cots_lib/,
the
> first and second file both copy, but the third does not. The same
> pattern holds if I swap the first and third directives: if saaj-ri.jar
> is first and saaj-api.jar is third, saaj-ri.jar and
commons-logging.jar
> are copied, but saaj-api.jar is not. If I move commons-logging.jar up
to
> first place or down to third, the pattern follows the saaj-* files:
the
> first saaj-* jar is copied, but the second is not. This is logged at
-d 2:
> 
> Checking copy from localhost:/home/cmbuild/cvs-source/2004-01-
> 19//server/jar/saaj-ri.jar to
> /var/cfengine/files/sparc/psf/paytool_1_4_0_0/cots_lib/saaj-ri.jar
> Authentic connection verified
>
GetLock(copy,_home_cmbuild_cvs_source_2004_01_19__server_jar_sa__var_cfe
ng
> ine_files_sparc_psf_paytool_1_4_0_0_cots,time=1074616880),
> ExpireAfter=120, IfElapsed=1
> GetLastLock()
> cfengine:kryptoqa02: Nothing scheduled for
>
copy._home_cmbuild_cvs_source_2004_01_19__server_jar_sa__var_cfengine_fi
le
> s_sparc_psf_paytool_1_4_0_0_cots (0/1 minutes elapsed)
> 
> If, however, I change the source file name for the second saaj-* file:
> 
>         $(server_jar_dir)/foo dest=$(cots_lib_dir)/saaj-ri.jar
>                                r=inf
>                                syslog=true
>                                mode=$(readMode)
>                                type=binary
>                                server=$(policyhost)
>                                trustkey=true
>                                purge=false
> 
> then saaj-ri.jar is copied as expected.
> 
> But if I do this:
> 
>         $(server_jar_dir)/saaj-foo dest=$(cots_lib_dir)/saaj-ri.jar
>                                r=inf
>                                syslog=true
>                                mode=$(readMode)
>                                type=binary
>                                server=$(policyhost)
>                                trustkey=true
>                                purge=false
> 
> Then the copy fails again.
> 
> 
> Erm.... been looking at this for the better part of the morning, and I
> confess I'm out of ideas.
> 
> Help?
> 
> -Pete
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-cfengine




reply via email to

[Prev in Thread] Current Thread [Next in Thread]