Forum: Cfengine Help Subject: package management with yum: handling stuck processes Author: Seva Gluschenko Link to topic: https://cfengine.com/forum/read.php?3,18978,18978#msg-18978
Hello folks, I've discovered recently that yum package manager under Cfengine occasionally becomes stuck, so that subsequential invocations of cf-agent try to run "yum list installed" over and over again, waiting for the lock from the stalled process. By unknown reason, Cfengine does not terminate stalled yum processes, so we have to do it ourselves. Below is my way of handling this issue: bundle agent install_packages(pkg) { ... processes: centos:: "yum" comment => "handle stuck yum processes", process_select => bored_yum, signals => { "term" }; } body process_select bored_yum { ppid => irange("1", "1"); # parent is dead, init-owned tty => "pts/.*"; # do not touch user processes stime_range => irange(ago(0,0,0,0,20,0),now); # minutes process_result => "ppid|!(tty|stime_range)"; } _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine