Description of problem: system controlled by Spacewalk/RHN Satellite will not log anything about remote controlled package actions like install or erase. Version-Release number of selected component (if applicable): yum-rhn-plugin-0.6.2-1.el5 (CentOS 5.4) yum-rhn-plugin-0.5.4-13.el5 (RHEL 5.4) How reproducible: Always Steps to Reproduce: 1. Trigger install or erase of a package in Spacewalk / RHN Satellite Actual results: Nothing useful found, neither in /var/log/up2date nor in /var/log/yum.log Expected results: Name/Version/Release of package and related action found in local system log Additional info: After some debugging I found a quick, simple and imho proper solution by a small patch. --- /usr/share/rhn/actions/packages.py.orig 2009-12-16 15:50:31.000000000 +0000 +++ /usr/share/rhn/actions/packages.py 2009-12-16 16:32:11.000000000 +0000 @@ -133,6 +133,12 @@ log.log_debug('Running Transaction') self.runTransaction(testcb) + for txmbr in self.tsInfo.getMembers(): + if txmbr.ts_state in ['i', 'u']: + log.log_me('Installed: ', txmbr.name, '-', txmbr.version, '-', txmbr.release, '.', txmbr.arch) + if txmbr.ts_state in ['e']: + log.log_me('Erased: ', txmbr.name, '-', txmbr.version, '-', txmbr.release, '.', txmbr.arch) + # close things return 0 @@ -285,6 +291,10 @@ for package in package_list: transaction_data['packages'].append((package, action)) + if action in ['i', 'u']: + log.log_me('Install: ', package[0], '-', package[1], '-', package[2], '.', package[4]) + if action in ['e']: + log.log_me('Erase: ', package[0], '-', package[1], '-', package[2], '.', package[4]) return transaction_data This results in e.g. follwing log lines: [Wed Dec 16 16:31:22 2009] up2date updateLoginInfo() login info [Wed Dec 16 16:31:22 2009] up2date logging into up2date server [Wed Dec 16 16:31:22 2009] up2date successfully retrieved authentication token from up2date server [Wed Dec 16 16:31:22 2009] up2date Install: aalib-devel-1.4.0-0.11.rc5.el5.i386 [Wed Dec 16 16:31:26 2009] up2date Updating package profile [Wed Dec 16 16:31:27 2009] up2date Installed: aalib-1.4.0-0.11.rc5.el5.i386 [Wed Dec 16 16:31:27 2009] up2date Installed: aalib-devel-1.4.0-0.11.rc5.el5.i386 [Wed Dec 16 16:31:27 2009] up2date Updating package profile Note: the triggered package and the install with resolved dependencies is logged. Same for deinstall: [Wed Dec 16 16:40:19 2009] up2date updateLoginInfo() login info [Wed Dec 16 16:40:19 2009] up2date logging into up2date server [Wed Dec 16 16:40:19 2009] up2date successfully retrieved authentication token from up2date server [Wed Dec 16 16:40:19 2009] up2date Erase: aalib-1.4.0-0.11.rc5.el5.i386 [Wed Dec 16 16:40:21 2009] up2date Updating package profile [Wed Dec 16 16:40:21 2009] up2date Erased: aalib-1.4.0-0.11.rc5.el5.i386 [Wed Dec 16 16:40:21 2009] up2date Erased: aalib-devel-1.4.0-0.11.rc5.el5.i386 [Wed Dec 16 16:40:21 2009] up2date Updating package profile Pls. push this forward, because this will sure help many people, especially for system auditing, when a package "has left" a system or what was installed in dependency of an triggered installed.
Created attachment 378788 [details] Patch in diff format
It was reggression, which has been fixed in yum-rhn-plugin-0.7.7-1 In /var/log/up2date you should be able to see lines like: [Sun Oct 4 17:42:02 2009] up2date Adding packages to package profile: ['wget-1.11.4-2.el5'] *** This bug has been marked as a duplicate of bug 527412 ***
Where can I download an RHEL 5.4 compatible RPM of yum-rhn-plugin?
Sorry, found here now: http://miroslav.suchy.cz/spacewalk/nightly-candidate-client/el5/i386/os/
Just note for installing the 0.7.8 release, I have to install also python-ethtool.i386 0:0.3-5.el5 from Spacewalk nightly builds and python-dmidecode.i386 0:3.10.7-3.el5 from EPEL testing Imho, this should be improved somehow and coordinated before final release. It' strange to require packages from EPEL if connecting a client to spacewalk.
I personally would like that the log output would change from this simple "print array" to one like /var/log/yum.log Instead of: [Thu Dec 17 14:14:02 2009] up2date Adding packages to package profile: ['aalib-devel-1.4.0-0.11.rc5.el5', 'aalib-1.4.0-0.11.rc5.el5'] [Thu Dec 17 14:14:02 2009] up2date Removing packages from package profile: [] The following looks better: [Wed Dec 16 16:31:27 2009] up2date Installed: aalib-1.4.0-0.11.rc5.el5.i386 [Wed Dec 16 16:31:27 2009] up2date Installed: aalib-devel-1.4.0-0.11.rc5.el5.i386
re #3 and #4 - more correct link is http://spacewalk.redhat.com/yum/0.7-client/RHEL/5/i386/yum-rhn-plugin-0.7.8-1.el5.noarch.rpm re #5 this is how it works in spacewalk - we move fast. and do not include packages from epel or epel-testing in our repo. If you want it in one pack, you should think about RHN Satellite, where is everything nice and polished. re #6 this format has been here since RHEL 5.0, we will definitely stick with this format, if you fell the other format has big advantage, you can start discussion on spacewalk-devel mailing list.