+++ This bug was initially created as a clone of Bug #646284 +++ Description of problem: When rhn-virtualization-host package is updated, the links of the service script under /etc/rc.d/rcX.d are deleted. Version-Release number of selected component (if applicable): * rhn-virtualization-host (All released version) How reproducible: 1. Check package's version. (e.g. update from 5.3.0-14.el5sat to 5.3.0-18.el5sat.) # rpm -q rhn-virtualization-host rhn-virtualization-host-5.3.0-14.el5sat 2. Check the registration of service script. # chkconfig --list | grep rhn-virtualization-host rhn-virtualization-host 0:off 1:off 2:on 3:on 4:on 5:on 6:off 3. Update package. # yum update -y rhn-virtualization-host # rpm -q rhn-virtualization-host rhn-virtualization-host-5.3.0-18.el5sat Actual results: # chkconfig --list | grep rhn-virtualization-host (no outputs) Expected results: # chkconfig --list | grep rhn-virtualization-host rhn-virtualization-host 0:off 1:off 2:on 3:on 4:on 5:on 6:off Additional info: A cause was found in the installation script of the rhn-virtualization-host. # rpm -q rhn-virtualization-host --scripts postinstall scriptlet (using /bin/sh): /sbin/chkconfig --add rhn-virtualization-host /sbin/service crond condrestart preuninstall scriptlet (using /bin/sh): /sbin/chkconfig --del rhn-virtualization-host postuninstall scriptlet (using /bin/sh): /sbin/service crond condrestart The above script has not been considered for the state registration of a service script under /etc/rc.d/rcX.d/. Possible fix: ---------------------------------------------------------------------- @@ -85,7 +85,9 @@ /sbin/service crond condrestart %preun host -/sbin/chkconfig --del rhn-virtualization-host +if [ $1 = 0 ]; then + /sbin/chkconfig --del rhn-virtualization-host +fi %postun host /sbin/service crond condrestart ---------------------------------------------------------------------- Even if we release a new package which includes the above patch, updating to the package doesn't work as expected because the updating uses preun section in old package. Thus, we need to update twice to get an expected result. Updating from old package to new package(but old preun section is used): ---------------------------------------------------------------------- [root@yzsv58 ~]# rpm -q rhn-virtualization-host rhn-virtualization-host-5.4.14-8.el5sat [root@yzsv58 ~]# chkconfig --list | grep rhn-virtualization-hostrhn-virtualization-host 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@yzsv58 ~]# rpm -Uhv rhn-virtualization-host-5.4.14-9.bz646284.el5.noarch.rpm rhn-virtualization-common-5.4.14-9.bz646284.el5.noarch.rpm 準備中... ########################################### [100%] 1:rhn-virtualization-comm########################################### [ 50%] 2:rhn-virtualization-host########################################### [100%] crond を停止中: [ OK ] crond を起動中: [ OK ] crond を停止中: [ OK ] crond を起動中: [ OK ] [root@yzsv58 ~]# chkconfig --list | grep rhn-virtualization-host [root@yzsv58 ~]# ---------------------------------------------------------------------- Updating from new package to 2nd new package(preun section in 1st new package is used): ---------------------------------------------------------------------- [root@yzsv58 ~]# rpm -q rhn-virtualization-hostrhn-virtualization-host-5.4.14-9.bz646284.el5 [root@yzsv58 ~]# chkconfig --list | grep rhn-virtualization-hostrhn-virtualization-host 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@yzsv58 ~]# rpm -Uhv rhn-virtualization-host-5.4.14-10.bz646284.el5.noarch.rpm rhn-virtualization-common-5.4.14-10.bz646284.el5.noarch.rpm 準備中... ########################################### [100%] 1:rhn-virtualization-comm########################################### [ 50%] 2:rhn-virtualization-host########################################### [100%] crond を停止中: [ OK ] crond を起動中: [ OK ] crond を停止中: [ OK ] crond を起動中: [ OK ] [root@yzsv58 ~]# chkconfig --list | grep rhn-virtualization-host rhn-virtualization-host 0:off 1:off 2:on 3:on 4:on 5:on 6:off ---------------------------------------------------------------------- It looks confusable, so if you have any questions please let me know. Regards, M Yamazaki
Patch verified and committed to spacewalk master as d63319a9e891d191d9520f1ed310197664847d7f Note that Masayoshi says, this will take two updates for the customer will see the improved behaviour. The first update will be affected by the bug in the previous version but will fix the problem so that the next update will not be affected by the bug.
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18