problem with variable in bundle agent

2012-09-20 Thread Bas van der Vlies
Cfengine community: 3.3.2
OS: debian wheezy

I have the following bundle:

bundle agent  sara_template_process(final_destination, owner, mode)
{
vars:

any::
"template_dir"  string => "/data/cfengine3/templates";
"filename" string => lastnode("$(final_destination)","/");

files:

any::
"$(g.node_status)/templates/$(filename)"
comment => "Copy template file",
perms   => mo("400", "root"),
copy_from   => 
sara_hash_no_perms_cp("$(template_dir)/$(filename)", "$(g.policyserver)"),
classes   => if_repaired( 
canonify("template_copied_$(filename)") );

"$(final_destination)"
comment => "Expand the template",
create => "true",
edit_template => "$(g.node_status)/templates/$(filename)",
edit_defaults => empty,
perms => mo("$(mode)","$(owner)");
}

The problem is the wrong class is set if a file is copied if we call this 
bundle twice in a row:

bundle agent test
{
methods:
"resolv_conf" usebundle => 
sara_template_process("/etc/resolv.conf", "root", "644");
"autofs_conf" usebundle => 
sara_template_process("/etc/default/autofs", "root", "644");
}

Here is the verbose output when autofs file is copied:
{{{
cf3>  -> Public key identity of host "192.168.144.50" is 
"MD5=75df54ce6999a8b7ff35e65df498d383"
cf3>  -> /etc/node_status/templates/autofs wasn't at destination (copying)
cf3>  -> Copying from install2:/data/cfengine3/templates/autofs
cf3>  -> Copy of regular file succeeded /data/cfengine3/templates/autofs to 
/etc/node_status/templates/autofs.cfnew
cf3>  -> Object /etc/node_status/templates/autofs had permission 600, changed 
it to 400
cf3>  ?> defining promise result class template_copied_resolv_conf
cf3>  -> Updated file from install2:/data/cfengine3/templates/autofs
cf3>  ?> defining promise result class template_copied_resolv_conf
}}}

Note the class 'template_copied_resolv_conf' is set. It must be 
'template_copied_autofs'. Is this a bug or is there something wrong
in my bundle?
-- 

*  Bas van der Vliese-mail: b...@sara.nl   *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *




smime.p7s
Description: S/MIME Cryptographic Signature
___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


Re: problem with variable in bundle agent

2012-09-20 Thread Bas van der Vlies
On 09/20/2012 11:31 AM, Bas van der Vlies wrote:
> Cfengine community: 3.3.2
> OS: debian wheezy
> 
> I have the following bundle:
> 
> bundle agent  sara_template_process(final_destination, owner, mode)
> {
> vars:
> 
> any::
> "template_dir"  string => "/data/cfengine3/templates";
> "filename" string => lastnode("$(final_destination)","/");
> 
> files:
> 
> any::
> "$(g.node_status)/templates/$(filename)"
> comment => "Copy template file",
> perms   => mo("400", "root"),
> copy_from   => 
> sara_hash_no_perms_cp("$(template_dir)/$(filename)", "$(g.policyserver)"),
> classes   => if_repaired( 
> canonify("template_copied_$(filename)") );
> 
> "$(final_destination)"
> comment => "Expand the template",
> create => "true",
> edit_template => "$(g.node_status)/templates/$(filename)",
> edit_defaults => empty,
> perms => mo("$(mode)","$(owner)");
> }
> 
> The problem is the wrong class is set if a file is copied if we call this 
> bundle twice in a row:
> 
> bundle agent test
> {
> methods:
> "resolv_conf" usebundle => 
> sara_template_process("/etc/resolv.conf", "root", "644");
> "autofs_conf" usebundle => 
> sara_template_process("/etc/default/autofs", "root", "644");
> }
> 
> Here is the verbose output when autofs file is copied:
> {{{
> cf3>  -> Public key identity of host "192.168.144.50" is 
> "MD5=75df54ce6999a8b7ff35e65df498d383"
> cf3>  -> /etc/node_status/templates/autofs wasn't at destination (copying)
> cf3>  -> Copying from install2:/data/cfengine3/templates/autofs
> cf3>  -> Copy of regular file succeeded /data/cfengine3/templates/autofs to 
> /etc/node_status/templates/autofs.cfnew
> cf3>  -> Object /etc/node_status/templates/autofs had permission 600, changed 
> it to 400
> cf3>  ?> defining promise result class template_copied_resolv_conf
> cf3>  -> Updated file from install2:/data/cfengine3/templates/autofs
> cf3>  ?> defining promise result class template_copied_resolv_conf
> }}}
> 
> Note the class 'template_copied_resolv_conf' is set. It must be 
> 'template_copied_autofs'. Is this a bug or is there something wrong
> in my bundle?
> 
> 

Also tested with:
 cfengine community trunk version
 and newest cfengine_stdlib.cf

same problem



-- 

*  Bas van der Vliese-mail: b...@sara.nl   *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *




smime.p7s
Description: S/MIME Cryptographic Signature
___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: configure:14448: error: Cannot find OpenSSL on HP-UX 11.31..... cfengine-3.2.4

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: configure:14448: error: Cannot find OpenSSL on HP-UX 11.31. 
cfengine-3.2.4
Author: Beto
Link to topic: https://cfengine.com/forum/read.php?3,27200,27446#msg-27446

Are all of these files installed, including /usr/local/lib/hpux32/libqdbm.a?


wilma:/home/root/cfengine-3.3.4# swlist -l file qdbm
# Initializing...
# Contacting target "wilma"...
#
# Target:  wilma:/
#

# qdbm  1.8.77 qdbm   
# qdbm.qdbm-INC   
  qdbm.qdbm-INC: /usr/local/include/cabin.h
  qdbm.qdbm-INC: /usr/local/include/curia.h
  qdbm.qdbm-INC: /usr/local/include/depot.h
  qdbm.qdbm-INC: /usr/local/include/hovel.h
  qdbm.qdbm-INC: /usr/local/include/odeum.h
  qdbm.qdbm-INC: /usr/local/include/relic.h
  qdbm.qdbm-INC: /usr/local/include/villa.h
  qdbm.qdbm-INC: /usr/local/include/vista.h
# qdbm.qdbm-MAN   
  qdbm.qdbm-MAN: /usr/local/man/man1/cbcodec.1 
  qdbm.qdbm-MAN: /usr/local/man/man1/cbtest.1  
  qdbm.qdbm-MAN: /usr/local/man/man1/crmgr.1   
  qdbm.qdbm-MAN: /usr/local/man/man1/crtest.1  
  qdbm.qdbm-MAN: /usr/local/man/man1/crtsv.1   
  qdbm.qdbm-MAN: /usr/local/man/man1/dpmgr.1   
  qdbm.qdbm-MAN: /usr/local/man/man1/dptest.1  
  qdbm.qdbm-MAN: /usr/local/man/man1/dptsv.1   
  qdbm.qdbm-MAN: /usr/local/man/man1/hvmgr.1   
  qdbm.qdbm-MAN: /usr/local/man/man1/hvtest.1  
  qdbm.qdbm-MAN: /usr/local/man/man1/odidx.1   
  qdbm.qdbm-MAN: /usr/local/man/man1/odmgr.1   
  qdbm.qdbm-MAN: /usr/local/man/man1/odtest.1  
  qdbm.qdbm-MAN: /usr/local/man/man1/qmttest.1 
  qdbm.qdbm-MAN: /usr/local/man/man1/rlmgr.1   
  qdbm.qdbm-MAN: /usr/local/man/man1/rltest.1  
  qdbm.qdbm-MAN: /usr/local/man/man1/vlmgr.1   
  qdbm.qdbm-MAN: /usr/local/man/man1/vltest.1  
  qdbm.qdbm-MAN: /usr/local/man/man1/vltsv.1   
  qdbm.qdbm-MAN: /usr/local/man/man3/cabin.3   
  qdbm.qdbm-MAN: /usr/local/man/man3/cropen.3  
  qdbm.qdbm-MAN: /usr/local/man/man3/curia.3   
  qdbm.qdbm-MAN: /usr/local/man/man3/depot.3   
  qdbm.qdbm-MAN: /usr/local/man/man3/dpopen.3  
  qdbm.qdbm-MAN: /usr/local/man/man3/hovel.3   
  qdbm.qdbm-MAN: /usr/local/man/man3/odeum.3   
  qdbm.qdbm-MAN: /usr/local/man/man3/odopen.3  
  qdbm.qdbm-MAN: /usr/local/man/man3/qdbm.3
  qdbm.qdbm-MAN: /usr/local/man/man3/relic.3   
  qdbm.qdbm-MAN: /usr/local/man/man3/villa.3   
  qdbm.qdbm-MAN: /usr/local/man/man3/vista.3   
  qdbm.qdbm-MAN: /usr/local/man/man3/vlopen.3  
# qdbm.qdbm-RUN   
  qdbm.qdbm-RUN: /usr/local/bin/cbcodec
  qdbm.qdbm-RUN: /usr/local/bin/cbtest 
  qdbm.qdbm-RUN: /usr/local/bin/crmgr  
  qdbm.qdbm-RUN: /usr/local/bin/crtest 
  qdbm.qdbm-RUN: /usr/local/bin/crtsv  
  qdbm.qdbm-RUN: /usr/local/bin/dpmgr  
  qdbm.qdbm-RUN: /usr/local/bin/dptest 
  qdbm.qdbm-RUN: /usr/local/bin/dptsv  
  qdbm.qdbm-RUN: /usr/local/bin/hvmgr  
  qdbm.qdbm-RUN: /usr/local/bin/hvtest 
  qdbm.qdbm-RUN: /usr/local/bin/odidx  
  qdbm.qdbm-RUN: /usr/local/bin/odmgr  
  qdbm.qdbm-RUN: /usr/local/bin/odtest 
  qdbm.qdbm-RUN: /usr/local/bin/qmttest
  qdbm.qdbm-RUN: /usr/local/bin/rlmgr  
  qdbm.qdbm-RUN: /usr/local/bin/rltest 
  qdbm.qdbm-RUN: /usr/local/bin/vlmgr  
  qdbm.qdbm-RUN: /usr/local/bin/vltest 
  qdbm.qdbm-RUN: /usr/local/bin/vltsv  
  qdbm.qdbm-RUN: /usr/local/doc/qdbm/COPYING   
  qdbm.qdbm-RUN: /usr/local/doc/qdbm/ChangeLog 
  qdbm.qdbm-RUN: /usr/local/doc/qdbm/HPUX.Install  
  qdbm.qdbm-RUN: /usr/local/doc/qdbm/NEWS  
  qdbm.qdbm-RUN: /usr/local/doc/qdbm/README
  qdbm.qdbm-RUN: /usr/local/lib/hpux32/libqdbm.a   
  qdbm.qdbm-RUN: /usr/local/lib/hpux32/pkgconfig/qdbm.pc   
  qdbm.qdbm-RUN: /usr/local/share/qdbm/COPYING 
  qdbm.qdbm-RUN: /usr/local/share/qdbm/ChangeLog   
  qdbm.qdbm-RUN: /usr/local/share/qdbm/NEWS
  qdbm.qdbm-RUN: /usr/local/share/qdbm/THANKS  
  q

CFEngine Help: Re: problem with variable in bundle agent

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: problem with variable in bundle agent
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,27443,27452#msg-27452

What does this body do? 'sara_hash_no_perms_cp'

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: configure:14448: error: Cannot find OpenSSL on HP-UX 11.31..... cfengine-3.2.4

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: configure:14448: error: Cannot find OpenSSL on HP-UX 11.31. 
cfengine-3.2.4
Author: cfengine2o12
Link to topic: https://cfengine.com/forum/read.php?3,27200,27454#msg-27454

# swlist -l file qdbm
# Initializing...
# Contacting target "cfhost"...
#
# Target:  cfhost:/
#

# qdbm  1.8.77 qdbm
# qdbm.qdbm-INC
  qdbm.qdbm-INC: /usr/local/include/cabin.h
  qdbm.qdbm-INC: /usr/local/include/curia.h
  qdbm.qdbm-INC: /usr/local/include/depot.h
  qdbm.qdbm-INC: /usr/local/include/hovel.h
  qdbm.qdbm-INC: /usr/local/include/odeum.h
  qdbm.qdbm-INC: /usr/local/include/relic.h
  qdbm.qdbm-INC: /usr/local/include/villa.h
  qdbm.qdbm-INC: /usr/local/include/vista.h
# qdbm.qdbm-MAN
  qdbm.qdbm-MAN: /usr/local/man/man1/cbcodec.1
  qdbm.qdbm-MAN: /usr/local/man/man1/cbtest.1
  qdbm.qdbm-MAN: /usr/local/man/man1/crmgr.1
  qdbm.qdbm-MAN: /usr/local/man/man1/crtest.1
  qdbm.qdbm-MAN: /usr/local/man/man1/crtsv.1
  qdbm.qdbm-MAN: /usr/local/man/man1/dpmgr.1
  qdbm.qdbm-MAN: /usr/local/man/man1/dptest.1
  qdbm.qdbm-MAN: /usr/local/man/man1/dptsv.1
  qdbm.qdbm-MAN: /usr/local/man/man1/hvmgr.1
  qdbm.qdbm-MAN: /usr/local/man/man1/hvtest.1
  qdbm.qdbm-MAN: /usr/local/man/man1/odidx.1
  qdbm.qdbm-MAN: /usr/local/man/man1/odmgr.1
  qdbm.qdbm-MAN: /usr/local/man/man1/odtest.1
  qdbm.qdbm-MAN: /usr/local/man/man1/qmttest.1
  qdbm.qdbm-MAN: /usr/local/man/man1/rlmgr.1
  qdbm.qdbm-MAN: /usr/local/man/man1/rltest.1
  qdbm.qdbm-MAN: /usr/local/man/man1/vlmgr.1
  qdbm.qdbm-MAN: /usr/local/man/man1/vltest.1
  qdbm.qdbm-MAN: /usr/local/man/man1/vltsv.1
  qdbm.qdbm-MAN: /usr/local/man/man3/cabin.3
  qdbm.qdbm-MAN: /usr/local/man/man3/cropen.3
  qdbm.qdbm-MAN: /usr/local/man/man3/curia.3
  qdbm.qdbm-MAN: /usr/local/man/man3/depot.3
  qdbm.qdbm-MAN: /usr/local/man/man3/dpopen.3
  qdbm.qdbm-MAN: /usr/local/man/man3/hovel.3
  qdbm.qdbm-MAN: /usr/local/man/man3/odeum.3
  qdbm.qdbm-MAN: /usr/local/man/man3/odopen.3
  qdbm.qdbm-MAN: /usr/local/man/man3/qdbm.3
  qdbm.qdbm-MAN: /usr/local/man/man3/relic.3
  qdbm.qdbm-MAN: /usr/local/man/man3/villa.3
  qdbm.qdbm-MAN: /usr/local/man/man3/vista.3
  qdbm.qdbm-MAN: /usr/local/man/man3/vlopen.3
# qdbm.qdbm-RUN
  qdbm.qdbm-RUN: /usr/local/bin/cbcodec
  qdbm.qdbm-RUN: /usr/local/bin/cbtest
  qdbm.qdbm-RUN: /usr/local/bin/crmgr
  qdbm.qdbm-RUN: /usr/local/bin/crtest
  qdbm.qdbm-RUN: /usr/local/bin/crtsv
  qdbm.qdbm-RUN: /usr/local/bin/dpmgr
  qdbm.qdbm-RUN: /usr/local/bin/dptest
  qdbm.qdbm-RUN: /usr/local/bin/dptsv
  qdbm.qdbm-RUN: /usr/local/bin/hvmgr
  qdbm.qdbm-RUN: /usr/local/bin/hvtest
  qdbm.qdbm-RUN: /usr/local/bin/odidx
  qdbm.qdbm-RUN: /usr/local/bin/odmgr
  qdbm.qdbm-RUN: /usr/local/bin/odtest
  qdbm.qdbm-RUN: /usr/local/bin/qmttest
  qdbm.qdbm-RUN: /usr/local/bin/rlmgr
  qdbm.qdbm-RUN: /usr/local/bin/rltest
  qdbm.qdbm-RUN: /usr/local/bin/vlmgr
  qdbm.qdbm-RUN: /usr/local/bin/vltest
  qdbm.qdbm-RUN: /usr/local/bin/vltsv
  qdbm.qdbm-RUN: /usr/local/doc/qdbm/COPYING
  qdbm.qdbm-RUN: /usr/local/doc/qdbm/ChangeLog
  qdbm.qdbm-RUN: /usr/local/doc/qdbm/HPUX.Install
  qdbm.qdbm-RUN: /usr/local/doc/qdbm/NEWS
  qdbm.qdbm-RUN: /usr/local/doc/qdbm/README
  qdbm.qdbm-RUN: /usr/local/lib/hpux32/libqdbm.a
  qdbm.qdbm-RUN: /usr/local/lib/hpux32/pkgconfig/qdbm.pc
  qdbm.qdbm-RUN: /usr/local/share/qdbm/COPYING
  qdbm.qdbm-RUN: /usr/local/share/qdbm/ChangeLog
  qdbm.qdbm-RUN: /usr/local/share/qdbm/NEWS
  qdbm.qdbm-RUN: /usr/local/share/qdbm/THANKS
  qdbm.qdbm-RUN: /usr/local/share/qdbm/spex-ja.html
  qdbm.qdbm-RUN: /usr/local/share/qdbm/spex.html

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


Re: CFEngine Help: Re: problem with variable in bundle agent

2012-09-20 Thread Bas van der Vlies
On 09/20/2012 03:55 PM, no-re...@cfengine.com wrote:
> Forum: CFEngine Help
> Subject: Re: problem with variable in bundle agent
> Author: neilhwatson
> Link to topic: https://cfengine.com/forum/read.php?3,27443,27452#msg-27452
> 
> What does this body do? 'sara_hash_no_perms_cp'
> 

I did not include it. Here is the body:

body copy_from sara_hash_no_perms_cp(from,server)
{
source   => "${from}";
servers  => { "${server}" };
preserve => "false";
compare  => "hash";
}






-- 

*  Bas van der Vliese-mail: b...@sara.nl   *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *




smime.p7s
Description: S/MIME Cryptographic Signature
___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: avoiding double-runs to converge when using template operations

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: avoiding double-runs to converge when using template operations
Author: jgreer
Link to topic: https://cfengine.com/forum/read.php?3,27428,27455#msg-27455

Hi Neil,

I think you're right that this is a matter of logic for us.  We're hoping you 
can help.

We hold CFEngine policy and CFEngine-managed files in a single subversion 
repository.  Our changesets, then, consist of both updates to policy and 
managed files, applied atomically at the master.  That's a pretty firm 
requirement to our team, related (I think) to the problem Nick's describing.  
We want to able to view related changes to policy and backing files as a 
logical unit, since we mutually review each other's commits to version control.

The way we had CFEngine 2 set up, updates to policy must have occurred prior to 
execution of policy within a single agent run, because if I made a change to 
policy on the server, the agents would act on that policy at the next run.

The way we have CFEngine 3 set up, the agent seems to execute on what's in 
/var/cfengine/inputs at the time the agent run starts, regardless of whether 
"recent" policy changes (that is, updates made within the last window of agent 
runs) are available at the master.  I make a change to policy in Cfengine 3, 
that change is realized after two agent runs, not one.

I would have guessed that reordering of bundles in the bundlesequence would be 
the solution here, but here's what we've currently got:


  bundlesequence => { 
"group",  # sets Yale suborganization-specific variables, allowing us to 
federate shared code to other units
"classes",  # defines soft classes
"update",  # updates policy in /var/cfengine/inputs
"main"  # starting point for real CFEngine logic; from here, we daisy-chain 
invocation of all other bundles by way of 'methods' promises
  };


