Forum: CFEngine Help Subject: Re: CFEngine Help: How-to restart machine after certain package have been installed. Author: juriskrumins Link to topic: https://cfengine.com/forum/read.php?3,26673,26716#msg-26716
Hi Nick. Great analisys. Take a look what I've got regarding the "yum vs. yum_rpm" you've mentioned previously: Still the same code: bundle agent packages { vars: !vz_hardware_node.!vz_container:: "kernel_package" slist => { "mc", }, comment => "Define kernel to install arch specifi", handle => "packages_vars_kernel_package"; packages: !vz_hardware_node.!vz_container:: "$(packages.kernel_package)" package_policy => "add", package_architectures => { "x86_64" }, package_method => yum, classes => if_repaired("restart_machine"); #reports: commands: "/sbin/shutdown -r +5" ifvarclass => "restart_machine"; } And so the verbose output is following: # cf-agent -V @@@ @@@ cf-agent @ @@@ @ CFEngine Core 3.3.5 @ @@@ @ @ @@@ @ @ @ @@@ @ @ @ @ @ @ Copyright (C) CFEngine AS 2008-2012 See Licensing at http://cfengine.com/3rdpartylicenses 1. Running cf-agent -v for the first time, so no mc have been installed on the machine gave me following output: cf3> ??????????????????????????????????????????????????????????????? cf3> Reading patches from /usr/bin/yum cf3> ??????????????????????????????????????????????????????????????? cf3> -> Package (file:///media/CentOS/repodata/repomd, 2. Runing cf-agent for the seconda time ( mc have been already installed) gave the following output cf3> -> Package (1,@anaconda-CentOS-201112102333.x86_64/6.2,1.2-16.el6) found cf3> -> Package (1,@base,1.30-14.el6) found cf3> -> Package (1,@base,1.30-14.el6) found cf3> -> Package (yum-utils,1.1.30-14.el6,noarch) found cf3> -> Package (1,@anaconda-CentOS-201112102333.x86_64/6.2,4-4.el6) found cf3> -> Package (zip,3.0-1.el6,x86_64) found cf3> -> Package (zlib,1.2.3-27.el6,x86_64) found cf3> ??????????????????????????????????????????????????????????????? cf3> Reading patches from /usr/bin/yum cf3> ??????????????????????????????????????????????????????????????? cf3> # Patch reporting feature is only available in version Nova and above cf3> ??????????????????????????????????????????????????????????????? cf3> Done checking packages and patches cf3> ??????????????????????????????????????????????????????????????? cf3> -> Package version was not specified cf3> ... trying listed arch x86_64 cf3> -> Looking for (mc,*,x86_64) cf3> -> Matched name mc cf3> -> Matched arch x86_64 cf3> -> Matched version * cf3> -> Looking for (mc,*,x86_64) cf3> -> Matched name mc cf3> -> Matched arch x86_64 cf3> -> Matched version * cf3> Checking if package (mc,*,x86_64) is at the desired state (installed=1,matched=1) cf3> -> Package promises to refer to itself as "mc.x86_64" to the manager cf3> -> Package version seems to match criteria cf3> -> Package "mc" already installed, so we never add it again So it's seems like there is no problem with package name creation neither for the first nor for the second time at least in my case. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine