The update of rhn-virtualization-host affecting autostart of the service.
Environment
- Red Hat Enterprise Linux 5.5
- rhn-virtualization-host-5.4.14-8.el5sat
Issue
-
When rhn-virtualization-host package is updated, the links of the service script under /etc/rc.d/rcX.d are deleted.
-
How reproducible: Always
-
Step to Reproduce:
- 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
- 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
- Update package.
# yum update -y rhn-virtualization-host # rpm -q rhn-virtualization-host rhn-virtualization-host-5.3.0-18.el5sat
- Check package's version.
- 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
Resolution
This fix has been released as rhn-virtualization-host-5.4.14-9.el5sat
Note: 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.
Root Cause
The patch should be like following.
@@ -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
Diagnostic Steps
Please note that 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@rhel58 ~]# rpm -q rhn-virtualization-host
rhn-virtualization-host-5.4.14-8.el5sat
[root@rhel58 ~]# chkconfig --list | grep rhn-virtualization-host
rhn-virtualization-host 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@rhel58 ~]# rpm -Uhv rhn-virtualization-host-5.4.14-9.bz646284.el5.noarch.rpm rhn-virtualization-common-5.4.14-9.bz646284.el5.noarch.rpm
Preparing... ########################################### [100%]
1:rhn-virtualization-comm########################################### [ 50%]
2:rhn-virtualization-host########################################### [100%]
Stopping crond: [ OK ]
Starting crond: [ OK ]
Stopping crond: [ OK ]
Starting crond: [ OK ]
[root@rhel58 ~]# chkconfig --list | grep rhn-virtualization-host
[root@rhel58 ~]#
Updating from new package to 2nd new package(preun section in 1st new package is used):
[root@rhel58 ~]# rpm -q rhn-virtualization-hostrhn-virtualization-host-5.4.14-9.bz646284.el5
[root@rhel58 ~]# chkconfig --list | grep rhn-virtualization-host
rhn-virtualization-host 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@rhel58 ~]# rpm -Uhv rhn-virtualization-host-5.4.14-10.bz646284.el5.noarch.rpm rhn-virtualization-common-5.4.14-10.bz646284.el5.noarch.rpm
Preparing... ########################################### [100%]
1:rhn-virtualization-comm########################################### [ 50%]
2:rhn-virtualization-host########################################### [100%]
Stopping crond: [ OK ]
Starting crond: [ OK ]
Stopping crond: [ OK ]
Starting crond: [ OK ]
[root@rhel58 ~]# chkconfig --list | grep rhn-virtualization-host
rhn-virtualization-host 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@rhel58 ~]#
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments