Hello,
I'm uncovering layers of errors. Eventually, I may get back to my
initial question.
In site.cf, I have, files:, processes: and commands:. In the files
section, I define a promise result which is to be used to restart a
process. However, the processes portion is being looked at first, and
the criteria isn't met. It is later in execution that it is processed.
Just below is the content of the .cf file. After that is the verbose output.
bundle agent site
{
files:
sdm_hosts::
"/etc/ssh/sshd_config"
perms => usystem("0744"),
copy_from =>
umycopy("/var/lib/cfengine3/masterfiles/conf/sshd_config"),
classes => if_repaired("sshd_reconfigured");
processes:
any::
sshd_reconfigured::
"sshd"
signals => { "hup" },
process_select => listening_sshd,
restart_class => "restart_sshd";
commands:
restart_sshd::
"/etc/init.d/ssh restart";
}
## Verbose output
cf3 *****************************************************************
cf3 BUNDLE site
cf3 *****************************************************************
cf3
cf3
cf3 =========================================================
cf3 vars in bundle site (1)
cf3 =========================================================
cf3
cf3 Verifying SQL table promises is only available with Cfengine Nova or
above
cf3
cf3 + Private classes augmented:
cf3
cf3 - Private classes diminished:
cf3
cf3
cf3
cf3 =========================================================
cf3 processes in bundle site (1)
cf3 =========================================================
cf3
cf3 Verifying SQL table promises is only available with Cfengine Nova or
above
cf3 Observe process table with /bin/ps auxw
cf3
cf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cf3 Skipping whole next promise (sshd), as context sshd_reconfigured is
not relevant
cf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cf3
cf3 =========================================================
cf3 commands in bundle site (1)
cf3 =========================================================
cf3
cf3 Verifying SQL table promises is only available with Cfengine Nova or
above
cf3
cf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cf3 Skipping whole next promise (/etc/init.d/ssh restart), as context
restart_sshd is not relevant
cf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cf3
cf3 =========================================================
cf3 files in bundle site (1)
cf3 =========================================================
cf3
cf3 Verifying SQL table promises is only available with Cfengine Nova or
above
cf3
cf3 .........................................................
cf3 Promise handle:
cf3 Promise made by: /etc/ssh/sshd_config
cf3 .........................................................
cf3
cf3 -> Copy file /etc/ssh/sshd_config from
/var/lib/cfengine3/masterfiles/conf/sshd_config check
--cut--
cf3 -> Copy of regular file succeeded
/var/lib/cfengine3/masterfiles/conf/sshd_config to
/etc/ssh/sshd_config.cfnew
cf3 ?? Final verification of transmission ...
cf3 -> New file /etc/ssh/sshd_config.cfnew transmitted correctly - verified
cf3 -> Object /etc/ssh/sshd_config had permission 600, changed it to 744
cf3 ?> defining promise result class sshd_reconfigured
cf3 -> Updated file from
128.3.30.152:/var/lib/cfengine3/masterfiles/conf/sshd_config
cf3 ?> defining promise result class sshd_reconfigured
cf3
Performance(Copy(128.3.30.152:/var/lib/cfengine3/masterfiles/conf/sshd_config
> /etc/ssh/sshd_config)): time=0.0049 secs, av=0.0047 +/- 0.0068
cf3 Existing connection just became free...
cf3
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine