Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-18 Thread Marco Marongiu
I also see that you should set two more environment variables (promises.cf is a good place for that): APT_LISTBUGS_FRONTEND="none" APT_LISTCHANGES_FRONTEND="none" Again, it's better you don't know where I got this information from :) Ciao -- bronto ___

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Marco Marongiu
Il 17/11/2011 17:35, no-re...@cfengine.com ha scritto: > That assumes you want to keep the old configuration file rather than > the new one (--force-confew). See dpkg man file under > --force-things. It does, because I assume that the configuration is taken care of by cfengine. Of course I could

CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread no-reply
Forum: CFEngine Help Subject: Re: cf-agent run time limit (hanging during package installation) Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,23975,23997#msg-23997 That assumes you want to keep the old configuration file rather than the new one (--force-confew). See

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Marco Marongiu
This works: > body package_method aptget > { > package_changes => "bulk"; > package_list_command => "/usr/bin/dpkg -l"; > package_list_name_regex=> "ii\s+([^\s]+).*"; > package_list_version_regex => "ii\s+[^\s]+\s+([^\s]+).*"; > package_installed_regex => ".*"; # all reported are installed >

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Marco Marongiu
Il 17/11/2011 16:55, Mark Burgess ha scritto: > You can try this and report on that bug tracker > whether it works for you...? it doesn't. I guess the variable setting with env is not exported by apt-get to the dpkg subprocess. It is still hanging on user input. For the record, this is how my bu

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Mark Burgess
On 11/17/2011 04:42 PM, Marco Marongiu wrote: > Il 17/11/2011 16:35, Mark Burgess ha scritto: >> body agent control >> { >> environment => { "DEBIAN_FRONTEND=noninteractive", "LANG=C" }; >> } > As said, neither expireafter nor this is working for me, and I seem to > be not the only one having thi

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Marco Marongiu
Il 17/11/2011 16:35, Mark Burgess ha scritto: > body agent control > { > environment => { "DEBIAN_FRONTEND=noninteractive", "LANG=C" }; > } As said, neither expireafter nor this is working for me, and I seem to be not the only one having this kind of trouble: https://cfengine.com/bugtracker/view

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Marco Marongiu
Il 17/11/2011 16:32, Nick Anderson ha scritto: > You probably need something like this. > > body agent control { > # This is needed for packages that want some configuration like > # postfix. > environment => { "DEBIAN_FRONTEND=noninteractive" }; > } > > It's there already: debian

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Mark Burgess
On 11/17/2011 04:35 PM, Nick Anderson wrote: > On 11/17/2011 09:31 AM, Marco Marongiu wrote: > >> I can, of course, circumvent this specific behaviour, and I know that >> package managers may not be well suited for non interactive actions. >> Still, I find that cf-agent not being able to bail out o

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Mark Burgess
On 11/17/2011 04:31 PM, Marco Marongiu wrote: > Il 17/11/2011 16:22, no-re...@cfengine.com ha scritto: >> Run your promise in verbose mode and see what Cf is telling apt or >> aptitude to do. Package promises are very tricky and Cfengine is not >> really to blame. Many package managers do not beh

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Nick Anderson
On 11/17/2011 09:31 AM, Marco Marongiu wrote: > I can, of course, circumvent this specific behaviour, and I know that > package managers may not be well suited for non interactive actions. > Still, I find that cf-agent not being able to bail out of such a > situation is kind of a bug. And a bad on

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Nick Anderson
>> Il 17/11/2011 16:05, Mark Burgess ha scritto: >>> If you have an interactive program waiting for input, then CFEngine's >>> batch approach is not really compatible. You probably need to run >>> the programs in non-interactive mode, and maybe close any input >>> channels< /dev/null. >> Wait...

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Marco Marongiu
Il 17/11/2011 16:22, no-re...@cfengine.com ha scritto: > Run your promise in verbose mode and see what Cf is telling apt or > aptitude to do. Package promises are very tricky and Cfengine is not > really to blame. Many package managers do not behave as expected. I'm already doing that. aptitude,

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Mark Burgess
On 11/17/2011 04:09 PM, Marco Marongiu wrote: > Il 17/11/2011 16:05, Mark Burgess ha scritto: >> If you have an interactive program waiting for input, then CFEngine's >> batch approach is not really compatible. You probably need to run >> the programs in non-interactive mode, and maybe close any

CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread no-reply
Forum: CFEngine Help Subject: Re: cf-agent run time limit (hanging during package installation) Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,23975,23983#msg-23983 Run your promise in verbose mode and see what Cf is telling apt or aptitude to do. Package promises are

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Marco Marongiu
Il 17/11/2011 16:05, Mark Burgess ha scritto: > If you have an interactive program waiting for input, then CFEngine's > batch approach is not really compatible. You probably need to run > the programs in non-interactive mode, and maybe close any input > channels < /dev/null. Wait... so we are acc

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Mark Burgess
On 11/17/2011 04:01 PM, Marco Marongiu wrote: > Il 17/11/2011 15:25, Marco Marongiu ha scritto: >> Oh, thanks so much Neil!!! >> >> I've looked for "hang", "abort" and all possible synonyms, but of course >> I missed on "expire" :( > Unfortunately, it doesn't work :( > > I altered the "body agent c

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Marco Marongiu
Il 17/11/2011 15:25, Marco Marongiu ha scritto: > Oh, thanks so much Neil!!! > > I've looked for "hang", "abort" and all possible synonyms, but of course > I missed on "expire" :( Unfortunately, it doesn't work :( I altered the "body agent control" in promises.cf, adding an "expireafter => 1", b

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Marco Marongiu
Il 17/11/2011 15:17, no-re...@cfengine.com ha scritto: > http://cfengine.com/manuals/cf3-reference.html#expireafter-in-agent > > There is a body in COPBL already. Oh, thanks so much Neil!!! I've looked for "hang", "abort" and all possible synonyms, but of course I missed on "expire" :( Ciao --

CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread no-reply
Forum: CFEngine Help Subject: Re: cf-agent run time limit (hanging during package installation) Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,23975,23976#msg-23976 http://cfengine.com/manuals/cf3-reference.html#expireafter-in-agent There is a body in COPBL already

cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Marco Marongiu
Hi all A policy file of mine is supposed to configure ntp on the systems. Unfortunately, aptitude/dpkg hang requiring keyboard input, and cf-agent hangs on them. I've been searching for a way to timeout cf-agent on package installations, with no luck. But I am sure there *must* be a way... Any s