Unfortunately, even though our copy statements for fetching new policy appear 
in the bundlesequence prior to any real 'meat,' CFEngine appears only to act on 
the policy it drew into memory when the agent began to execute.


This has been a minor nuisance for us for awhile, but lately it's becoming 
really problematic as we make use of templatization.  Our template files are 
tightly coupled with policy now, since they rely on variables declared in 
policy.  Therefore, having the agent execute on policy from SVN revision N and 
content from revision N+1 gets us into trouble in a way it didn't before.


I'm wondering if the right thing to do here is configure execd to explicitly 
run just the 'update' bundle (or 'failsafe', which for us, is basically the 
same thing) prior to promises.cf.  

We have now:

  exec_command => 
"$(sys.workdir)/bin/cf-agent; $(sys.workdir)/bin/cf-agent -f 
/var/cfengine/inputs/failsafe.cf";

So I'd propose switching to:

  exec_command => 
"$(sys.workdir)/bin/cf-agent -f /var/cfengine/inputs/failsafe.cf; 
$(sys.workdir)/bin/cf-agent; $(sys.workdir)/bin/cf-agent -f 
/var/cfengine/inputs/failsafe.cf";


I think this would work, but it's somewhat unsightly.  Does this seem like a 
reasonable solution to the problem to you?  Do you have other ideas?

Thanks,
-Jessica

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


Re: CFEngine Help: Re: avoiding double-runs to converge when using template operations

2012-09-20 Thread Bas van der Vlies
On 09/20/2012 04:44 PM, no-re...@cfengine.com wrote:

> We have now:
> 
>   exec_command => 
> "$(sys.workdir)/bin/cf-agent; $(sys.workdir)/bin/cf-agent -f 
> /var/cfengine/inputs/failsafe.cf";
> 
> So I'd propose switching to:
> 
>   exec_command => 
> "$(sys.workdir)/bin/cf-agent -f /var/cfengine/inputs/failsafe.cf; 
> $(sys.workdir)/bin/cf-agent; $(sys.workdir)/bin/cf-agent -f 
> /var/cfengine/inputs/failsafe.cf";
> 
> 
> I think this would work, but it's somewhat unsightly.  Does this seem like a 
> reasonable solution to the problem to you?  Do you have other ideas?
> 

Jessica,

 We have the same command in our promises.cf file to make sure cf-agent is run 
with up-to-date file:
{{{
exec_command => "$(sys.workdir/bin//cf-agent -f failsafe.cf && 
$(sys.workdir)/bin/cf-agent";
}}}



-- 

*  Bas van der Vliese-mail: b...@sara.nl   *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *




smime.p7s
Description: S/MIME Cryptographic Signature
___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: avoiding double-runs to converge when using template operations

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: avoiding double-runs to converge when using template operations
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,27428,27457#msg-27457

Running failsafe first is the standard method: 
http://cfengine.com/manuals/cf3-Reference#exec_005fcommand-in-executor

If that is not enough I think you need to reevaluate how the policy works.

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: problem with variable in bundle agent

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: problem with variable in bundle agent
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,27443,27459#msg-27459

Have you tried this with a newer version?  Can you make a self contained 
example for testing? Does template_copied_resolv_autofs ever get defined?  Can 
you confirm manaully the outcome of the promises? Sometimes the verbose output 
gives a false trail.

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: configure:14448: error: Cannot find OpenSSL on HP-UX 11.31..... cfengine-3.2.4

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: configure:14448: error: Cannot find OpenSSL on HP-UX 11.31. 
cfengine-3.2.4
Author: Beto
Link to topic: https://cfengine.com/forum/read.php?3,27200,27461#msg-27461

Packages from the Porting and Archive Centre are 32 bit.  Where did you get 
pcre?

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: avoiding double-runs to converge when using template operations

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: avoiding double-runs to converge when using template operations
Author: jgreer
Link to topic: https://cfengine.com/forum/read.php?3,27428,27463#msg-27463

Neil,

So this *is* a feature thing - a functional difference between CFEngine 2 and 
3.  That's helpful to know - I don't recall seeing that in the reference guide 
at this time we got started with 3.

We'll add that failsafe run in explicitly.  Thanks for your help.

-Jessica

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: avoiding double-runs to converge when using template operations

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: avoiding double-runs to converge when using template operations
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,27428,27464#msg-27464

Jessica,

The default executor line in CFEngine Community is this: 
https://github.com/cfengine/core/blob/master/masterfiles/controls/cf_execd.cf#L25

  exec_command => "$(sys.cf_twin) -f $(sys.workdir)/inputs/failsafe/failsafe.cf 
&& $(sys.cf_agent)";


Note that failsafe.cf is run using cf-twin 
https://cfengine.com/manuals/cf3-Reference#Variable-sys_002ecf_005ftwin, which 
is a copy of cf-agent. This allows failsafe.cf, if needed, to update the 
CFEngine binaries and libraries without breaking the currently-executing agent.

--Diego

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: avoiding double-runs to converge when using template operations

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: avoiding double-runs to converge when using template operations
Author: nickanderson
Link to topic: https://cfengine.com/forum/read.php?3,27428,27465#msg-27465

But in community cf-twin evaluates to cf-agent correct? cf-twin is only for 
enterprise I thought.

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: avoiding double-runs to converge when using template operations

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: avoiding double-runs to converge when using template operations
Author: Beto
Link to topic: https://cfengine.com/forum/read.php?3,27428,27466#msg-27466


wilma:/home/root/inputs# cf-agent -KIf ./print_vars.cf 
.
.
.
R: sys.cf_key   = "/var/cfengine/bin/cf-key"
R: sys.cf_know  = "/var/cfengine/bin/cf-know"
R: sys.cf_monitord  = "/var/cfengine/bin/cf-monitord"
R: sys.cf_promises  = "/var/cfengine/bin/cf-promises"
R: sys.cf_report= "/var/cfengine/bin/cf-report"
R: sys.cf_runagent  = "/var/cfengine/bin/cf-runagent"
R: sys.cf_serverd   = "/var/cfengine/bin/cf-serverd"
R: sys.cf_twin  = "/var/cfengine/bin/cf-twin"
.
.


.

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: avoiding double-runs to converge when using template operations

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: avoiding double-runs to converge when using template operations
Author: jgreer
Link to topic: https://cfengine.com/forum/read.php?3,27428,27467#msg-27467

Thanks to everyone for their helpful responses.

It would be excellent if future releases of CFEngine 3 allowed the ability to 
turn on policy updates prior to execution of logic, within the agent itself, as 
version 2 did - a sort of pre-bundlesequence, perhaps?  That would allow for 
developing many small, iterative changesets on bodies of files+policy without 
needing to remember to prepend an explicit failsafe run when running the agent 
manually.  Will file as a feature request at the bug tracker.

-Jessica

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: avoiding double-runs to converge when using template operations

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: avoiding double-runs to converge when using template operations
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,27428,27468#msg-27468

Be aware that all examples and policies produced by Cfengine include the 
failsafe usage as we've described.  Also, if the agent returns an error, 
typically from a syntax problem with inputs, it automatically performs a 
cf-agent -f failsafe.cf thus attempting to correct the issue. So the 
auto-correct feature is there but you've just missed the new standard operating 
procedure.

Finally this new way is more flexible.  It allows for the development of 
self-contained policy files without needing an update.conf.  This is especially 
useful for prototyping.

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: avoiding double-runs to converge when using template operations

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: avoiding double-runs to converge when using template operations
Author: jgreer
Link to topic: https://cfengine.com/forum/read.php?3,27428,27469#msg-27469


Be aware that all examples and policies produced by Cfengine include the 
failsafe usage as we've described.
 

