At the moment, there's no bug to report about. You're tryin' too
early. To discard promise lock, use -K option (cf-agent -K). It's in
FAQ, BTW.

2010/9/9 Aleksey Tsalolikhin <atsaloli.t...@gmail.com>:
> Here is what cf-agent -v tells me:
>
> cf3 Observe process table with /bin/ps auxw
> cf3  XX Nothing promised here [lock.check_ntpd_running.proces] (0/1
> minutes elapsed)
> cf3
>
> I appreciate your suggestion to use process_select (thank you), but
> I'd like to make this example work - it's in the reference manual
> after all.
>
> I'll report it as a bug to the bug list.
>
> Best,
> -at
>
> On Thu, Sep 9, 2010 at 1:29 AM, Seva Gluschenko
> <seva.glusche...@gmail.com> wrote:
>> Aleksey,
>>
>> running cf-agent in verbose mode (cf-agent -v) can make you known of
>> reasons your process promise was erroneously matched. Also, take a
>> look at process_select compound body to implement better matching.
>>
>> 2010/9/9 Aleksey Tsalolikhin <atsaloli.t...@gmail.com>:
>>> Reference:  
>>> http://www.cfengine.org/manuals/cf3-reference.html#restart_005fclass-in-processes
>>>
>>> Example - ntpd is down, cf-agent should start it.  It does not.
>>>
>>> [r...@localhost inputs]# /etc/init.d/ntpd status
>>> ntpd is stopped
>>> [r...@localhost inputs]# ps auwx|grep ntpd
>>> root     11788  0.0  0.0   3996   684 pts/0    R+   23:26   0:00 grep ntpd
>>> [r...@localhost inputs]# cat example1_service_running_ntpd.cf
>>> body common control
>>>
>>> {
>>> bundlesequence  => { "check_ntpd_running"  };
>>> }
>>>
>>>
>>> bundle agent check_ntpd_running {
>>>
>>>
>>>    processes:
>>>
>>>            "ntpd"
>>>
>>>                restart_class => "start_ntpd";
>>>
>>>    commands:
>>>
>>>        start_ntpd::
>>>
>>>                "/etc/init.d/ntpd start";
>>>
>>> }
>>> [r...@localhost inputs]# cf-agent -f ./example1_service_running_ntpd.cf
>>> [r...@localhost inputs]# Wed Sep  8 23:26:51 2010:Lock removed
>>> normally 
>>> :pid=11805:lock.check_ntpd_running.processes.restart_class..proc_ntpd_start_ntpd_2679_MD5=56cd7091cb7b8906d0171aa0b2c846a9:
>>> Wed Sep  8 23:26:49 2010 -> Wed Sep  8 23:26:51 2010: Outcome of
>>> version (not specified) (agent-0): Promises observed to be kept 100%,
>>> Promises repaired 0%, Promises not repaired 0%
>>>
>>> [r...@localhost inputs]# /etc/init.d/ntpd status
>>> ntpd is stopped
>>> [r...@localhost inputs]#
>>>
>>> No, I suspect it's something to do with the regex check, because if I
>>> change the string to
>>>
>>>            "nosuchstringatalliamversure"
>>>
>>> then it works, ntpd is started.
>>>
>>> This is with cfengine 3.0.5p1 community edition.
>>>
>>> Thanks,
>>> -at
>>> _______________________________________________
>>> Help-cfengine mailing list
>>> Help-cfengine@cfengine.org
>>> https://cfengine.org/mailman/listinfo/help-cfengine
>>>
>>
>>
>>
>> --
>> SY, Seva Gluschenko.
>>
>



-- 
SY, Seva Gluschenko.
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to