That's good, but all of those assume the use of the executor, which is 
impractical when prototyping.  Isn't it much more natural to manually kick off 
the agent in that scenario?  And hasn't that been made harder by abandoning the 
ability to update policy prior to execution within an agent run?


Also, if the agent returns an error, typically from a syntax problem with 
inputs, it automatically performs a cf-agent -f failsafe.cf thus attempting to 
correct the issue. So the auto-correct feature is there but you've just missed 
the new standard operating procedure.
 

I am familiar with that feature, but at least earlier in v3's life (~2 years 
ago now), I ran into cases in which cf-promises/cf-agent detected syntax errors 
and silently terminated rather than running the followup failsafe run.  I filed 
bugs at the time, and perhaps all's better now, but since failsafe runs are 
(for me) cheap and prevent the very scary scenario of mass agent disconnection 
from the server, it's worth it to me to do an explicit failsafe run as a 
followup.


Finally this new way is more flexible. It allows for the development of 
self-contained policy files without needing an update.conf. This is especially 
useful for prototyping.
 

I don't think my proposal precludes the flexibility you describe?  If one were 
allowed the ability to run an arbitrary bundle prior to the standard 
bundlesequence in a single agent run, such that the standard bundlesequence 
read policy from $(sys.workdir) into memory, that would allow for that 
flexibility to be preserved AND for a single invocation of cf-agent to execute 
on a single revision from version control, where policy and backend managed 
file revisions might be tightly coupled.  That would allow me to trust that a 
single run of "cf-agent," anytime, on any of my systems, is safe - no need to 
remember to front it with a failsafe run.  That's something we've been able to 
trust for years, and we'd like to continue to be able to trust it blindly even 
as we make more use of templatization.

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: avoiding double-runs to converge when using template operations

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: avoiding double-runs to converge when using template operations
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,27428,27470#msg-27470

jgreer Wrote:
---
> policy from $(sys.workdir) into memory, that would
> allow for that flexibility to be preserved AND for
> a single invocation of cf-agent to execute on a
> single revision from version control, where policy
> and backend managed file revisions might be
> tightly coupled. 

There is something here you have not described.  How do your agents have
knowledge of a CVS control?

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: avoiding double-runs to converge when using template operations

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: avoiding double-runs to converge when using template operations
Author: jgreer
Link to topic: https://cfengine.com/forum/read.php?3,27428,27471#msg-27471

/var/cfengine/masterfiles on our server is a working copy of a single 
subversion repository (with externals to another shared Yale repository we use 
to share code to other groups here using CFEngine).  That includes inputs as 
well as file content managed by CFEngine.

Nothing surprising or crazy going on - we don't even (at this point) 
automatically update out of version control.  The basic workflow goes like this:

1. I make changes in a personal working copy to policy and managed files (This 
working copy is sometimes /var/cfengine/masterfiles on a sandbox machine, which 
is configured to point to localhost for policy).  
2. I vet changes personally and send diff to my team
3. Team views diff and provides feedback on proposed changes
4. I incorporate feedback into my working copy and commit changes to subversion
5. During times our agents are NOT phoning home to the master, I go to the 
working copy in /var/cfengine/masterfiles on the server, reverse-diff to show 
the changes coming down the pike, confirm I see what I expect and nothing more, 
and svn up, and document the final changeset for team records

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: configure:14448: error: Cannot find OpenSSL on HP-UX 11.31..... cfengine-3.2.4

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: configure:14448: error: Cannot find OpenSSL on HP-UX 11.31. 
cfengine-3.2.4
Author: cfengine2o12
Link to topic: https://cfengine.com/forum/read.php?3,27200,27472#msg-27472

Here you go..

http://hpux.connect.org.uk/hppd/hpux/Languages/pcre-8.31/

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine


CFEngine Help: Re: String in list from module truncated to 256 characters

2012-09-20 Thread no-reply
Forum: CFEngine Help
Subject: Re: String in list from module truncated to 256 characters
Author: btomasini
Link to topic: https://cfengine.com/forum/read.php?3,27413,27473#msg-27473

Bug created:

https://cfengine.com/dev/issues/1203

___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine